/golang-skills:go-code-reviewfrom golang-skills
Reviews Go code against community style standards using gofmt, go vet, and golangci-lint. Run before submitting a Go PR or when reviewing Go changes.
Ships in golang-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Compatibility:
references/WEB-SERVER.mduseslog/slogexamples that require Go 1.21+.
assets/review-template.md - Use when formatting review output with Must Fix, Should Fix, and Nits sections.scripts/pre-review.sh - Run before manual review to collect gofmt, go vet, and golangci-lint results.references/WEB-SERVER.md - Read when reviewing an HTTP server that combines concurrency, context, logging, error handling, and shutdown behavior.Use
assets/review-template.mdwhen formatting the output of a code review to ensure consistent structure with Must Fix / Should Fix / Nits severity grouping.
gofmt -d . and go vet ./... to catch mechanical issues firstValidation: After completing the review, re-read the diff once more to verify every flagged issue is real. Remove any finding you cannot justify with a specific line reference.
gofmt or goimports → go-linting_; handle, return, or (exceptionally) panic → go-error-handlingMixedCaps or mixedCaps, never underscores; unexported is maxLength not MAX_LENGTH → go-namingURL/url, ID/id, HTTP/http (e.g., ServeHTTP, xmlHTTPRequest) → go-namingi, r, c); longer names for wider scope → go-namingc for Client); no this, self, me; consistent across methods → go-namingchubby.File not chubby.ChubbyFile); avoid util, common, misc → go-packageserror, string, len, cap, append, copy, new, make → go-declarationsvar t []string (nil) over t := []string{} (non-nil zero-length) → go-data-structures*T methods' receivers by value → go-data-structurescrypto/rand for keys, not math/rand → go-defensivevar/const/type in parenthesized blocks; separate unrelated → go-declarationsvar for intentional zero values; := for explicit assignments → go-declarationsvar for zero structs → go-declarationsany: Prefer any over interface{} in new code → go-declarations/* name */ comments for ambiguous bool/int args, or use custom types → go-functionsf for go vet → go-functionsstring not *string for small fixed-size types → go-performance+ for simple; fmt.Sprintf for formatting; strings.Builder for loops → go-performancelog/slog, not log or fmt.Println for operational logging → go-loggingimport _ "pkg" only in main package or tests → go-packagesExample functions or tests demonstrating usage → go-documentationgot != want → go-testinghttptest.NewServer + real client over mocking HTTP → go-testingRun automated pre-review checks:
bash scripts/pre-review.sh ./... # text output
bash scripts/pre-review.sh --json ./... # structured JSON output
Or manually: gofmt -l <path> && go vet ./... && golangci-lint run ./...
Fix any issues before proceeding to the checklist above. For linter setup and configuration, see go-linting.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cxuu/golang-skills --plugin golang-skills20 skills in this plugin
/go-concurrencyUse when writing concurrent Go code — goroutines, channels, mutexes, or thread-safety guarantees. Also use when parallelizing work, fixing data races, or protecting shared state, even if the user doesn't explicitly mention concurrency primitives. Does not cover context.Context patterns (see go-context)./go-contextUse when working with context.Context in Go — placement in signatures, propagating cancellation and deadlines, and storing values in context vs parameters. Also use when cancelling long-running operations, setting timeouts, or passing request-scoped data, even if they don't mention context.Context directly. Does not cover goroutine lifecycle or sync primitives (see go-concurrency)./go-control-flowOther plugins' skills for the same job