# Multi-agent code review: prompt pack

One orchestrator splits a code review into narrow lens agents that run in parallel, runs your own
tests and linters, sends every finding to a verifier that tries to disprove it, and writes one
ranked report with a SHIP / SHIP WITH FIXES / DO NOT SHIP verdict. It never approves a pull request.
Approval stays with people.

## Files

Required files make the panel run. Recommended files are the rest of the default panel. Optional
files add a lens or a per-repo setting; leave any of them out.

| File | What it is | Claude Code location | Status |
|---|---|---|---|
| `panel-review-SKILL.md` | The orchestrator | `.claude/skills/panel-review/SKILL.md` | Required |
| `finding-format.md` | The shared output contract | `.claude/skills/panel-review/finding-format.md` | Required |
| `review-verifier.md` | Tries to refute every finding | `.claude/agents/` | Required |
| `review-correctness.md` | Lens: bugs, edge inputs, intent | `.claude/agents/` | Required |
| `review-resilience.md` | Lens: failure, retries, concurrency, load | `.claude/agents/` | Recommended |
| `review-architecture.md` | Lens: contracts, boundaries, cost of change | `.claude/agents/` | Recommended |
| `review-security.md` | Lens: secrets, injection, auth, sensitive data | `.claude/agents/` | Recommended |
| `review-tests.md` | Lens: would a test catch a regression? | `.claude/agents/` | Recommended |
| `review-rules.md` | Lens: the team's written rules | `.claude/agents/` | Recommended |
| `review-history.md` | Lens: undone fixes, removed guards (runs on `--deep`) | `.claude/agents/` | Optional |
| `review-requirements.md` | Lens: acceptance criteria | `.claude/agents/` | Optional |
| `review-integration.md` | Lens: consumers and data provenance | `.claude/agents/` | Optional |
| `review-deploy.md` | Lens: migrations, deploy order, rollback | `.claude/agents/` | Optional |
| `review-profile.md` | Per-repo settings template | `.review/profile.md` in the reviewed repo | Optional |
| `lessons.md` | Past-misses template | `.review/lessons.md` in the reviewed repo | Optional |

## Install in Claude Code

1. Put the agent files in `.claude/agents/` (one repo) or `~/.claude/agents/` (every repo).
2. Put `panel-review-SKILL.md` at `.claude/skills/panel-review/SKILL.md` and `finding-format.md`
   beside it.
3. Optional: copy `review-profile.md` and `lessons.md` into the reviewed repo as
   `.review/profile.md` and `.review/lessons.md`, and fill them in.
4. Run `/panel-review`, `/panel-review --pr 123`, `/panel-review --deep`, or
   `/panel-review --ticket ABC-123`.

Keep the front matter (the block between the `---` lines) when you install:

- `SKILL.md` needs `name` and `description` in its front matter, or Claude Code will not load it.
- Each agent's `name` must match its file name without `.md` (`review-security.md` has
  `name: review-security`). The orchestrator launches agents by that name, so a renamed file or a
  changed `name` turns that lens off without an error.
- The `license` and `metadata` keys are credit and version information only. Claude Code ignores
  them, and they never reach the model.

The optional lenses run only when their agent file is installed and the change calls for them.
Leave a file out to turn that lens off.

**`--fix` edits files.** Run it only on a clean branch, so the fix diff is the only change you
review and nothing of yours is overwritten.

## Use with other agent tools

Everything below the front matter is plain text with no tool-specific syntax. In Cursor, Codex,
Copilot agents or your own runner:

1. Give the orchestrator text to your main agent.
2. Register each lens and the verifier as a sub-agent or a separate run with the same text.
3. If your tool cannot run sub-agents in parallel, run the lenses one after another. The verifier
   must still be a fresh run that sees only the finding and the code.

## Cost and time

A full panel is several model sessions, so it costs more than a single-prompt review and takes
minutes, not seconds. Use `--quick` for a fast second look, the default for normal pull requests,
and `--deep` for high-stakes changes (money, auth, migrations).

## Honest limits

- It is not a replacement for human review. It does the wide, tedious tracing first, so the human
  reviewer starts from a verified list instead of a blank diff.
- One run is a sample, not a verdict. "No findings" is weaker evidence than "findings, checked and
  resolved".
- It only searches the code it can read: repos you have not cloned are not searched, and the report
  says so.

## License and credit

Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/): use, copy, change
and share it, commercially or not, with no attribution required. Credit and version information
live in each file's front matter, never in the prompt text. The `version` and `updated` keys there
tell you whether your copy is current; the latest pack is at
https://rjl.dev/case-studies/multi-agent-code-review/.

Provided as is, with no warranty of any kind. You are responsible for reviewing what the agents
report and any changes the fix step makes.

By RJ Lindelof (https://rjl.dev/).
