go
Installation
SKILL.md
Go
Workflow
- Confirm Go version, module layout, and package boundaries (
go env,go list,go mod tidywhen appropriate). - Apply idiomatic Go style and naming (gofmt/goimports, no stutter, small packages).
- Handle errors explicitly and consistently (wrapping,
errors.Is/As, no panic for expected errors). - Validate context usage, cancellation/timeouts, and resource cleanup (files, HTTP bodies, goroutines).
- Review concurrency for races, leaks, and lifecycle management.
- Add/update tests and validate with
go test,go vet, and-racewhen relevant.
Preflight (Ask / Check First)
- Target Go version (from
go.modand CI). - Confirm
go/toolchaindirectives are intentional for reproducible builds across dev and CI. - Package boundaries and public API surface (exported identifiers).
- Whether this is library code vs service code (logging, config, main).
- Concurrency model: goroutines per request? background workers? cancellation?