multi-specialist-review

User-triggered multi-agent code review. Spawns 3-5 parallel specialist sub-agents that read actual source files, runs mechanical citation verification, and synthesizes a single review artifact. Use for PR-level changes, multi-commit ranges, or security-sensitive work where single-turn review is insufficient.

13 stars

Best use case

multi-specialist-review is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

User-triggered multi-agent code review. Spawns 3-5 parallel specialist sub-agents that read actual source files, runs mechanical citation verification, and synthesizes a single review artifact. Use for PR-level changes, multi-commit ranges, or security-sensitive work where single-turn review is insufficient.

Teams using multi-specialist-review should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/multi-specialist-review/SKILL.md --create-dirs "https://raw.githubusercontent.com/NickCrew/Claude-Cortex/main/skills/multi-specialist-review/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/multi-specialist-review/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How multi-specialist-review Compares

Feature / Agentmulti-specialist-reviewStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

User-triggered multi-agent code review. Spawns 3-5 parallel specialist sub-agents that read actual source files, runs mechanical citation verification, and synthesizes a single review artifact. Use for PR-level changes, multi-commit ranges, or security-sensitive work where single-turn review is insufficient.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Multi-Specialist Review

Team-based code review that spawns 3-5 parallel specialist sub-agents to examine
a diff through different perspectives (correctness, security, performance,
architecture, etc.), mechanically verifies every finding against the actual
source files, and synthesizes a single prioritized review artifact.

## When to Use

This skill is **user-triggered**. It is not part of routine agent workflows — the
cost and authority profile warrants explicit user invocation. Use when:

- PR-level changes (5+ modified files)
- Multi-commit ranges (`main..feature-branch`) rather than atomic commits
- Security-sensitive paths (auth, crypto, payments, input validation)
- Single-turn `specialist-review` flagged quality concerns that need deeper scrutiny

For atomic-commit review, use the baseline `specialist-review.sh` from the
`agent-loops` skill instead — it's 4-6x cheaper and sufficient for small diffs.

## Prerequisites — Claude Code Only

> **This skill requires the Claude Code `Agent` tool** with the `code-reviewer`
> subagent type available. It cannot be invoked from Codex or Gemini sessions,
> or from external shells. Parallelism comes from issuing multiple `Agent`
> calls in a single assistant message — no team API is needed.

## Cost

Approximately **$2-3 per review** vs ~$2.00 for single-turn `specialist-review`.
The premium buys multi-perspective coverage, grounded findings (sub-agents read
source files, not just diffs), and mechanical citation verification.

## CRITICAL — How specialists are spawned

> **Spawn specialists with one-shot `Agent()` calls only. Do NOT use
> `TeamCreate`, `team_name=`, or `TaskCreate` to spawn them.**
>
> Team-spawned subagents inherit a restricted runtime tool set
> (`SendMessage`, `Task*` only) — no Read, Grep, Glob, Write, or Bash.
> The observable failure is specialists narrating "I'll read the files"
> in plain text and idling between turns without invoking any tool.
> This has burned this skill twice. The fix is structural: use one-shot
> `Agent()` calls in a single message, which inherit the `code-reviewer`
> agent type's full toolset and have no between-turn idle state.
> Phase 1 below codifies this; the anti-pattern section at the bottom
> repeats the rule with the diagnostic signal so it can't be missed.

## Orchestration Procedure

Follow these phases exactly. You are the orchestrator — do not delegate
orchestration. Each phase is run by you in-context; only Phase 1 spawns
sub-agents, and they are one-shot Agent calls that return and exit.

### Phase 0 — Triage (deterministic, no API cost)

Generate the diff you want reviewed, then select perspectives:

```bash
# Generate the diff
git diff main..HEAD -- src/ > /tmp/review-diff.patch

# Select perspectives (3-5 from the catalog based on file types and content signals)
python3 skills/multi-specialist-review/scripts/triage_perspectives.py /tmp/review-diff.patch
```

This outputs JSON with `perspectives`, `display_names`, `focus_areas`, and
`changed_files`. Save the output — you'll use it to parameterize each specialist.

### Phase 1 — Spawn specialists as parallel one-shot Agents

Spawn **all** specialists in a **single assistant message** with one `Agent`
tool call per perspective. Issuing multiple `Agent` calls in one message runs
them concurrently — that is the parallelism mechanism. Do **not** use
`team_name=`, `TeamCreate`, or `TaskCreate`; see the anti-pattern note below
for why.

For each perspective from the triage output:

```
Agent(
  description="Specialist review: {perspective}",
  subagent_type="code-reviewer",
  model="sonnet",
  prompt=<specialist-prompt-template.md with {{PERSPECTIVE}}, {{FOCUS_AREAS}},
          {{CHANGED_FILES}}, {{DIFF_CONTENT}} filled in>
)
```

The template is at `skills/multi-specialist-review/references/specialist-prompt-template.md`.
Each specialist:
- Inherits the `code-reviewer` toolset (Read, Grep, Glob, etc.) because it
  is a one-shot Agent call, not a team spawn
- Reads actual source files via Read/Grep/Glob (not just inlined diffs)
- Returns its structured JSON object as its final assistant message

When each Agent call returns, **you** (the orchestrator) write its JSON
result to `.agents/reviews/specialist-{perspective}-{timestamp}.json`. The
verifier in Phase 2 reads these files from disk.

### Phase 2 — Citation verification (deterministic, no API cost)

Run the citation verifier on all specialist output files:

```bash
python3 skills/multi-specialist-review/scripts/verify_citations.py \
  .agents/reviews/specialist-*.json > .agents/reviews/verified-findings.json
```

This mechanically validates every finding:
- File exists on disk
- Line range is within file length
- Quoted code actually appears near the cited lines (±5 line window, whitespace-normalized)

Findings that fail verification are stripped with documented reasons.

### Phase 3 — Synthesis (orchestrator, no extra agent)

Read the verified findings JSON and
`skills/multi-specialist-review/references/synthesis-prompt.md`.
Follow the synthesis instructions to:

1. Deduplicate findings that flag the same file+line range from multiple perspectives
2. Merge duplicates using the highest severity
3. Annotate multi-perspective findings as "(multi-perspective)" in the title
4. Renumber all findings sequentially (P0-001, P0-002, P1-001, etc.)
5. Produce the final markdown matching the review output contract

Write the final review to `.agents/reviews/review-{timestamp}.md`.

### Phase 4 — Validate and clean up

```bash
# Validate the final output (contract validator lives in agent-loops as shared infra)
python3 skills/agent-loops/scripts/validate-review-contract.py code-review \
  .agents/reviews/review-{timestamp}.md
```

There is no team to tear down — one-shot Agent calls return and exit on
their own. Optionally trash the per-specialist `.agents/reviews/specialist-*.json`
intermediates once the synthesized review is written; keep
`verified-findings.json` and the final markdown.

The output file path is the review artifact — return its path to the user.

## Specialist Prompt Template

Located at `skills/multi-specialist-review/references/specialist-prompt-template.md`.
A single parameterized template used for all perspectives. Fill these placeholders
before passing to each specialist:

| Placeholder | Source |
|-------------|--------|
| `{{PERSPECTIVE}}` | Display name from triage output (e.g., "Security") |
| `{{FOCUS_AREAS}}` | Focus description from triage output |
| `{{CHANGED_FILES}}` | Bullet list of changed file paths |
| `{{DIFF_CONTENT}}` | The unified diff |

## Bundled Assets

**Scripts:**
- `scripts/triage_perspectives.py` — Deterministic perspective selection (Phase 0)
- `scripts/verify_citations.py` — Mechanical citation verification (Phase 2)

**References:**
- `references/specialist-prompt-template.md` — Parameterized prompt for each specialist
- `references/synthesis-prompt.md` — Instructions for Phase 3 synthesis

**External dependency:**
- `skills/agent-loops/scripts/validate-review-contract.py` — Shared review contract validator
  used by both this skill and the single-turn `specialist-review.sh` flow. Lives in
  `agent-loops` because it's baseline review infrastructure used across multiple flows.

## Relationship to `agent-loops`

This skill was extracted from `agent-loops` when we recognized that team-based
review has a different authority profile than routine per-commit review:

- **`agent-loops` single-turn review** (via `specialist-review.sh`) — autonomous,
  per-atomic-commit, cross-model independence via provider rotation.
  Runs continuously during implementation work.
- **`multi-specialist-review` (this skill)** — user-triggered, PR-level or
  security-sensitive, within-model multi-perspective diversity, grounded findings
  via sub-agent source reading.

Implementer agents using `agent-loops` will flag in their handoff when a change
warrants team review, but **they do not invoke this skill themselves**. The user
decides and triggers it.

## Anti-Patterns

- **Spawning specialists via `team_name=` / `TeamCreate`** — Team-spawned
  agents do **not** inherit the `code-reviewer` toolset; they get only
  inter-agent coordination tools (`SendMessage`, `Task*`) and no
  Read/Grep/Glob/Write/Bash. The observable failure is specialists
  announcing "I'll read the files" in plain text, then idling between
  turns without ever invoking a tool. Always use one-shot `Agent()` calls
  in a single message instead — they get the full inherited toolset and
  have no idle-between-turns state.
- **Spawning specialists sequentially** — Launch all in a single message block for parallel execution.
- **Skipping citation verification** — Always run `verify_citations.py`. Specialists hallucinate file references.
- **Adding synthesis as another agent** — The orchestrator does synthesis in-context. No extra spawn needed.
- **Using this for small diffs** — Single-turn `specialist-review.sh` is 4-6x cheaper and sufficient for atomic commits.
- **Reviewing your own code** — The orchestrator must not be the implementer.
- **Invoking autonomously from an agent workflow** — This skill is user-triggered. Agents should signal in their handoff, not execute.

Related Skills

ux-review

13
from NickCrew/Claude-Cortex

Multi-perspective UX review combining usability heuristics, WCAG accessibility checks, and interaction design analysis. Use when reviewing UI components before release, evaluating user flows for usability issues, conducting design critiques, or auditing accessibility compliance.

test-review

13
from NickCrew/Claude-Cortex

Review test quality and audit test coverage for any module. This skill should be used when reviewing existing tests, auditing test gaps, writing new tests, or when asked to assess test health. It pipelines testing standards into the audit workflow to produce a prioritized gap report. The output is a report, not code — do not write test implementations until the report is reviewed.

requesting-code-review

13
from NickCrew/Claude-Cortex

Use when completing tasks, implementing major features, or before merging to verify work meets requirements - dispatches superpowers:code-reviewer subagent to review implementation against plan or requirements before proceeding

receiving-code-review

13
from NickCrew/Claude-Cortex

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

multi-perspective-analysis

13
from NickCrew/Claude-Cortex

Adopt multiple expert personas sequentially for complex problem analysis from diverse perspectives. Single-agent only — do NOT spawn sub-agents.

multi-llm-consult

13
from NickCrew/Claude-Cortex

Consult external LLMs (Gemini, OpenAI/Codex, Qwen) for second opinions, alternative plans, independent reviews, or delegated tasks. Use when a user asks for another model's perspective, wants to compare answers, or requests delegating a subtask to Gemini/Codex/Qwen.

html-seo-review

13
from NickCrew/Claude-Cortex

Audit static HTML files for on-page SEO, content quality, easy-win performance signals, and crawlability. This skill should be used when the user asks to review, audit, or check the SEO of one or more static HTML files — e.g., "review the HTML for SEO issues", "audit this landing page", "check SEO on these pages before I publish". Static HTML only — does not cover Jekyll/Hugo/Astro/Next.js source, off-page factors, or live-rendered Core Web Vitals.

doc-architecture-review

13
from NickCrew/Claude-Cortex

Evaluate documentation information architecture: navigation paths, discoverability, progressive disclosure, cross-linking, and mental model alignment. This skill should be used when restructuring docs, adding new sections, or when users report difficulty finding information.

codex-code-review

13
from NickCrew/Claude-Cortex

Automate code review remediation loops with the codex CLI. Requests reviews from codex, classifies findings by severity (P0-P4), fixes critical issues (P0/P1) through iterative cycles, defers quality improvements to backlog, and escalates after 3 review cycles. Use when working with code that needs structured remediation: 'codex review' in a request triggers this workflow.

ai-tells-review

13
from NickCrew/Claude-Cortex

User-invoked structural review for subtle AI tells in prose artifacts — rhythm patterns, rhetorical reflexes, hedging cadence, performative emphasis, and the structural shapes that mark text as machine-generated even after surface tells are cleaned up. Produces a findings report citing each tell by line with a fix-direction, then offers a rewrite pass. Use on artifacts that matter: public READMEs, shipped documentation, blog posts, anything where prose-as-artifact is the deliverable. Layers on top of ai-tells-scan, which handles the mechanical surface pass; this skill handles the judgment-based structural pass that a regex can't catch. Trigger on "review for AI tells," "does this read AI," "strip the AI smell," "make this less AI," or any similar request whose deliverable is structural prose surgery.

writing-skills

13
from NickCrew/Claude-Cortex

Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization

workflow-security-audit

13
from NickCrew/Claude-Cortex

Comprehensive security assessment and remediation. Use for security reviews, compliance checks, vulnerability assessments.