From vocdoni-go
Use 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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vocdoni-go:go-best-practicesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Rob Pike's *Go Proverbs* as concrete guidance. Use these as defaults when writing or reviewing Go. Deviation is fine when the situation justifies it, but the deviation should be deliberate.
Rob Pike's Go Proverbs as concrete guidance. Use these as defaults when writing or reviewing Go. Deviation is fine when the situation justifies it, but the deviation should be deliberate.
This file is the index. The 19 proverbs each have rationale and idiomatic code examples in references/proverbs.md. Load the full reference when:
For a quick sanity check or to refresh which proverb is relevant, the one-liners below are usually enough.
Concurrency
Interfaces and types
io.Reader is powerful because it has one method. Many-method interfaces force narrow implementations.var x T is already valid (sync.Mutex, bytes.Buffer, nil slices).interface{} says nothing — The empty interface (or any) tells the reader and the compiler nothing. Keep it at serialization boundaries only.Style and tooling
gofmt's style is no one's favorite, yet gofmt is everyone's favorite — A standard format matters more than personal preferences. Run gofmt/goimports and move on.Cgo, syscall, unsafe
syscall, you should have a build tag. If you're writing portable code, use os instead.unsafe package, there are no guarantees — unsafe opts out of Go's version-stability and memory-safety contracts. Isolate it, document why, accept the cost.Clarity and reflection
Errors
if err != nil { return err }.Design and docs
Panics
Open references/proverbs.md and jump to the proverb by number or by title. Each entry has:
slices/maps/cmp, t.Context(), omitzero, b.Loop(), wg.Go(), errors.AsType, etc.).npx claudepluginhub vocdoni/skills --plugin vocdoni-goProvides 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.