go-documentation
Go documentation conventions: godoc comments, package docs, testable Example functions, deprecation notices, doc links, and project docs (README, CHANGELOG…
Skill by eduardo-sl
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/eduardo-sl-go-documentation
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/go-documentation
Tools it pre-approves 7
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadEditWriteGlobGrepBash(go:*)Bash(gofmt:*)
What's inside
- Skill name
go-documentation- Description
- 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).
- License
- MIT
- Compatibility
- Designed for Claude Code or similar AI coding agents working on Go projects. Requires the Go toolchain.
- Allowed tools
- Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*)
- Metadata
- author: eduardo-sl · version: 1.2.1
- Instructions
- 174 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (2)
- SKILL.md
- project-docs.md · references/
SKILL.md (first lines)
# Go Documentation
Godoc is not free-form prose — it's a convention the toolchain renders.
Comments that follow the convention become browsable documentation on
pkg.go.dev; comments that don't become noise.
> Community default. A project skill or agent-config rule that explicitly
> supersedes `go-documentation` takes precedence over this one.
Detailed reference material, loaded on demand:
- `references/project-docs.md` — README templates for libraries and
services, CHANGELOG, llms.txt, CONTRIBUTING.
Read a reference file only when the summary below is not enough.
## 1. Doc Comment Form
Every exported identifier gets a doc comment. It starts with the
identifier's name and is a complete sentence:
```go
// ✅ Good
// ParseDuration parses a duration string such as "300ms" or "2h45m".
// It returns an error if the string is not a valid duration.
func ParseDuration(s string) (Duration, error) { ... }
// ❌ Bad — doesn't start with the name, fragment, restates signature
// this function parses durations
func ParseDuration(s string) (Duration, error) { ... }
```
- Groups of related constants/variables may share one comment on the
block: `// Common HTTP methods.` above the `const (...)` group.
- Unexported identifiers: comment when the purpose isn't obvious from
the name — same form, no obligation.
- Say what the caller needs: behavior, error conditions, nil/zero-value
handling, concurrency safety. Not the implementation.
## 2. Package Documentation
One package comment per package, on the `package` clause. For more than
a few sentences, put it in a dedicated `doc.go`:
```go
// Package retry implements backoff strategies for retrying failed
// operations.
//
// The zero value of Policy retries three times with exponential
// backoff. Use functional options to customize:
//
// p := retry.NewPolicy(retry.WithMaxAttempts(5))
// err := p.Do(ctx, fetchUser)
package retry
```
- Begins with "Package <name> ...".
- Indented lines (one tab) render as code blocks.
- `main` packages: the comment describes the command and its flags —
it becomes the command's documentation.
## 3. Doc Links and Formatting (Go 1.19+)
```go
// Fetch retrieves the resource. It honors the deadline of ctx and
// returns [ErrNotFound] if the resource does not exist.
//
// For batch retrieval use [Client.FetchAll]. See the [net/http]
// package for transport configuration.
func (c *Client) Fetch(ctx context.Context, id string) (*Resource, error)
```
- `[Name]`, `[Type.Method]`, `[pkg/path]` become hyperlinks on pkg.go.dev.
- A line starting with `# ` is a heading (rare; only in long package docs).
- Lists: lines starting with a space and a bullet. Keep them shallow.
## 4. Testable Examples
Example functions are documentation the compiler checks. Put them in
`example_test.go` in the `<pkg>_test` package:
```go
func ExampleParseDuration() {
d, _ := ParseDuration("1h30m")
fmt.Println(d.Minutes())
// Output: 90
}
// Method example: ExampleType_Method
func ExamplePolicy_Do() { ... }
// Second example for the same symbol: suffix
func ExampleParseDuration_negative() { ... }
```
- The `// Output:` comment makes it a test — `go test` fails if the
printed output differs. Examples without it compile but don't run.
- Write an example for every non-trivial exported API. It renders
directly under the symbol on pkg.go.dev.
## 5. Deprecation
```go
// Fetch retrieves the resource.
//
// Deprecated: Use [Client.FetchContext] instead, which honors
// context cancellation.
func (c *Client) Fetch(id string) (*Resource, error)
```
- The paragraph must start exactly with `Deprecated: `.
- Always name the replacement.
- Tools (gopls, staticcheck, pkg.go.dev) surface these automatically.
## 6. What NOT to Write
```go
// ❌ Noise — restates the code
// GetName returns the name.From eduardo-sl/go-agent-skills, MIT.
More from eduardo-sl/go-agent-skills
- 0.676score
go-cli
eduardo-sl
Build command-line tools in Go: flag handling, subcommands, stdin/stdout discipline, exit codes, signal handling, and when Cobra/Viper earn their weight over…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-naming
eduardo-sl
Go naming conventions for packages, files, types, functions, methods, receivers, variables, constants, errors, acronyms and tests, grounded in Effective Go…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-graphql
eduardo-sl
Build GraphQL servers in Go with gqlgen: schema-first generation, resolver structure, the N+1 problem and dataloaders, complexity and depth limits, error…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-grpc
eduardo-sl
gRPC services in Go beyond the basics: proto design, status codes and error details, interceptors, deadlines, streaming, health checks, and graceful shutdown.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-interface-design
eduardo-sl
Go interface design patterns: implicit interfaces, consumer-side definition, interface compliance verification, composition, the…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-api-design
eduardo-sl
HTTP/REST API design for Go services: handlers, ServeMux routing, middleware, request validation, pagination, idempotency, health checks, error responses, and…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-coding-standards
eduardo-sl
Go coding standards and style conventions grounded in Effective Go, Go Code Review Comments, and production-proven idioms.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-context
eduardo-sl
Correct usage of context.Context in Go: propagation, cancellation, timeouts, deadlines, values, and common anti-patterns.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-data-structures
eduardo-sl
Correct use of Go's built-in data structures: slices (nil vs empty, append semantics, aliasing, preallocation), maps (comma-ok, sets, iteration order)…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-error-handling
eduardo-sl
Go error handling patterns, wrapping, sentinel errors, custom error types, and the errors package.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-modernize
eduardo-sl
Modernize Go code to use current language features and standard library additions, Go 1.21 through 1.27: generics and generic methods, log/slog, errors.Join…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-database
eduardo-sl
Database patterns for Go services: database/sql, connection management, transactions, migrations, query builders, and ORM usage (sqlc, GORM, ent).
SkillAFreshness: A★ 82Claude Code +9
Signals
- Stars
- 82
- Forks
- 10
- Open issues
- 0
- Last commit (this folder)
- Oct 14, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.2.1
- License
- MIT
- Repository
- github.com/eduardo-sl/go-agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from eduardo-sl
- 0.676score
go-cli
eduardo-sl
Build command-line tools in Go: flag handling, subcommands, stdin/stdout discipline, exit codes, signal handling, and when Cobra/Viper earn their weight over…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-api-design
eduardo-sl
HTTP/REST API design for Go services: handlers, ServeMux routing, middleware, request validation, pagination, idempotency, health checks, error responses, and…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-graphql
eduardo-sl
Build GraphQL servers in Go with gqlgen: schema-first generation, resolver structure, the N+1 problem and dataloaders, complexity and depth limits, error…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-grpc
eduardo-sl
gRPC services in Go beyond the basics: proto design, status codes and error details, interceptors, deadlines, streaming, health checks, and graceful shutdown.
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-interface-design
eduardo-sl
Go interface design patterns: implicit interfaces, consumer-side definition, interface compliance verification, composition, the…
SkillAFreshness: A★ 82Claude Code +9 - 0.676score
go-coding-standards
eduardo-sl
Go coding standards and style conventions grounded in Effective Go, Go Code Review Comments, and production-proven idioms.
SkillAFreshness: A★ 82Claude Code +9
Cite this page
go-documentation skill. Agent Mart. https://agentmart.dev/skills/eduardo-sl-go-documentation (last updated 2026-10-24)