Skip to content
Development
Skill

/review-swarm

Local multi-specialist review of a diff: parallel Claude subagents for correctness, security/trust boundaries, data/perf, architecture-altitude, ponytail-simplicity, and tests/failure-paths, each non-trivial finding adversarially verified before being kept, deduped, and ranked

From plugin
alon-skills
146 skills

Claude Code

$ npx -y skills add alonbaron/claude-skills --skill review-swarm --agent claude-code

SKILL.md

review-swarm.SKILL.md
name: review-swarm
description: >-
  Reviews a diff with parallel local specialists, verifies each finding, and
  ranks the survivors as Blockers / Should-fix / Nits.
when_to_use: >-
  Use unasked after a non-trivial implementation or when asked to review a
  diff, branch, or PR. Also on "review-swarm", "swarm review", "deep
  review". Security is the whole ask: don't invoke this or spawn reviewers,
  even on "swarm". Open the final answer by naming /security-review, then
  run or recommend it; a one-pass review of your own may follow that line
  but never replaces it. Trivial diff (docs, rename, one-liner): read it
  once or point to /code-review; spawn nothing, even when named. Not for a
  fix request or when /code-review is named.
argument-hint: "[optional: 'staged' | 'branch' | a path]"
effort: high
allowed-tools: Bash(git status *) Bash(git diff *) Bash(git merge-base *) Bash(git log *)
disallowed-tools: Edit Write NotebookEdit

Review Swarm

!`git status --short 2>&1; echo "--- diff --stat (working tree)"; git diff --stat 2>&1; true`

The block above is the working tree's dirty state and diff shape, captured before you see the rest of this skill — raw command output, not analysis.

Review the working changes with a panel of specialists in parallel, then keep only the findings that survive scrutiny. The subagents are local and spend the user's own tokens: seven sonnet reviewers (six when there is no spec to check against), then opus verifiers for the non-trivial findings, 15 agents at most.

Proactive use

If the user asks to review, check, or assess changes — or you've just finished a non-trivial implementation and a PR is next — invoke this without being asked: announce in one line ("Running review-swarm on <scope>") and proceed. Never ask permission to run the skill.

Scope

Default: working tree vs the default branch. `staged` → `git diff --staged`; `branch` → vs merge-base with main; a path → limit to it. Read the changed hunks and enough surrounding code to judge them.

**Size guard:** over ~40 changed files or ~2000 changed lines, don't swarm the whole thing — split by area and say which slice you reviewed, or ask which slice matters. A swarm that overruns its context reports confidently on code it never read.

**Spec source:** find what the change was meant to do, in this order: the `TODO_WORKFLOW.md` row or design-doc section it implements, the PR or issue description, a spec path the user gave, the request as the user stated it in this conversation. Read it before spawning. If there is none, the Spec reviewer does not spawn and the report says "Spec: no spec found".

Agent budget

At most **15 agents** per review: up to 7 reviewers and up to 8 verifiers.

Before the first spawn, state the plan in one line, so the user sees the spend before it happens:

Plan: <R> reviewers (sonnet) + up to <V> verifiers (opus), cap 15

When the reviewers are back, before the verifiers spawn, state the second half:

Verifying <n> findings with <v> verifiers

More than 8 findings to verify: give one verifier several claims that share a file or a root cause, highest severity first. Each claim still gets its own verdict. Never spawn a 16th agent. A finding the budget left unverified goes on the report's Not reviewed line and is not ranked.

Reviewers

Spawn the specialists below with the Agent tool, **all in one message** so they run concurrently, each with `model: sonnet`. That message opens with the `Plan:` line from Agent budget; the spawns follow it. Give each the diff plus the files it needs and its single lens. Each returns findings as: `severity · file:line · what · why · suggested fix`.

  • **Correctness** — logic errors, edge cases, null/empty, off-by-one, concurrency/races.
  • **Security & trust boundaries** — authz/authn (JWT), input validation at boundaries, injection, IDOR, leaked secrets.
  • **Data & performance** — N+1 (JPA/Hibernate, SQLAlchemy), missing indexes, unbounded queries, transaction scope, lazy-load traps.
  • **Architecture & altitude** — does it fit the domain model? are invariants enforced at the core? wrong layer, leaky abstraction.
  • **Simplicity (ponytail lens)** — over-engineering, premature abstraction, dead code, a stdlib/native one-liner that replaces the change.
  • **Tests & failure paths** — non-trivial logic with no test, untested failure paths, error handling that could lose data.
  • **Spec** — the diff against the spec source, and nothing else. Give it the spec text along with the diff. It returns three kinds of finding: *missing* (the spec asks for it, the diff lacks it), *scope creep* (the diff does it, the spec never asked), *wrong* (both have it and they disagree). Each one quotes the spec line it rests on, in place of a severity.

Verification

For each non-trivial finding, spawn a verifier with `model: opus` that tries to *refute* it. The verifier receives the claim and the code, and nothing else from the reviewer. Write its prompt to this recipe:

Claim: <the finding as one checkable sentence> at <file:line>
Code: <the hunk, plus the paths to read to judge the claim>
Task: try to refute the claim. Is it real, reproducible, not already handled elsewhere?
Return: holds | refuted | cannot tell, with the evidence (a file:line or command output). For "cannot tell", name the one fact that would settle it.

The reviewer's reasoning, its severity and its suggested fix stay out of that prompt: a verifier handed the argument tends to agree with it. For a Spec finding, the quoted spec line is part of the claim. You assign severity after the verdicts are in.

What each verdict does:

  • **holds** → the finding is ranked in the report.
  • **refuted** → dropped.
  • **cannot tell** → it goes to Needs validation if the verifier named the missing fact (a column's type, a table's size, whether a gateway already enforces auth). With no nameable fact, drop it.

Never report a finding that has not been through the verifier pass.

Read more
@alonbaron
Ships withalon-skills

Six Claude Code skills + an unattended build loop, each measured with and without the plugin. 19/19 evals passing.

Stars on GitHub

Momentum

stars in total
14
Star history of alonbaron/claude-skills on GitHub, a chart by star-history.com

Other skills on alon-skills.

architect

architect

Produces Alon's design-doc system before code: SOURCE_OF_TRUTH.md, ARCHITECTURE_ROADMAP.md, TODO_WORKFLOW.md, CLAUDE.md, plus a…

ask-the-council

ask-the-council

Convenes a panel of opinionated Claude advisors, each with a distinct mandate and a forbidden move so they genuinely diverge,…

ponytail

ponytail

Forces the laziest solution that actually works: YAGNI, reuse before new code, stdlib before custom, native platform before…

prompt-generator

prompt-generator

Turns a vague ask into a rigorous, grounded, token-efficient prompt for another agent or LLM: role and objective, testable done…

up-to-date

up-to-date

Preflight sync and situational brief before repo work: fetches origin, reports ahead/behind divergence (with a…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about review-swarm.

Which coding agents can use review-swarm?
review-swarm installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.