From 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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vocdoni-go:go-code-qualityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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).
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.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub vocdoni/skills --plugin vocdoni-go