/vocdoni-go:go-code-qualityfrom vocdoni-go
Use this skill for production-grade Go code review, refactor, or generation - the checklist-driven side of Go work. Enforces strong domain modeling (no primitive obsession, no stringly-typed enums), explicit error contracts (return vs panic, %w vs %v, sentinel/typed/predicate errors, handle-once), context-and-cancellation discipline, bounded goroutine lifetimes, consumer-side interfaces, table-driven tests with got/want, and input validation at boundaries. Load this when the task is "review this Go", "is this production-ready", "harden this API", "refactor this package", or when assessing concurrency, error handling, or API design. Companion deep reference loaded on demand from references/go-practices.md.
Ships in vocdoni-go. 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.
Production-oriented Go standards. The shape is: this file is the entry point with workflow + non-negotiables; the deep checklist lives in references/go-practices.md and should be loaded when the task is non-trivial (review, refactor, API design, error/concurrency design, or any case where a detailed rule is needed).
Related skills (load alongside as needed):
slices/maps/cmp, t.Context(), omitzero, b.Loop(), wg.Go(), errors.AsType, etc.).This skill is the one to reach for when the question is "is this code production-ready" or "review this PR".
Classify the task.
Apply this priority order.
gofmt and goimports settle it.Be concrete. No "make it idiomatic." State the rule, why it matters, and the exact change.
Respect local convention. If the repository has an established pattern, follow it unless it's unsafe or clearly broken. Do not invent project conventions that conflict with the surrounding code.
These are the rules to apply by default. The reference file has rationale, examples, and edge cases for each.
string/int/bool parameters when the value has business meaning.type Status string + named constants + a Valid() method and parsing helpers, or an iota enum starting at one so zero means unset.%w only when the underlying error is part of the contract (callers will use errors.Is/errors.As). Use %v or map to a package error when the underlying implementation must remain private.context.Context is explicit and first. Don't store contexts in structs. Don't pass nil._ unless a documented API makes the error impossible or irrelevant — and say so in code.any/interface{} only at boundaries (serialization, truly generic containers, reflection-based APIs). Not as an escape from modeling.WaitGroup/errgroup). No fire-and-forget.got and want, include inputs, and use table-driven subtests when cases share logic.crypto/rand, never math/rand, for tokens, keys, nonces, salts, or any security-sensitive identifier.For everything else — receiver choice, options structs, nil-slice semantics, map/slice copy at trust boundaries, fuzz tests for parsers, the full review checklist, ready-to-reuse review comments — load references/go-practices.md.
Group by severity. Use file:line when available; otherwise identify the function or snippet.
## Must fix
- [file:line] Concrete issue. Why it matters. Suggested replacement.
## Should improve
- [file:line] Maintainability/API/testability issue. Suggested replacement.
## Nice to have
- [file:line] Minor idiom/style improvement.
## Good patterns already present
- Specific positive observations worth keeping.
gofmt-compatible formatting.(T, error) or error returns when failure is possible.Curated from the official Go documentation, Go Code Review Comments, the Go blog's error-handling guidance, Google's Go Style guides, and the Uber Go Style Guide. The detailed source map is at the top of references/go-practices.md.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/go-best-practicesUse this skill for architectural and idiomatic Go decisions - the philosophical side of Go work. Encodes Rob Pike's Go Proverbs ("share memory by communicating", "the bigger the interface the weaker the abstraction", "errors are values", "clear is better than clever", "Cgo is not Go", etc.) as concrete guidance with rationale and examples. Trigger on "is this idiomatic", "should I use a channel or a mutex", "small vs large interface", "should I use Cgo / unsafe / reflect", "is this the Go way", or whenever a design call hinges on Go philosophy rather than a concrete checklist. For production-readiness review and the rule-by-rule checklist (domain types, error contracts, context discipline, goroutine lifetimes), reach for go-code-quality instead./go-modernUse this skill when writing, reviewing, or refactoring Go code. Detects the project's Go version from go.mod and applies only language features available in that version - modern built-ins like slices/maps/cmp, type-safe atomics, errors.Join, range-over-int, t.Context(), omitzero, b.Loop(), strings.SplitSeq, wg.Go(), new(val), errors.AsType. Avoids both outdated patterns and features from newer-than-target versions.npx claudepluginhub vocdoni/skills --plugin vocdoni-go