# Go documentation

> Go documentation is an open-source agent skill for developer tools. Guides Go doc comments, examples, deprecations and project docs for agents. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/eduardo-sl/go-agent-skills/tree/main/skills/(code-quality)/go-documentation
- **Repository:** https://github.com/eduardo-sl/go-agent-skills
- **GitHub stars:** 90
- **License:** MIT
- **Skill name:** go-documentation
- **Collection:** https://github.com/eduardo-sl/go-agent-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill teaches an agent the Go documentation conventions that the toolchain renders on pkg.go.dev. It covers doc comment form, package comments in doc.go, doc links, testable Example functions with Output blocks, and the exact form for Deprecated notices. It also points to templates for READMEs, CHANGELOG entries and llms.txt files, loaded from a reference file only when needed.

The workflow centers on checking the result. The skill lists verification commands such as go vet, gofmt, go test and go doc, and closes with a checklist covering exported identifiers, error and zero-value behavior, and concurrency notes. It also tells the agent what to avoid, such as comments that only restate the signature, history notes, or commented-out code.

The skill expects a Go project with the Go toolchain installed. Its allowed tools include reading, editing and searching files, plus go and gofmt commands. It defers commit message and code style work to other skills.

## When your agent uses it

> Go documentation conventions: godoc comments, package docs, testable Example functions, deprecation notices, doc links, and project docs (README, CHANGELOG, llms.txt). Use when: "add godoc", "document this package", "write doc comments", "add examples to docs", "deprecate a function", "write a README", "update the changelog", "improve the docs". Not for: commit messages (git-commit), code style (go-coding-standards).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/eduardo-sl/go-agent-skills/tree/HEAD/skills/(code-quality)/go-documentation)
- [Asks for: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*)](https://github.com/eduardo-sl/go-agent-skills/blob/HEAD/skills/(code-quality)/go-documentation/SKILL.md)
- [License: MIT](https://github.com/eduardo-sl/go-agent-skills/tree/HEAD/skills/(code-quality)/go-documentation)

## Features

- **Doc comment form:** Rules for writing godoc comments that start with the identifier name and describe caller-facing behavior.
- **Package documentation:** Guidance on package comments, placing long ones in doc.go, and documenting main packages.
- **Doc links and formatting:** Use of bracketed doc links and code blocks that render as links and formatted text on pkg.go.dev.
- **Testable examples:** Writing Example functions with Output comments so go test verifies documented usage.
- **Deprecation notices:** The exact Deprecated paragraph format, including naming the replacement API.
- **Project docs templates:** Templates and guidance for READMEs, CHANGELOG sections and llms.txt index files.

## Good for

- Add godoc comments to an exported package
- Write example functions for a public API
- Mark an old function as deprecated with a replacement
- Draft a README for a Go library
- Update the CHANGELOG for a new release
- Review doc comments for missing names or error notes

## Install

### Any agent

Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.

## FAQ

### What does the skill need to run?

It requires the Go toolchain. It is designed for Claude Code or similar AI coding agents working on Go projects.

### Does Go documentation cover commit messages or code style?

No. The skill says commit messages belong to git-commit and code style to go-coding-standards.

### How are doc examples checked?

Example functions with an Output comment run under go test, which fails if the printed output differs.

### What is the required form for deprecations?

The paragraph must start exactly with 'Deprecated: ' and name the replacement.

### Does Go documentation run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Go documentation?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Go documentation?

The closest alternatives to Go documentation are Go coding standards, Lean comments, Go semantic tools, Go naming and Go code review.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Go coding standards](https://ai-powered.com/skills/go-coding-standards): Go coding standards is an open-source agent skill for developer tools.
- [Lean comments](https://ai-powered.com/skills/lean-comments): Lean comments is an open-source agent skill for developer tools.
- [Go semantic tools](https://ai-powered.com/skills/go-semantic-tools): Go semantic tools is an open-source agent skill for developer tools.
- [Go naming](https://ai-powered.com/skills/go-naming): Go naming is an open-source agent skill for developer tools.
- [Go code review](https://ai-powered.com/skills/go-code-review): Go code review is an open-source agent skill for developer tools.
- [Documentation structure](https://ai-powered.com/skills/documentation-structure): Documentation structure is an open-source agent skill for developer tools.
- [Go backend](https://ai-powered.com/skills/go-backend): Go backend is an open-source agent skill for developer tools.
- [Go project layout](https://ai-powered.com/skills/go-project-layout): Go project layout is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/go-documentation
