golang
Installation
SKILL.md
Go
Simplicity is the highest Go virtue. Resist abstraction until the cost of not abstracting is proven.
References
Extended examples, code patterns, and detailed rationale for the rules below live in
${CLAUDE_SKILL_DIR}/references/.
| Topic | Reference | Contents |
|---|---|---|
| Naming, declarations, interfaces, receivers, configuration, embedding | [${CLAUDE_SKILL_DIR}/references/idioms.md] |
Extended code examples for each idiom, Go/bad vs good comparisons, decision criteria tables |
| Variable shadowing, defer traps, slice mutation, strings, copy safety | [${CLAUDE_SKILL_DIR}/references/gotchas.md] |
Annotated code showing each pitfall with fix patterns, global state examples |
| Error creation, wrapping, Is/As, structured errors (golib/e) | [${CLAUDE_SKILL_DIR}/references/errors.md] |
Error type decision tree, golib/e API (sentinels, fields, logging), wrapping context examples |
| Goroutines, channels, context, sync, errgroup, data races | [${CLAUDE_SKILL_DIR}/references/concurrency.md] |
Worker lifecycle patterns, pipeline/fan-out/fan-in code, data race scenarios with fixes |
| Table tests, subtests, assertions, test doubles, benchmarks | [${CLAUDE_SKILL_DIR}/references/testing.md] |
Full table-test template, testify usage, parallel subtests, httptest/iotest utilities |
| Project layout, packages, imports, file organization | [${CLAUDE_SKILL_DIR}/references/structure.md] |
Package naming examples, import grouping, backward-incompatible change staged workflow |