sota-golanglisted
Install: claude install-skill martinholovsky/SOTA-skills
# SOTA Go (2026)
Expert-level rules for producing and auditing production Go. Baseline language
version: Go 1.25+, the oldest release still in security support (Go fixes the
last two majors; 1.24 left support with 1.26's release, 2026-02). Feature
notes: loop-var scoping from 1.22, `b.Loop`/`os.Root`/tool directives from
1.24, `testing/synctest` and container-aware GOMAXPROCS from 1.25,
`errors.AsType` and the default-on Green Tea GC from 1.26 — noted where
relevant. Every rule states the *why*; every rules file
ends with an audit checklist of grep/vet/lint patterns.
## Purpose
Two consumers, one source of truth:
- **BUILD mode** — generating new Go code: follow the rules as defaults, not
suggestions. Deviate only with an explicit comment justifying it.
- **AUDIT mode** — reviewing existing Go code: hunt violations using the audit
checklists, classify by severity, report in the finding format below.
## BUILD mode
1. Before writing code, read the rules files relevant to the task (see index).
A service touching HTTP + DB + goroutines needs `03`, `04`, `05`.
2. Apply the **top-10 non-negotiables** (below) unconditionally.
3. New modules: `go mod init` with a real module path; since 1.26 it writes
the previous minor as the `go` directive (e.g. `go 1.25.0`) for ecosystem
compatibility — keep that unless you need newer language features; pin the
`toolchain` directive to the current patch release. Add `golangci-lint`
config and a CI step
running `go vet`,