writing-golisted
Install: claude install-skill alexei-led/cc-thingz
# Go Development
Use only for Go modules. Follow the module's target Go version.
## Read First
Read [principles.md](references/principles.md) before writing, changing, or reviewing Go code. Read conditional references only when the change touches that area.
## Conditional References
- [patterns.md](references/patterns.md) — package layout, interfaces, errors, HTTP/service boundaries, concurrency, comments.
- [testing.md](references/testing.md) — adding or reshaping Go tests.
- [cli.md](references/cli.md) — writing or changing Go CLIs.
## Version-Gated APIs
- Confirm `go.mod`, `toolchain`, CI, and nearby code before using version-specific APIs.
- Go 1.25+: use `sync.WaitGroup.Go` when no error propagation is needed.
- Use existing `errgroup` for goroutine errors or shared cancellation; add it only when the dependency is justified.
- Go 1.25+: use `testing/synctest` for deterministic concurrent tests when available.
- Go 1.25+: prefer stdlib `crypto/hpke` and `testing/cryptotest` over third-party code when they fit.
- Treat `encoding/json/v2` as experimental unless the project opts into `GOEXPERIMENT=jsonv2`.
- Go 1.26+: use `new(expr)` only when clearer than a local variable, composite literal, or address expression.
- Go 1.26+: keep recursive type constraints in generic libraries; keep business logic concrete.
## Verification
Run the project-configured build, tests, lint, vet, and formatting checks. Add race or concurrency-specific checks when the change touches goro