cxuu avatar

Go Documentation

Ensures your Go packages follow Google's documentation standards with actual enforcement tools. Ships with a check script that flags missing doc comments on exported symbols, plus reference files covering everything from basic doc comment structure to runnable examples. The validation loop is smart: write code, add docs, run the checker, fix gaps. Honestly refreshing to have concrete rules on when to document context cancellation (only exceptions) versus cleanup (always). Includes templates and a lookup table for common decisions like whether to document that parameter or error return. Less guessing, more shipping documented code that doesn't over-explain the obvious.

skills.sh installs
1.3K
GitHub stars
193
last updated
Aug 21, 2026

Install

$ npx -y skills add cxuu/golang-skills --skill go-documentation --agent claude-code

Installs into .claude/skills of the current project.

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 by check-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

  1. Begin with the name of the object being described
  2. An article ("a", "an", "the") may precede the name
  3. 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) { ...

Sponsors

Details

Repository
github.com/cxuu/golang-skills
Categories
Documentation, Code Review & Quality, Go
First seen
May 16, 2026

More from cxuu/golang-skills

All 20
1mlflow avatarsearching-mlflow-docsmlflow/skillsSearches and retrieves MLflow documentation from the official docs site. Use when the user asks about MLflow features, APIs, integrations (LangGraph, LangChain,1.1Kskills.sh installs
2davila7 avatarscikit-learndavila7/claude-code-templatesMachine learning in Python with scikit-learn. Use when working with supervised learning (classification, regression), unsupervised learning (clustering, dimensi944skills.sh installs
3oracle avatarnetsuite-sdf-project-documentationoracle/netsuite-suitecloud-sdkGenerate enterprise-grade documentation for NetSuite SDF projects. Analyze scripts, object XML files, `manifest.xml`, and SuiteQL queries to produce README.md, 895skills.sh installs
4jim60105 avatarchinese-content-writing-guidelinejim60105/copilot-promptWriting guidelines for producing high-quality Traditional Chinese (zh-TW) content. Use when writing any kind of content. Including blog posts, notes, technical 835skills.sh installs
5softaworks avatarbackend-to-frontend-handoff-docssoftaworks/agent-toolkitCreate API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for frontend integration, or user says 'c821skills.sh installs
6boshu2 avatarreadmeboshu2/agentopsDraft or improve README docs.751skills.sh installs