From gophers
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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gophers:go-code-reviewThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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.
gofmt, go vet, and golangci-lint are clean. They free your attention for what tools cannot catch.file:line plus the rule name (go-naming: initialisms) — never a bare opinion.gofmt -d ./..., go vet ./..., golangci-lint run ./..., go test ./... -race -short.file:line and the rule name that justifies it.Use references/review-template.md when writing up the review for consistent severity grouping and tone.
gofmt -l ./... && go vet ./... && golangci-lint run ./... && go test ./... -race -short
Fix anything the tools find before continuing. See go-linting for setup.
gofmt/goimports clean; long lines break by semantics, not column count.); package comment adjacent to package clause; non-trivial unexported have intent comments; named returns only when they clarifySee go-documentation.
_ = f()) without a written justification%w when the caller may want to inspect; %v only when hiding is deliberate-1, "", nil) for failure — multi-return with an error or ok boolSee go-error-handling.
MixedCaps / mixedCaps only — no underscores or SCREAMING_SNAKEURL, ID, HTTP, XMLHTTPRequest, serveHTTPi, r, ctx); longer names for wider scopesthis/self/mehttp.Server, not http.HTTPServer)util, helpers, common, misclen, error, cap, new, make, copy, any)See go-naming and go-packages.
var/const/type are in grouped blocks; unrelated kept separatevar for intentional zero values; := for computed localsiota + 1 (or zero is explicitly meaningful)any instead of interface{} in new codeSee go-declarations.
else after a returning/breaking/continuing if; no := shadowing of outer ctx/err; map iteration is order-agnostic; labeled break/continue for switch-in-loopSee go-control-flow.
fSee go-functions.
var _ I = (*T)(nil) on exported implementationsSee go-interfaces.
ctx.Done() or documented); APIs synchronous by default; context.Context first param, never struct field; lock order documented; sender closes channelsExample to flag (pkg/worker/worker.go:42):
go s.process(req) // ✗ no ctx, no done signal — leak on shutdown
vs. acceptable:
s.wg.Add(1)
go func() { defer s.wg.Done(); s.process(ctx, req) }()
See go-concurrency.
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 documentedSee go-data-structures.
crypto/rand for secret material (never math/rand); no library panic for ordinary failureslog/slog (not log/fmt.Println); static message + structured attrs; secrets and PII never loggedSee go-defensive and go-logging.
main/tests; no dot importsSee go-packages.
See go-generics.
httptest.NewServer over hand-rolled mocks; TestMain only when truly necessary; Example* for non-trivial APIsRead references/integrative-example.md to see the rules applied together on a small HTTP server.
Read references/severity-rubric.md when deciding whether to label a finding must-fix, should-fix, or nit.
| Severity | Examples |
|---|---|
| Must Fix | Race, security bug, swallowed error, broken API, data loss |
| Should Fix | Wrong layer for an interface, panic in a library, leaky goroutine |
| Nit | Name preference, comment phrasing, ordering within a block |
These are reviewer anti-patterns — bad habits to avoid when writing the review itself:
| Anti-pattern | Do this instead |
|---|---|
| "I would have written this differently" | drop it, or cite a concrete rule |
Listing every nit you noticed | flag once, note "× N similar" |
No severity labels; comment without file:line | label Must / Should / Nit; anchor with path:line |
| Reviewing the author, not the code | write about the change, not the person |
| Re-doing the work in the review | point to the rule and let them write it |
| Approving without reading tests | tests are part of the diff |
file:line + a rule citation; no bare opinionsnpx claudepluginhub muratmirgun/gophers --plugin gophersProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.