Agent skill

Document Go APIs

by talkincode in talkincode/toughradius

Standard-library-style Go API documentation and comment conventions (TR-F024).

MITAuto-check passedDevelopment

Install Document Go APIs

skills CLI
$ npx skills add talkincode/toughradius --skill document-go-apis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install talkincode/toughradius document-go-apis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/talkincode/toughradius.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/document-go-apis .claude/skills/document-go-apis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
document-go-apis
GitHub stars
691
Token cost
~1.3k tokens
SKILL.md length
502 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Standard-library-style Go API documentation and comment conventions (TR-F024).

  • Works in 10 steps: Every exported identifier has a doc… → Package comment: each non-main package… → Full sentences, present tense, ending… → …
  • Changing exported Go identifiers
  • SKILL.md covers When to use, Pre-research, Core conventions (godoc /… and Anti-patterns (reject these), plus 2 more sections
  • Calls go

What it does

Document Go APIs is an agent skill from talkincode/toughradius. Standard-library-style Go API documentation and comment conventions (TR-F024). Use when adding or changing exported Go identifiers, writing package comments, or backfilling godoc on a package so it reads like the Go standard library.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. The repository describes itself as: A powerful, open-source RADIUS server designed for ISPs, enterprise networks, and carriers. Supports standard RADIUS protocols, a full EAP / 802.1X authentication suite (EAP-TLS… The licence is MIT.

When your agent uses it

  • Changing exported Go identifiers
  • Writing package comments
  • Backfilling godoc on a package so it reads like the Go standard library

Example prompts

  • “/document-go-apis”

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Every exported identifier has a doc comment, and the comment starts with the identifier name
  2. Package comment: each non-main package has exactly one package comment, in a dedicated
  3. Full sentences, present tense, ending with a period. First sentence is a self-contained
  4. Document the contract, not the mechanics: parameters' meaning, return values, the zero value
  5. Errors: state what error types / sentinel values callers should branch on
  6. Concurrency: explicitly state whether a type/func is safe for concurrent use
  7. Context & blocking: note when a function blocks, honors ctx cancellation, performs I/O,
  8. Runnable examples for non-trivial APIs: add Example functions in *_test.go
  9. Deprecation: use a // Deprecated: use X instead. paragraph; do not delete the symbol abruptly.
  10. Unexported code: comment only where the why is non-obvious (protocol quirks, vendor unit

What it can do on your machine

Read from SKILL.md and the folder at commit 50907c9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Document Go APIs loads about 1.3k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 502 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from talkincode/toughradius at commit 50907c9, republished under its MIT licence (© talkincode). 502 words, ~1,275 tokens.

Download SKILL.mdSave it as .claude/skills/document-go-apis/SKILL.md (or your agent's skills folder).
name
document-go-apis
description
Standard-library-style Go API documentation and comment conventions (TR-F024). Use when adding or changing exported Go identifiers, writing package comments, or backfilling godoc on a package so it reads like the Go standard library.

Skill: Document Go APIs (standard-library style)

Feature ID: TR-F024 | Milestone: M4 (M4.11 / M4.12)

When to use

  • Adding or changing any exported Go identifier (func, type, method, const, var).
  • Writing or updating a package comment (doc.go).
  • Backfilling godoc on an existing package so it reads like the standard library.

The goal: a reader using go doc ./... or pkg.go.dev should understand the API without reading the implementation. Optimize for information value, not coverage theater.

Pre-research

text
go doc ./internal/radiusd                 # see how a package currently documents
view internal/radiusd/coa_service.go      # a well-documented reference in this repo
grep -rn "^// Package " internal pkg       # find existing package comments

Mirror the nearest well-documented neighbor; do not invent a new comment style.

Core conventions (godoc / stdlib)

  1. Every exported identifier has a doc comment, and the comment starts with the identifier name:
    go
    // CoAService sends RFC 5176 Dynamic Authorization (CoA / Disconnect) requests
    // to a NAS and reports a structured result.
    type CoAService struct { ... }
    
    // Disconnect sends a Disconnect-Request for the given session identity and
    // blocks until an ACK/NAK is received or the per-attempt timeout elapses.
    func (s *CoAService) Disconnect(ctx context.Context, ...) (*CoAResult, error) { ... }
  2. Package comment: each non-main package has exactly one package comment, in a dedicated doc.go when it is more than a line. Start with // Package <name> ...:
    go
    // Package radiusd implements the ToughRADIUS authentication, accounting,
    // and dynamic-authorization (CoA) protocol services.
    package radiusd
  3. Full sentences, present tense, ending with a period. First sentence is a self-contained summary (it is what pkg.go.dev shows in lists). Keep the summary on the first line.
  4. Document the contract, not the mechanics: parameters' meaning, return values, the zero value if it is usable, units (e.g. Kbps vs Mbps), ownership, and what counts as success vs failure.
  5. Errors: state what error types / sentinel values callers should branch on (e.g. AuthError with a metrics tag). Wrap with %w and say so when relevant.
  6. Concurrency: explicitly state whether a type/func is safe for concurrent use ("safe for concurrent use by multiple goroutines" or "not safe for concurrent use").
  7. Context & blocking: note when a function blocks, honors ctx cancellation, performs I/O, or has timeout/retry semantics.
  8. Runnable examples for non-trivial APIs: add Example<Name> functions in *_test.go (package <pkg>_test); they are compiled and run by go test and rendered on pkg.go.dev.
  9. Deprecation: use a // Deprecated: use X instead. paragraph; do not delete the symbol abruptly.
  10. Unexported code: comment only where the why is non-obvious (protocol quirks, vendor unit conversions, security-sensitive branches). Do not narrate obvious code.
Show full SKILL.md (181 more words)Show less

Anti-patterns (reject these)

  • // GetUser gets the user. — restates the name, zero information. Say what it loads, from where, and the failure mode.
  • Comment that does not start with the identifier name (breaks godoc association).
  • Per-line narration of self-evident statements.
  • Documenting unexported helpers exhaustively while exported API stays bare.

How to check

bash
go doc ./internal/<pkg>                     # read the rendered API; gaps are obvious
gofmt -l .                                  # comment formatting is part of gofmt
go vet ./...                                # catches some doc/format issues
go test ./...                              # compiles and runs Example functions
golangci-lint run                           # v2.12.2

Lint enforcement (incremental, M4.12): .golangci.yml currently disables the godoc checks (staticcheck ST1000 package-comment, ST1020/ST1021 func/type comment format). Do not flip them on globally in one shot — that would flag the whole tree. Backfill a package's docs first, then enable the relevant check (or revive's exported rule) scoped to that package, so the gate ratchets forward without a giant noisy diff.

Acceptance

  • Every new/changed exported identifier has a doc comment that starts with its name and states the contract
  • The package has a package comment (doc.go when multi-line)
  • Units, error types to branch on, and concurrency safety are stated where they apply
  • Non-trivial new APIs ship a runnable Example
  • gofmt -l clean, go vet ./..., go test ./..., and golangci-lint run pass
  • PR references TR-F024 (and the milestone subtask, e.g. M4.12, when backfilling)

© talkincode, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/document-go-apis of talkincode/toughradius.

Open the folder on GitHubat commit 50907c9

Compare with similar skills

Document Go APIs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Document Go APIs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Document Go APIs this skilltalkincode/toughradius691—~1.3kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design45k1 repos~7.5kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.5kAutomated safety check: PassGPL-3.0

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    45k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from talkincode/toughradius

All 15 skills in this repo
  • Release Version

    talkincode/toughradius

    Review merged PRs since the last Git tag and decide whether a ToughRADIUS release is warranted.

    691 GitHub stars~1.6k tokensUpdated 4 days ago
    Auto-check passed
  • Add Acceptance Test

    talkincode/toughradius

    Write CI-executable acceptance/integration tests for protocol or end-to-end changes (TR-F022).

    691 GitHub stars~827 tokensUpdated 4 days ago
    Auto-check passed
  • Add Adminapi Endpoint

    talkincode/toughradius

    Add a group of Admin REST endpoints in the management backend (TR-F012).

    691 GitHub stars~461 tokensUpdated 4 days ago
    Auto-check passed
  • Add Eap Method

    talkincode/toughradius

    Add an EAP authentication method (e.g. An agent skill from talkincode/toughradius.

    691 GitHub stars~802 tokensUpdated 4 days ago
    Auto-check passed
  • Add Radius Vendor

    talkincode/toughradius

    Add or extend vendor VSA parsing and response enhancement (TR-F005).

    691 GitHub stars~590 tokensUpdated 4 days ago
    Auto-check passed
  • Add React Admin Resource

    talkincode/toughradius

    Add a resource or page in the React Admin management backend (TR-F013).

    691 GitHub stars~429 tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about Document Go APIs

What does Document Go APIs do?

Standard-library-style Go API documentation and comment conventions (TR-F024). Document Go APIs is an agent skill from talkincode/toughradius. Standard-library-style Go API documentation and comment conventions (TR-F024).

When should I use Document Go APIs?

Document Go APIs fits situations like: changing exported Go identifiers; writing package comments; backfilling godoc on a package so it reads like the Go standard library.

How do I install Document Go APIs in Claude Code?

Run `npx skills add talkincode/toughradius --skill document-go-apis -a claude-code`. Or copy the skill folder (.agents/skills/document-go-apis in talkincode/toughradius) into .claude/skills/document-go-apis in your project. Claude Code loads it when a task matches its description.

How do I install Document Go APIs in Codex?

Run `npx skills add talkincode/toughradius --skill document-go-apis -a codex`. Or copy the skill folder (.agents/skills/document-go-apis in talkincode/toughradius) into .agents/skills/document-go-apis in your project. Codex loads it when a task matches its description.

Can I use Document Go APIs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add talkincode/toughradius --skill document-go-apis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/document-go-apis, .gemini/skills/document-go-apis, .github/skills/document-go-apis and .opencode/skills/document-go-apis in your project.

What does Document Go APIs need to run?

Going by SKILL.md and its folder, Document Go APIs needs the command-line tools its instructions call (go).

Does Document Go APIs access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Document Go APIs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Document Go APIs use?

Document Go APIs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Document Go APIs use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Document Go APIs?

Skills that share tags, products or a category with Document Go APIs: Diagram Design (cathrynlavery/diagram-design, 45k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Document Go APIs?

talkincode (a GitHub organization) maintains it in talkincode/toughradius, which has 691 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 3, 2026.

Source: talkincode/toughradius on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.