PR Review
Perform a thorough multi-agent code review of the specified pull request. $ARGUMENTS
This review is READ-ONLY. It does NOT:
- •Post comments to GitHub
- •Modify any files
- •Approve or request changes
Works on draft PRs - unlike built-in /code-review.
Usage
code
/mp-review-pr 123 # Review PR #123 /mp-review-pr # Review PR for current branch
Phase 1: Fetch PR (Haiku Agent)
- •Get PR details:
gh pr view $ARGUMENTS --json number,title,state,isDraft,baseRefName,headRefName,body,additions,deletions,changedFiles - •Get the diff:
gh pr diff $ARGUMENTS - •List changed files:
gh pr view $ARGUMENTS --json files --jq '.files[].path' - •Do NOT skip if draft - review it anyway
- •Detect tech stack from changed files and repo structure
- •Find CLAUDE.md files
Phase 2: Parallel Review (5 Sonnet Agents)
Same as /mp-review-branch:
- •Agent 1: Tech Stack Best Practices
- •Agent 2: Security Review (OWASP)
- •Agent 3: Performance Analysis
- •Agent 4: Error Handling & Reliability
- •Agent 5: Code Quality, CLAUDE.md & Overcomplicated Code
Phase 3: Confidence Scoring (Haiku Agents)
Score each issue 0-100:
- •0-39 (Low): Stylistic, minor
- •40-65 (Medium): Worth reviewing
- •66-80 (High): Should address
- •81-100 (Top): Must fix
Phase 4: Output
PR Review: #[number] - [title]
Status: [Ready/Draft] | Base: [base] → Head: [head] Tech Stack: [detected] Changes: +[additions] / -[deletions] in [changedFiles] files
Issues Summary Table
| # | Issue | Category | Confidence | Location |
|---|---|---|---|---|
| 1 | Issue name | Category | Score | file:line |
Top Priority (score > 80)
...
High Priority (score 66-80)
...
Medium Priority (score 40-65)
...
Low Priority (score < 40)
...
Summary
| Category | Top | High | Medium | Low |
|---|---|---|---|---|
| Security | N | N | N | N |
| Performance | N | N | N | N |
| Best Practices | N | N | N | N |
| Error Handling | N | N | N | N |
| Code Quality | N | N | N | N |
Overall Risk: [Low/Medium/High/Critical] Ready to Merge: [Yes/No - reasons]
Note: This review is read-only. To apply fixes or post comments to GitHub, use separate commands.