lang-golisted
Install: claude install-skill StielChancellor/VibeGod-Tech-Team
# Go — idiomatic & safe
The language lens for Go work. Backs the build agents at Stage 6. Honors
`_shared/vibegod-principles.md` (simplicity, surgical, no silent error-swallowing, consistency,
cost-awareness). Defer security depth to `secure-coding` and test discipline to
`test-driven-development`.
## Fits in the pipeline
Stage 6 (Build): write code to this standard. Stage 7 (per-feature QA): the
code-quality-reviewer + security-engineer lenses check it against this skill. Priority:
**user > skills > default.**
## Style & layout
- Standard module layout: `cmd/<bin>/main.go`, `internal/` for non-exported packages, package per
directory named after its dir. Accept interfaces, return concrete types.
- Keep it boring and explicit — no clever generics or reflection unless the problem demands it.
Exported identifiers `CamelCase` with doc comments starting with the name; small interfaces.
- Zero values useful; constructors only when needed. No global mutable state.
## Toolchain (canonical)
- **Format/imports:** `gofmt` / `goimports` (non-negotiable, enforced in CI).
- **Vet/lint:** `go vet ./...` + `staticcheck ./...` (or golangci-lint).
- **Test:** `go test ./...`; **table-driven** tests with subtests (`t.Run`). Run
`go test -race ./...` for any concurrent code.
- **Build:** `go build ./...`; tidy deps with `go mod tidy`, committed `go.sum`.
## Error handling & concurrency
- Errors are values: return `error`, check **every** one — never `_ = f()` to discard an error.
W