/google-go-styleguide:best-practices-reviewfrom google-go-styleguide
Use when reviewing Go code against Google's Go Best Practices (the auxiliary, non-canonical advisory document with pragmatic guidance for naming, error handling, documentation, variable declarations, function argument lists, complex CLIs, and tests). Activates only on explicit request ("review with Google Go Best Practices", "/google-go-styleguide:best-practices-review") — does NOT auto-trigger on `.go` files. Findings are advisory ("should") rather than prescriptive ("must"); grouped by section, each tied to a detailed file in `sections/`.
Ships in google-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 based on Google's Go Best Practices — the third of Google's three Go style documents. Best Practices is neither normative nor canonical: it's auxiliary guidance that "may not apply in every circumstance." Findings here are recommendations, not rule violations.
[!NOTE] This skill covers Best Practices only. The companion skills
guide-review(canonical Style Guide) anddecisions-review(concrete Style Decisions) cover the other two Google Go Style documents. Where Best Practices conflicts with them, the higher-precedence document wins:Style Guide > Style Decisions > Best Practices
/google-go-styleguide:best-practices-review#error-structure, #option-structure) — load the matching section file directlyThis skill does not auto-activate on .go files. Best Practices is the most opinionated and most context-dependent of the three docs; the user should choose when to apply it.
Same pattern as the sibling decisions-review skill: parallel fan-out of subagents, one per section. Each section file groups all related practices under sub-headings.
[!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 section file directly in the main thread, no subagents.
actionable section in the index, dispatch a subagent with:
sections/NN-*.md file.go file paths to review<file>:<line> — — <one-sentence advisory> or the literal string no findings. Phrase findings as suggestions, not violations.If the user asks to check a specific section ("only error handling and tests"), dispatch only the relevant section subagents.
For "explain #option-structure" / "does this violate #error-structure?", load the single section file directly and answer.
The Best Practices doc explicitly opens with: "This guidance is intended for common situations encountered while authoring Go in the Google codebase. It may not apply in every circumstance." So reports from this skill should phrase findings as recommendations, not violations. A finding here can be discussed and overruled by project context — that's expected.
If the same code is also violating guide-review or decisions-review, those skills' findings take precedence.
| Category | Meaning |
|---|---|
actionable | Generates findings during review (advisory) |
philosophical | Informs judgment, no findings emitted |
%w in errors (with sub-rule: Sentinel error placement)sections/06-variable-declarations.md
sections/07-function-arguments.md
Test functiont.Error vs. t.Fatalt.Fatal from separate goroutinesTestMain, amortizing common test setup)sections/10-string-concatenation.md
+ for simple casesfmt.Sprintf when formattingstrings.Builder for constructing a string piecemealGroup findings under each section, with the rule anchor noted on each finding. Phrase findings as suggestions, not violations:
### Section #N — <section name>
- path/to/file.go:42 — `#rule-anchor` — <suggestion phrased as recommendation>
- path/to/file.go:87 — `#other-anchor` — <suggestion>
See: sections/NN-<slug>.md#<rule-anchor>
End the review with a summary line: total suggestions, number of distinct rules referenced, files touched. Note explicitly that these are advisory (Best Practices is non-canonical); the team may have valid reasons to deviate.
README.md (opens in a new tab)sections/01-naming.md (opens in a new tab)sections/02-package-size.md (opens in a new tab)sections/03-imports.md (opens in a new tab)sections/04-error-handling.md (opens in a new tab)sections/05-documentation.md (opens in a new tab)sections/06-variable-declarations.md (opens in a new tab)sections/07-function-arguments.md (opens in a new tab)sections/08-complex-clis.md (opens in a new tab)sections/09-tests.md (opens in a new tab)sections/10-string-concatenation.md (opens in a new tab)sections/11-global-state.md (opens in a new tab)sections/12-interfaces.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/decisions-reviewUse when reviewing Go code against Google's Go Style Decisions (the normative-but-subordinate document of opinionated style choices — naming, commentary, imports, errors, language constructs, common libraries, and test failures). Activates only on explicit request ("review with Google Go Style Decisions", "/google-go-styleguide:decisions-review") — does NOT auto-trigger on `.go` files. Findings are grouped by section, each tied to a detailed file in `sections/`./guide-reviewUse when reviewing Go code against Google's Go Style Guide (the canonical, normative document). Activates only on explicit request ("review with Google Go Style Guide", "/google-go-styleguide:guide-review") — does NOT auto-trigger on `.go` files. Flags violations and groups findings by rule, each tied to a detailed file in `principles/` or `guidelines/`.google-go-styleguide@andrsj-skills is listed by andrsj/andrsj-skills — review the source before installing
npx claudepluginhub andrsj/andrsj-skills --plugin google-go-styleguide