
Go Documentation
Structured guide for writing Go doc comments, with a validation script for exported symbols and package comments.
- skills.sh installs
- 1.3K
- GitHub stars
- 196
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers doc comment basics, comment sentence rules, line length, struct field grouping, and package comments, with an advisory table on what to document
- Includes
scripts/check-docs.sh, which runs an AST helper to flag exported symbols missing doc comments, plus templates and references for examples and formatting - Enforces one package comment per package and requires doc comments on every top-level exported name
- Designed for Go developers writing or reviewing exported APIs, and for agents creating new exported types, functions, or packages
Install
$ npx -y skills add cxuu/golang-skills --skill go-documentation -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Go Documentation
Resource Routing
scripts/check-docs.sh- Run when checking exported functions, types, methods, constants, and packages for missing doc comments.scripts/check-docs-ast.go- Implementation helper invoked bycheck-docs.sh; patch this when changing documentation analysis behavior.assets/doc-template.go- Use when starting a documented package or exported API.references/CONVENTIONS.md- Read when documenting parameters, context behavior, concurrency safety, cleanup, errors, or named results.references/EXAMPLES.md- Read when adding runnable examples or package examples.references/FORMATTING.md- Read when formatting Godoc lists, paragraphs, links, and code blocks.
Doc Comments
Normative: All top-level exported names must have doc comments.
Basic Rules
- Begin with the name of the object being described
- An article ("a", "an", "the") may precede the name
- Use full sentences (capitalized, punctuated)
// A Request represents a request to run a command.
type Request struct { ...
// Encode writes the JSON encoding of req to w.
func Encode(w io.Writer, req *Request) { ...
Details
- Repository
- github.com/cxuu/golang-skills
- Categories
- Go, Technical Documentation
- First seen
- May 16, 2026
More from cxuu/golang-skills
All 20- Go Style Core1.3K
- Go Performance1.3K
- Go Context1.3K
- Go Naming1.3K
- Go Defensive1.3K
- Go Packages1.3K
- Go Functional Options1.3K
- Go Data Structures1.3K
- Go Control Flow1.3K
- Go Logging1.1K
- Go Functions1.1K
- Go Generics1.1K
- Go Declarations1.1K
- Go Code Review1.8K
- Go Testing1.4K
- Go Error Handling1.4K
- Go Concurrency1.4K
- Go Linting1.4K
- Go Interfaces1.4K
Similar to Go Documentation
More Go
go-code-reviewcxuu/golang-skills1.8K installsGo code review checklist covering formatting, errors, naming, concurrency, interfaces, and security checks with tooling.
go-namingcxuu/golang-skills1.3K installsGo naming rules for packages, types, functions, variables, and receivers, with a checker script and reference docs.
golang-documentationsamber/cc-skills-golang42.4K installsGo documentation skill covering godoc comments, README, CHANGELOG, Example tests, and llms.txt for libraries and CLIs.
code-documentationmoizibnyousaf/ai-agent-skills571 installsStructured guide for writing code documentation covering READMEs, API references, inline comments, and architecture records.
api-documentationbobmatnyc/claude-mpm-skills394 installsBest-practice guide for documenting APIs and code interfaces, with per-language docstring examples.
documentation-engineerzhaono1/agent-playbook630 installsStructured guide for writing READMEs, API docs, code comments, and architecture docs with a documentation checklist.