SWE-Review — Claude Code Plugin
Automated code review and issue resolution with a review-revision loop for Claude Code.
SWE-Review is a framework for closing the issue-resolution loop with agentic code review. A reviewer agent independently explores the repository, traces the root cause, and compares its own diagnosis against the submitted PR — turning one-shot patch generation into an iterative generate-review-revise loop. For full details, see the project page, paper, and code repository.
Demo
What It Does
Two skills that bring structured code review into your Claude Code workflow:
/swe-review:review — Independent reconstruction code review: finds root cause independently, then compares with the patch to detect symptom fixes, missing sibling fixes, and broken dependencies
/swe-review:resolve — End-to-end issue resolution: patchgen → independent review → revision, looping until approved or max rounds reached
How /swe-review:resolve Works
You: /swe-review:resolve fix the login timeout bug
│
├─ Phase 1: Patchgen (Claude Code generates the fix)
│
├─ Phase 2: Review (independent subagent, no anchoring bias)
│ Independent reconstruction: understand issue → find root cause →
│ propose own fix → THEN read patch → compare → report
│
├─ Decision: approve → done
│ request_changes → Phase 3
│
├─ Phase 3: Revision (Claude Code addresses defects)
│
└─ Loop Phase 2-3 (max 3 rounds)
Key design choices:
- Review runs as a subagent with no knowledge of the patchgen process, eliminating self-review anchoring bias
- Independent reconstruction — reviewer finds root cause and proposes their own fix BEFORE reading the patch
- Point-of-CREATION enforcement — patches that fix symptoms at point of USE instead of root cause at point of CREATION are rejected
- No test suite required — review is the quality gate, designed for real-world repos
- Structured output — JSON review reports with decision, defects, and actionable suggestions
- Full traceability — all artifacts saved to
./docs/swe-review/{instance}_{timestamp}/
Installation
Step 1: Add the marketplace
In Claude Code, run:
/plugin marketplace add SWE-Lego/cc-swe-review
Step 2: Install the plugin
/plugin install swe-review@cc-swe-review
Step 3: Verify
Start a new Claude Code session. You should see swe-review:review and swe-review:resolve in the available skills.
Usage
Review Code Changes
/swe-review:review # review uncommitted changes
/swe-review:review HEAD~3..HEAD # review specific commit range
Outputs a structured review report:
{
"decision": { "recommendation": "approve|request_changes", "confidence": 0.0-1.0 },
"summary": { "problem": "...", "solution": "...", "overall_assessment": "..." },
"defects": [{ "severity": "high|medium|low", "location": {...}, "description": "...", "suggestion": "..." }]
}
Resolve an Issue
/swe-review:resolve <issue description>
/swe-review:resolve --no-review <issue description>
/swe-review:resolve --max-rounds 5 <issue description>
| Flag | Default | Meaning |
|---|
--no-review | (not set) | Skip review loop, only run patchgen |
--max-rounds N | 3 | Maximum review-revision rounds |
The skill will:
- Create a workspace directory under
./docs/swe-review/
- Explore the codebase and generate a fix
- Launch an independent review subagent
- Revise based on feedback if needed
- Loop until approved or max rounds reached
- Save all artifacts (issue, diffs, review reports, summary)
Review Report Schema
| Field | Description |
|---|
decision.recommendation | "approve" or "request_changes" |
decision.confidence | 0.0 to 1.0 |
summary.problem | Root cause in one sentence |
summary.solution | What the patch does |
defects[].severity | "high" (blocks approval), "medium", "low" |
defects[].category | correctness, compatibility, security, performance, maintainability |
defects[].location | File path + line range |
defects[].suggestion | Specific fix recommendation |
Architecture