golang-implementation-idioms

Installation
SKILL.md

Go Implementation Idioms

Build Workflow

  1. Prefer straightforward code over abstraction. Make the happy path read down the page by handling errors early.
  2. Use the standard library idioms already present in the repo: context, errors, fmt, io, testing, slog, net/http, and so on.
  3. Keep names short but explanatory at their scope. Avoid package-name stutter in exported identifiers.
  4. Wrap errors with context using %w when callers need errors.Is or errors.As.
  5. Accept small interfaces and return concrete types. Avoid pointers to interfaces.
  6. Use type parameters for real type relationships; do not use generics to avoid writing clear domain code.
  7. Treat nil carefully: nil slices are usually fine for empty collections; maps must be made before writes.
  8. Document exported packages, types, functions, methods, and non-obvious behavior for users.
  9. Run gofmt/goimports after edits and keep generated code separate.

Audit Workflow

Installs
1
First Seen
Sep 15, 2026