From prp-core
Reviews pull requests by analyzing diffs, running validation, and posting structured comments. Supports single-pass or multi-agent fan-out for specialized review aspects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/prp-core:prp-review <pr-number|pr-url> [--approve|--request-changes] [--agents [aspects: comments|tests|errors|types|code|docs|simplify|all]]<pr-number|pr-url> [--approve|--request-changes] [--agents [aspects: comments|tests|errors|types|code|docs|simplify|all]]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Input**: $ARGUMENTS
Input: $ARGUMENTS
This skill has two modes:
| Mode | Trigger | What it does |
|---|---|---|
| Single-pass (default) | no --agents flag | One reviewer performs the full 8-phase review below |
| Multi-agent fan-out | --agents flag present, or aspect keywords (comments/tests/errors/types/code/docs/simplify/all), or the user asks for a "multi-agent"/"thorough" review | Dispatches specialized agents in parallel, one per aspect |
If multi-agent mode is selected: follow workflows/agents.md instead of the phases below, then stop. Everything below this section is the single-pass review.
Single-pass is the cheaper default; reach for --agents on large diffs or when explicitly asked.
Perform a thorough, senior-engineer-level code review:
Golden Rule: Be constructive and actionable. Every issue should have a clear recommendation. Acknowledge good work too.
Determine input type:
| Input Format | Action |
|---|---|
Number (123, #123) | Use as PR number |
URL (https://github.com/.../pull/123) | Extract PR number |
Branch name (feature-x) | Find associated PR |
# If branch name provided, find PR
gh pr list --head {branch-name} --json number -q '.[0].number'
# Get comprehensive PR details
gh pr view {NUMBER} --json number,title,body,author,headRefName,baseRefName,state,additions,deletions,changedFiles,files,reviews,comments
# Get the diff
gh pr diff {NUMBER}
# List changed files
gh pr diff {NUMBER} --name-only
Extract:
# Fetch and checkout the PR branch
gh pr checkout {NUMBER}
| State | Action |
|---|---|
MERGED | STOP: "PR already merged. Nothing to review." |
CLOSED | WARN: "PR is closed. Review anyway? (historical analysis)" |
DRAFT | NOTE: "Draft PR - focusing on direction, not polish" |
OPEN | PROCEED with full review |
PHASE_1_CHECKPOINT:
Read and internalize:
# Project conventions
cat CLAUDE.md
# Check for additional reference docs
ls -la .claude/docs/ 2>/dev/null
ls -la docs/ 2>/dev/null
Extract key constraints:
Look for implementation artifacts:
# Find implementation report by branch name
ls .claude/PRPs/reports/*{branch-name}*.md 2>/dev/null
# Find completed plans
ls .claude/PRPs/plans/completed/ 2>/dev/null
# Find issue investigations
ls .claude/PRPs/issues/completed/ 2>/dev/null
If implementation report exists:
If no implementation report:
/prp-implementFrom PR title, description, AND implementation report (if available):
For each changed file, determine:
PHASE_2_CHECKPOINT:
For each file in the diff:
For EVERY changed file, check:
any)?Important: Check implementation report first!
If a deviation from expected patterns is documented in the implementation report with a valid reason, it is NOT an issue - it's an intentional decision. Only flag undocumented deviations.
Finding Categories (shared with --agents mode — see templates/review-report.md):
| Category | Icon | Criteria | Examples |
|---|---|---|---|
| Critical | RED | Must fix before merge - blocking | Security vulnerabilities, data loss potential, crashes |
| Important | ORANGE | Should fix before merge | Type safety violations, missing error handling, logic errors |
| Suggestions | YELLOW | Nice to have - consider | Pattern inconsistencies, missing edge cases, undocumented deviations, style preferences, minor optimizations, documentation |
| Strengths | GREEN | What's good - acknowledge | Good patterns, clean code, thorough tests |
PHASE_3_CHECKPOINT:
# Type checking (adapt to project)
npm run type-check || bun run type-check || npx tsc --noEmit
# Linting
npm run lint || bun run lint
# Tests
npm test || bun test
# Build
npm run build || bun run build
Capture for each:
Based on what changed:
| Change Type | Additional Validation |
|---|---|
| New API endpoint | Test with curl/httpie |
| Database changes | Check migration exists |
| Config changes | Verify .env.example updated |
| New dependencies | Check package.json/lock file |
# Full test suite
npm test || bun test
# Specific tests for changed functionality
npm test -- {relevant-test-pattern}
PHASE_4_CHECKPOINT:
APPROVE if:
REQUEST CHANGES if:
BLOCK if:
| Situation | Handling |
|---|---|
| Draft PR | Comment only, no approve/block |
| Large PR (>500 lines) | Note thoroughness limits, suggest splitting |
| Security-sensitive | Extra scrutiny, err on caution |
| Missing tests | Strong recommendation, may not block |
PHASE_5_CHECKPOINT:
mkdir -p .claude/PRPs/reviews
Path: .claude/PRPs/reviews/pr-{NUMBER}-review.md
---
pr: {NUMBER}
title: "{TITLE}"
author: "{AUTHOR}"
reviewed: {ISO_TIMESTAMP}
recommendation: {approve|request-changes|block}
---
# PR Review: #{NUMBER} - {TITLE}
**Author**: @{author}
**Branch**: {head} -> {base}
**Files Changed**: {count} (+{additions}/-{deletions})
---
## Summary
{2-3 sentences: What this PR does and overall assessment}
---
## Implementation Context
| Artifact | Path |
|----------|------|
| Implementation Report | `{path}` or "Not found" |
| Original Plan | `{path}` or "Not found" |
| Documented Deviations | {count} or "N/A" |
{If implementation report exists: Brief note about deviation documentation quality}
---
## Changes Overview
| File | Changes | Assessment |
|------|---------|------------|
| `{path/to/file.ts}` | +{N}/-{M} | {PASS/WARN/FAIL} |
---
## Issues Found
### Critical
{If none: "No critical issues found."}
- **`{file.ts}:{line}`** - {Issue description}
- **Why**: {Explanation of the problem}
- **Fix**: {Specific recommendation}
### Important
{Issues that should be fixed before merge}
### Suggestions
{Issues worth considering but not blocking, nice-to-haves, and future improvements}
---
## Validation Results
| Check | Status | Details |
|-------|--------|---------|
| Type Check | {PASS/FAIL} | {notes} |
| Lint | {PASS/WARN} | {count} warnings |
| Tests | {PASS/FAIL} | {count} passed |
| Build | {PASS/FAIL} | {notes} |
---
## Pattern Compliance
- [{x}] Follows existing code structure
- [{x}] Type safety maintained
- [{x}] Naming conventions followed
- [{x}] Tests added for new code
- [{x}] Documentation updated
---
## Strengths
{Acknowledge positive aspects - good patterns, clean code, thorough tests, etc.}
---
## Recommendation
**{APPROVE/REQUEST CHANGES/BLOCK}**
{Clear explanation of recommendation and what needs to happen next}
---
*Reviewed by Claude*
*Report: `.claude/PRPs/reviews/pr-{NUMBER}-review.md`*
PHASE_6_CHECKPOINT:
Based on recommendation and flags:
# If --approve flag AND no Critical/Important issues
gh pr review {NUMBER} --approve --body-file .claude/PRPs/reviews/pr-{NUMBER}-review.md
# If --request-changes flag OR Important issues found
gh pr review {NUMBER} --request-changes --body-file .claude/PRPs/reviews/pr-{NUMBER}-review.md
# Otherwise just comment
gh pr comment {NUMBER} --body-file .claude/PRPs/reviews/pr-{NUMBER}-review.md
# Get the review/comment URL
gh pr view {NUMBER} --json reviews,comments --jq '.reviews[-1].url // .comments[-1].url'
PHASE_7_CHECKPOINT:
## PR Review Complete
**PR**: #{NUMBER} - {TITLE}
**URL**: {PR_URL}
**Recommendation**: {APPROVE/REQUEST CHANGES/BLOCK}
### Issues Found
| Category | Count |
|----------|-------|
| Critical | {N} |
| Important | {N} |
| Suggestions | {N} |
### Validation
| Check | Result |
|-------|--------|
| Type Check | {PASS/FAIL} |
| Lint | {PASS/FAIL} |
| Tests | {PASS/FAIL} |
| Build | {PASS/FAIL} |
### Artifacts
- Report: `.claude/PRPs/reviews/pr-{NUMBER}-review.md`
- PR Comment: {comment_url}
### Next Steps
{Based on recommendation:}
- APPROVE: "PR is ready for merge"
- REQUEST CHANGES: "Author should address {N} Important issues"
- BLOCK: "Fundamental issues need resolution before proceeding"
Understand before judging. Read full context, not just the diff.
Be specific. "This could be better" is useless. "Use execFile instead of exec to prevent command injection at line 45" is helpful.
Prioritize. Not everything is critical. Use the categories honestly.
Be constructive. Offer solutions, not just problems.
Acknowledge good work. If something is done well, say so.
Run validation. Don't skip automated checks.
Check patterns. Read existing similar code to understand expectations.
Think about edge cases. What happens with null, empty, very large, concurrent?
Check implementation report. Documented deviations are intentional, not issues.
npx claudepluginhub wirasm/prps-agentic-eng --plugin prp-coreFetches a GitHub PR diff, runs automated checks, and launches 3 parallel review agents (correctness, convention, efficiency) to analyze changes and draft a review.
Performs thorough pull request reviews with parallel agents for bugs, security issues, guideline compliance, and error handling. Provides confidence-scored feedback and batched GitHub comments.
Reviews a GitHub PR using multi-agent verification. Runs specialized agents against PR changes and posts structured feedback to GitHub.