agentleFS
alonbaronalonbaron/claude-skills/skills/review-swarm/SKILL.md

review-swarm

Skill12 starsChanged 2 months agoMITView on GitHub

Local, free, 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 into a Blockers / Should-fix / Nits report with file:line and a one-line fix per item.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. Dimillian/Skills★ 4ksame name
    2. hoatv2211/GameStudio-CodexKIT★ 3same name
    3. ReinaMacCredy/Skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    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 …

    line 34
  2. Very specific:

    Default: working tree vs the default branch.

    line 38
  3. Very specific:

    Every finding cites a real file:line from the diff.

    line 67
  4. Very specific:

    Don't fix here — this is review.

    line 69
  5. Distinctive:

    Verify or say you don't know.

    line 70

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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. Free and local (Claude subagents).

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.

Reviewers

Spawn the six specialists below with the Agent tool, all in one message so they run concurrently, each with model: sonnet. 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.

Verification

For each non-trivial finding, spawn a verifier with model: opus that tries to refute it: is it real, reproducible, not already handled elsewhere? Default to dropping when uncertain. Never report a finding that has not been through the verifier pass.

Model routing

Reviewers spawn with the Agent tool's model parameter set to sonnet; verifiers spawn with it set to opus — refutation is the judgment-heavy step and earns the stronger model. Naming the model in the spawn itself is what makes this portable: it doesn't depend on any installer's default subagent model.

Report

Dedup overlaps, then rank: Blockers → Should-fix → Nits, each with file:line and a one-line fix. A dimension with nothing to flag gets one line ("Security: no issues"), not a manufactured nit. Close with a short "what's solid".

Rules

  • Every finding cites a real file:line from the diff. No speculative "you might consider" padding.
  • A clean dimension gets one line, not a manufactured nit.
  • Don't fix here — this is review. Offer to hand the ranked list to an implementer, or to /code-review --fix, if the user wants changes applied.
  • Verify or say you don't know; never invent a path, API, number, or fact. Commits are the repo owner's alone: no AI co-author trailer, no AI mention in messages.

When not to use

  • A trivial diff (docs, rename, one-liner) — a single-pass read or plain /code-review covers it; a swarm is overkill. Invoked by name on one anyway: say so in one line, do the single-pass read yourself, and spawn no specialists.
  • The ask is "fix it", not "review it" — implement, then swarm the result.
  • Security is the whole ask → /security-review.
  • /code-review is named explicitly.

Hand-offs

  • Architecture findings that contradict the design docs → architect audit.
  • The diff touches UI, forms, or markup → hand those hunks to ux-designer for the UX/a11y read; this swarm judges correctness, not interface quality.
  • Simplicity findings the user accepts → ponytail the fix.
  • Heavyweight cloud pass wanted → /code-review ultra.

Relationship to built-ins

The local, free, your-stack-tailored swarm. For the heavyweight cloud version, /code-review ultra runs specialists in the cloud; plain /code-review is a single-pass diff review; /security-review is the built-in for a security-only ask. Reach for this skill when you want parallel local specialists with adversarial verification and no cloud round trip.

Done when

The user has a short, ranked, evidence-backed list where every item is a real, verified problem in the diff — and knows what's clean.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.