A Claude Code plugin bundling three skills that review Go code against Google's Go Style Guide framework.
Each skill maps to one of Google's three official Go style documents and runs as a parallel fan-out of subagents — one per rule (or per section, for the bigger doc) — so reviews stay focused and the main context stays small. All three skills are explicit-only (no auto-trigger on .go files); you choose when to apply Google's opinionated rules.
| # | Skill | Source | Invocation | Coverage |
|---|---|---|---|---|
| 1 | guide-review |
Style Guide — canonical, normative ("non-negotiable") | /google-go-styleguide:guide-review |
5 principles + 5 guidelines (gofmt, MixedCaps, line length, naming, local consistency) |
| 2 | decisions-review |
Style Decisions — normative-but-subordinate concrete decisions | /google-go-styleguide:decisions-review |
7 sections × ~50 rules (naming, commentary, imports, errors, language, common libraries, useful test failures) |
| 3 | best-practices-review |
Best Practices — auxiliary advisory patterns | /google-go-styleguide:best-practices-review |
12 sections × ~50 sub-rules (naming, package size, imports, error handling, documentation, variable declarations, function arguments, complex CLIs, tests, string concatenation, global state, interfaces) |
The split mirrors how Google itself frames the docs:
Style Guide > Style Decisions > Best Practices
Where they conflict, the higher-precedence document wins. The skills inherit that hierarchy — guide-review flags hard rules, decisions-review flags concrete choices, best-practices-review flags soft recommendations.
This repo doubles as a Claude Code plugin marketplace (.claude-plugin/marketplace.json) — so it's also installable via the official /plugin install flow. Three install paths, in order of recommendation:
Inside any Claude Code session, run:
/plugin marketplace add andrsj/google-go-styleguide
/plugin install google-go-styleguide@andrsj-skills
/reload-plugins
The plugin is registered globally (user scope by default), available in every project. Skills appear namespaced as /google-go-styleguide:guide-review, /google-go-styleguide:decisions-review, /google-go-styleguide:best-practices-review.
To pull updates, run /plugin marketplace update andrsj-skills + /reload-plugins. Claude Code only re-fetches plugin code when plugin.json's version field has increased — so marketplace update only re-pulls on a version bump, not on every repo commit. To force a refresh regardless of version, uninstall and reinstall.
If you've cloned the repo locally and want to iterate on skill files with instant feedback, start Claude Code with --plugin-dir pointing at the clone:
git clone https://github.com/andrsj/google-go-styleguide.git
claude --plugin-dir ./google-go-styleguideEdits to any skill file pick up live with /reload-plugins — no re-install needed.
If you only want one of the skills and don't care about the plugin namespace:
git clone https://github.com/andrsj/google-go-styleguide.git
cp -R google-go-styleguide/skills/guide-review ~/.claude/skills/
# Repeat for decisions-review and best-practices-review as needed.The skill then activates as /guide-review (un-namespaced).
- You ask Claude to "review with Google Style Guide" (or
/google-go-styleguide:guide-review, etc.). - The chosen skill identifies the
.gofiles in scope. - For each
actionablerule (or section), the skill dispatches a subagent in parallel with just that one rule file and the file list. - Each subagent loads only its own rule/section file, reads the code, and returns findings as
<file>:<line> — <observation>orno findings. - The main agent groups results by rule and produces the final report.
This keeps the main context small (each rule file is loaded only inside its own subagent) and each check focused on a single principle. You can also ask for a partial review (e.g. "only check #initialisms and #in-band-errors") or a single-rule explanation.
Each skill follows the same shape:
skills/<skill-name>/
├── SKILL.md # frontmatter + index + review workflow
└── <content-dir>/ # principles/, guidelines/, or sections/
└── NN-<slug>.md # one file per rule (guide-review) or per section (decisions-review)
See each skill's SKILL.md for the full rule index and review instructions.
Every rule is tagged with one of three categories:
| Category | Behaviour during review |
|---|---|
actionable |
Subagent generates per-line findings |
tooling |
Subagent verifies the tool is wired up (e.g. gofmt in CI), no per-line findings |
philosophical |
Skipped during review; informs judgement and is referenced in finding rationale |
All rule content is synthesized from official Google documentation. Every rule file lists its primary sources at the bottom. Top-level sources used across the plugin:
- Google Go Style Guide — Skill 1 source
- Google Go Style Decisions — Skill 2 source
- Google Go Best Practices — Skill 3 source
- Effective Go
- Go Specification
- Identifier naming (Google Testing Blog)
gofumpt— referenced inguide-review's#06 Formattinggo-cmp— referenced indecisions-review's#types-of-equality
- Sister plugin/skill:
go-proverbs-review— reviews against Rob Pike's Go Proverbs. Different lens, complementary findings.
MIT — see LICENSE.