/uber-go-styleguide:reviewfrom uber-go-styleguide
Use when reviewing Go code against Uber's Go Style Guide (https://github.com/uber-go/guide). Activates on explicit request ("review with Uber Go guide", "/uber-go-styleguide:review") — does NOT auto-trigger on `.go` files. Flags violations and groups findings by section, each tied to a detailed rule file under `guidelines/`, `performance/`, `style/`, `patterns/`, or `linting/`.
Ships in uber-go-styleguide. 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.
Code review skill wrapping Uber's Go Style Guide — a pragmatic, opinionated guide covering common Go pitfalls in interfaces, concurrency, error handling, performance, and style. 59 rules are organized into 5 sections. Each rule file is copied verbatim from the pinned Uber source; see ../../UBER_SOURCE.md.
[!NOTE] This skill complements (does not replace) the sibling
google-go-styleguideandgo-proverbs-reviewplugins. Uber's guide is more opinionated than Google's Style Guide on several points (e.g.go.uber.org/atomic,channel-size, start enums at 1). Where they conflict, treat each as independent lenses and decide case-by-case.
/uber-go-styleguide:review#error-wrap" / "does this violate #channel-size?") — load the matching rule file directlyThis skill does not auto-activate on .go files. Uber's guide is opinionated; the user should choose when to apply it.
Reviews run as a parallel fan-out of subagents, one per section (not one per rule). Each section subagent reasons coherently about all rules in its topic — so the errors subagent sees error-type, error-wrap, error-name, and error-once together instead of fragmenting tightly coupled rules across separate dispatches.
[!IMPORTANT] Before any subagent fan-out, ASK the user which model to use for the per-section subagents:
opus(highest quality, slowest),sonnet(balanced), orhaiku(cheapest, fastest). Wait for their answer — do not pick for them. Pass the chosen model name to every dispatched subagent via the Task tool'smodelparameter.Skip this step only for the Single-rule question flow below — it loads one rule file directly in the main thread, no subagents.
actionable section in the index, dispatch a subagent with:
guidelines/, style/).go file paths to review.md file in that folder, read the code, and return findings in the format <file>:<line> — <rule-slug> — <one-sentence observation> or the literal string no findingstooling section (linting/), dispatch a single subagent that verifies the project has a golangci-lint config consistent with Uber's recommendations (see linting/lint.md) and returns pass/fail — no code findings.philosophical items (intro.md and performance/performance.md) entirely — they inform judgment, not findings.If the user asks to check a specific section ("only Style and Errors") or specific rules ("only #channel-size and #goroutine-forget"), dispatch only the relevant section subagents — and instruct each to focus on the requested rules within its folder.
If the user asks about one rule specifically ("explain #functional-option" / "does this code violate #container-capacity?"), skip the subagent fan-out: load the single rule file directly in the main thread and answer.
| Category | Meaning |
|---|---|
actionable | Generates findings during review |
tooling | Verify the tool is wired up (golangci-lint), don't flag code |
philosophical | Informs judgment, no findings emitted |
intro.md — guide intro, framing, and how Uber applies it. Skipped during review; informs judgment.
guidelines/ — the bulk of Uber's opinionated rules: interfaces, concurrency, error handling, globals, init/exit, struct tags.
#interface-pointer — Pointers to Interfaces#interface-compliance — Verify Interface Compliance#interface-receiver — Receivers and Interfaces#mutex-zero-value — Zero-value Mutexes are Valid#container-copy — Copy Slices and Maps at Boundaries#defer-clean — Defer to Clean Up#channel-size — Channel Size is One or None#enum-start — Start Enums at One#time — Use "time" to handle time#error-type — Error Types#error-wrap — Error Wrapping#error-name — Error Naming#error-once — Handle Errors Once#type-assert — Handle Type Assertion Failures#panic — Don't Panic#atomic — Use go.uber.org/atomic#global-mut — Avoid Mutable Globals#embed-public — Avoid Embedding Types in Public Structs#builtin-name — Avoid Using Built-In Names#init — Avoid init()#exit-main — Exit in Main#exit-once — Exit Once#struct-tag — Use field tags in marshaled structs#goroutine-forget — Don't fire-and-forget goroutines#goroutine-exit — Wait for goroutines to exit#goroutine-init — No goroutines in init()performance/ — micro-optimizations Uber considers worth the ink.
performance.md (section intro, philosophical — skip)#strconv — Prefer strconv over fmt#string-byte-slice — Avoid repeated string-to-byte conversions#container-capacity — Prefer Specifying Container Capacitystyle/ — formatting, naming, declarations, struct initialization, imports, nesting.
#line-length — Avoid overly long lines#consistency — Be Consistent#decl-group — Group Similar Declarations#import-group — Import Group Ordering#package-name — Package Names#function-name — Function Names#import-alias — Import Aliasing#function-order — Function Grouping and Ordering#nest-less — Reduce Nesting#else-unnecessary — Unnecessary Else#global-decl — Top-level Variable Declarations#global-name — Prefix Unexported Globals with _#struct-embed — Embedding in Structs#var-decl — Local Variable Declarations#slice-nil — nil is a valid slice#var-scope — Reduce Scope of Variables#param-naked — Avoid Naked Parameters#string-escape — Use Raw String Literals to Avoid Escaping#struct-field-key — Use Field Names to Initialize Structs#struct-field-zero — Omit Zero Value Fields in Structs#struct-zero — Use var for Zero Value Structs#struct-pointer — Initializing Struct References#map-init — Initializing Maps#printf-const — Format Strings outside Printf#printf-name — Naming Printf-style Functionspatterns/ — reusable Go patterns Uber endorses.
#test-table — Test Tables#functional-option — Functional Optionslinting/ — the golangci-lint suite Uber recommends.
#lint — Linting (verify config presence, no per-line findings)Group findings under each section, with the rule slug noted on each finding:
### Section N — <section name>
- path/to/file.go:42 — `#rule-slug` — <one-sentence finding>
- path/to/file.go:87 — `#other-slug` — <one-sentence finding>
See: <section>/<rule-slug>.md
End the review with a summary line: total findings, number of distinct rules violated, files touched.
../../UBER_SOURCE.md../../LICENSE and ../../NOTICE)guidelines/atomic.md (opens in a new tab)guidelines/builtin-name.md (opens in a new tab)guidelines/channel-size.md (opens in a new tab)guidelines/container-copy.md (opens in a new tab)guidelines/defer-clean.md (opens in a new tab)guidelines/embed-public.md (opens in a new tab)guidelines/enum-start.md (opens in a new tab)guidelines/error-name.md (opens in a new tab)guidelines/error-once.md (opens in a new tab)guidelines/error-type.md (opens in a new tab)guidelines/error-wrap.md (opens in a new tab)guidelines/exit-main.md (opens in a new tab)guidelines/exit-once.md (opens in a new tab)guidelines/global-mut.md (opens in a new tab)guidelines/goroutine-exit.md (opens in a new tab)guidelines/goroutine-forget.md (opens in a new tab)guidelines/goroutine-init.md (opens in a new tab)guidelines/init.md (opens in a new tab)guidelines/interface-compliance.md (opens in a new tab)guidelines/interface-pointer.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
uber-go-styleguide@andrsj-skills is listed by andrsj/andrsj-skills — review the source before installing
npx claudepluginhub andrsj/andrsj-skills --plugin uber-go-styleguide