Invoke this skill to systematically review a Go change against community style standards before merging. Walks the diff topic by topic — formatting, errors, naming, concurrency, interfaces, data structures, security, declarations, functions, style, logging, imports, generics, testing — flagging issues with line references and severity (must-fix / should-fix / nit). Apply proactively before any Go PR ships.
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Invoke this skill to systematically review a Go change against community style standards before merging. Walks the diff topic by topic — formatting, errors, naming, concurrency, interfaces, data structures, security, declarations, functions, style, logging, imports, generics, testing — flagging issues with line references and severity (must-fix / should-fix / nit). Apply proactively before any Go PR ships.
user-invocable
true
license
MIT
compatibility
Designed for Claude Code or similar AI coding agents. Examples assume Go 1.21+ for log/slog references.
A repeatable, opinionated review pass for Go code. Read the diff file by file, walk each topic in order, flag findings with file:line references, then group by severity.
Core Rules
Mechanical checks first. Never start a human review until gofmt, go vet, and golangci-lint are clean. They free your attention for what tools cannot catch.
One file at a time, topic by topic. Walk the diff in order and apply each topic checklist below. Switching topics mid-file loses the thread.
Every finding cites a rule.file:line plus the rule name (go-naming: initialisms) — never a bare opinion.
Severity is non-negotiable. Must-Fix (correctness/security/data-loss/broken contract) blocks merge; Should-Fix (significant design or style issue); Nit (small preference, flag once).
Drop what you cannot defend. After flagging, re-read and remove any finding you would not stand behind in a thread.
Praise non-trivial improvements. A review without acknowledgement teaches only avoidance.
Review Procedure
Run mechanical checks: gofmt -d ./..., go vet ./..., golangci-lint run ./..., go test ./... -race -short.
Read the diff one file at a time. For each file, walk the topic checklists below in order.
Flag every issue with file:line and the rule name that justifies it.
After all files are reviewed, re-read flagged items and drop any you cannot justify.
Group findings by Must Fix / Should Fix / Nit using the rubric below.
gofmt -l ./... && go vet ./... && golangci-lint run ./... && go test ./... -race -short
Fix anything the tools find before continuing. See go-linting for setup.
Formatting
gofmt/goimports clean; long lines break by semantics, not column count
Documentation
Exported symbols documented (starts with name, ends with .); package comment adjacent to package clause; non-trivial unexported have intent comments; named returns only when they clarify
No else after a returning/breaking/continuing if; no := shadowing of outer ctx/err; map iteration is order-agnostic; labeled break/continue for switch-in-loop
File order: type → constructor → exported → unexported → utilities; wrapped signatures one-per-line; no pointer-to-interface; bool/int params renamed via type or commented; printf-style helpers end in f
Defined in the consumer package; not "just for mocking" on the implementor; consistent receivers per type; compile-time var _ I = (*T)(nil) on exported implementations
Goroutine lifetimes clear (bounded by ctx.Done() or documented); APIs synchronous by default; context.Context first param, never struct field; lock order documented; sender closes channels
Example to flag (pkg/worker/worker.go:42):
go s.process(req) // ✗ no ctx, no done signal — leak on shutdown
var t []T for nil slices, []T{} only when empty non-nil is required (JSON output); copies of structs containing sync.Mutex flagged; slice/map at API boundaries copied or borrowing documented