| name | review |
| description | Run parallel code reviews using specialized agents (security, performance, simplicity, nextjs-react). Produces a structured report. |
| allowed-tools | Bash, Read, Glob, Grep, Task |
| argument-hint | ["full|security|performance|simplicity|nextjs|<path>"] |
Review: Parallel Code Review Orchestration
Objective
Run specialized review agents in parallel against the codebase. Collect findings into a single structured report.
Process
1. Determine Scope
Parse the argument to determine what to review:
| Argument | Scope |
|---|
/review or /review full | Run ALL 4 reviewers on frontend/ and convex/ |
/review security | Run security-reviewer only |
/review performance | Run performance-reviewer only |
/review simplicity | Run simplicity-reviewer only |
/review nextjs | Run nextjs-react-reviewer only |
/review <path> | Run ALL 4 reviewers scoped to the given path |
2. Launch Review Agents
Use the Task tool to launch specialized agents in parallel. Each agent corresponds to a file in .claude/agents/:
Agent Mapping:
| Review Type | Agent File | Focus |
|---|
| Security | .claude/agents/security-reviewer.md | OWASP, auth, XSS, CSRF, secrets |
| Performance | .claude/agents/performance-reviewer.md | Re-renders, bundle, N+1, O(n^2) |
| Simplicity | .claude/agents/simplicity-reviewer.md | YAGNI, dead code, over-abstraction |
| Next.js/React | .claude/agents/nextjs-react-reviewer.md | Server/Client, hooks, TypeScript, naming |
Launch Pattern:
For each selected reviewer, launch a Task with subagent_type: code-reviewer:
Task: "Run {type} review on {scope}"
Prompt: Read .claude/agents/{agent-file}.md for instructions.
Review {scope} and produce findings per the agent's output format.
Include exact file paths and line numbers.
CRITICAL: Launch ALL selected reviewers in a SINGLE message (parallel tool calls). Do NOT run them sequentially.
3. Collect Results
Wait for all agents to complete. Read each agent's output.
4. Compile Report
Create a unified report at:
.agents/reviews/YYYY-MM-DD-{topic}.md
Report Template:
# Code Review: {Topic}
**Date:** YYYY-MM-DD
**Branch:** `{current branch}`
**Scope:** {what was reviewed}
**Reviewers:** {which agents ran}
---
## Executive Summary
{2-3 sentence overview of findings}
| Category | P1 (Must Fix) | P2 (Should Fix) | P3 (Consider) |
|----------|--------------|-----------------|----------------|
| Security | N | N | N |
| Performance | N | N | N |
| Simplicity | N | N | N |
| Next.js/React | N | N | N |
| **Total** | **N** | **N** | **N** |
---
## P1 -- Must Fix
{Findings from all reviewers, merged and deduplicated}
## P2 -- Should Fix
{Findings from all reviewers, merged and deduplicated}
## P3 -- Consider
{Findings from all reviewers, merged and deduplicated}
---
## Positive Findings
{What the codebase does well}
---
## Action Plan
### Immediate (This Session)
- [ ] ...
### Next Sprint
- [ ] ...
### Backlog
- [ ] ...
5. Present Summary
After writing the report, show a compact summary to the user:
REVIEW COMPLETE
----------------------------------------------------------------------
Report: .agents/reviews/YYYY-MM-DD-{topic}.md
Findings: P1: N | P2: N | P3: N
Reviewers: security, performance, simplicity, nextjs-react
Scope: {scope}
Top Issues:
1. {P1 finding summary}
2. {P1 finding summary}
3. {P2 finding summary}
Fix now? (y/n)
----------------------------------------------------------------------
6. Optional: Fix Mode
If the user confirms, start fixing P1 issues:
- Read each P1 finding
- Apply the suggested fix
- Run
npx tsc --noEmit to verify
- Mark fixed in the report
Examples
Full Review
/review
Runs all 4 agents on entire codebase.
Security Only
/review security
Runs only the security-reviewer.
Scoped Review
/review frontend/app/api/
Runs all 4 agents scoped to API routes.
Integration
- Run
/review before /pre-production for comprehensive quality check
- Run
/review security after adding new API routes
- Run
/review performance after large feature implementations
- Reports accumulate in
.agents/reviews/ for historical tracking