63 lines
1.5 KiB
Markdown
63 lines
1.5 KiB
Markdown
---
|
|
name: review-pr
|
|
description: Review a specific GitHub pull request by number — fetches PR diff and comments via gh CLI, then provides structured review.
|
|
disable-model-invocation: true
|
|
argument-hint: "[pr-number]"
|
|
context: fork
|
|
agent: code-reviewer
|
|
allowed-tools: Bash(gh:*), Read, Grep, Glob
|
|
---
|
|
|
|
# Review Pull Request
|
|
|
|
Review GitHub PR #$ARGUMENTS.
|
|
|
|
## Context
|
|
|
|
PR details:
|
|
!`gh pr view $ARGUMENTS`
|
|
|
|
PR diff:
|
|
!`gh pr diff $ARGUMENTS`
|
|
|
|
PR comments:
|
|
!`gh pr view $ARGUMENTS --comments 2>/dev/null || echo "No comments"`
|
|
|
|
Changed files:
|
|
!`gh pr diff $ARGUMENTS --name-only`
|
|
|
|
## Steps
|
|
|
|
1. **Understand the PR** — read title, description, and comments for context
|
|
2. **Analyze all changed files** — not just the latest commit, ALL changes in the PR
|
|
3. **Read relevant source files** for full context (not just the diff)
|
|
4. **Verify dependencies** — check new packages for CVEs via context7
|
|
5. **Check against project rules** — read `RULES.md`
|
|
6. **Review in priority order:** Security → Reliability → Performance → Maintainability → Testing
|
|
|
|
7. **Report:**
|
|
|
|
```markdown
|
|
# PR Review: #[number] — [title]
|
|
|
|
## Summary
|
|
[What this PR does, overall assessment]
|
|
|
|
**Verdict**: APPROVE / APPROVE WITH COMMENTS / REQUEST CHANGES
|
|
|
|
## Critical Issues
|
|
[Security vulnerabilities, data loss risks — with fixes]
|
|
|
|
## High Priority
|
|
[Significant issues — with fixes]
|
|
|
|
## Medium Priority
|
|
[Improvements — grouped]
|
|
|
|
## What's Done Well
|
|
- [Specific praise]
|
|
|
|
## Recommendations
|
|
1. [Prioritized next steps]
|
|
```
|