원클릭으로
pr-review
Full PR review lifecycle — diff review, auto-fix, PR comment triage, conversation resolution, merge-conflict detection
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Full PR review lifecycle — diff review, auto-fix, PR comment triage, conversation resolution, merge-conflict detection
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | pr-review |
| description | Full PR review lifecycle — diff review, auto-fix, PR comment triage, conversation resolution, merge-conflict detection |
Run the PR review lifecycle. Load optional steps and reference materials lazily when needed.
/pr-review # reviews the current branch's open PR
/pr-review <N> # reviews PR #N (checks it out first)
If a PR number is given, check it out:
just fix <N>
Identify the PR and repo:
PR=$(gh pr view --json number -q .number)
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
Abort with a clear message if no open PR exists for the branch.
Block any in-flight auto-merge before doing anything else. Repos with an
auto-merge workflow (e.g. .github/workflows/auto-merge.yml) can enable
gh pr merge --auto mid-review and merge the PR the moment CI + conversation
checks go green — potentially before this review's fixes or comments land.
Cancel any queued/in-progress run tied to the PR's head SHA before starting:
HEAD_SHA=$(gh pr view "$PR" --json headRefOid -q .headRefOid)
gh api "repos/$REPO/actions/runs?head_sha=$HEAD_SHA" \
--jq '.workflow_runs[] | select(.status=="in_progress" or .status=="queued") | .id' \
| xargs -r -I{} gh api -X POST "repos/$REPO/actions/runs/{}/cancel"
Confirm the cancel took (gh api repos/$REPO/actions/runs/<id>/jobs --jq '.jobs[].conclusion'
should show cancelled). Don't re-enable auto-merge yourself when the review
finishes — leave that decision to the human; note in the Phase 6 summary that
it was cancelled and needs a manual gh pr merge --auto --squash if still wanted.
If you need to perform a merge-conflict check or if dry-run rebase is needed, read merge-conflict.md for full instructions.
Fetch the full PR diff:
gh pr diff
Review the diff against the guidelines in review-checklist.md.
Delegate, don't re-implement. If the ponytail plugin is installed, run
/ponytail-review for the over-engineering/over-complexity pass and fold its findings in.
If caveman is installed, format the per-finding output via /caveman-review. When neither
is present, do those passes inline using the rules in review-checklist.md. Don't reproduce their logic here.
For each finding output exactly:
path/to/file.rs:<line>: [SEVERITY] Problem. Fix.
Severity levels: BUG (must fix before merge) | WARN (should fix) | STYLE (optional).
File every BUG/WARN finding as a real PR comment before fixing it. Don't
silently patch and move on — each finding needs an auditable, resolvable thread,
same as a human/Copilot comment gets. Skip filing one only if an existing unresolved
thread already covers the same issue.
HEAD_SHA=$(gh pr view "$PR" --json headRefOid -q .headRefOid)
gh api "repos/$REPO/pulls/$PR/comments" \
-f body="[SEVERITY] Problem. Fix." \
-f commit_id="$HEAD_SHA" \
-f path="path/to/file.rs" \
-F line=<line> \
-f side=RIGHT
STYLE findings are reported inline only — do not file comments for those.
If auto-fixing BUG or WARN findings, read auto-fix.md for instructions. Do NOT auto-fix STYLE findings without explicit user approval.
If there are existing open (unresolved) review threads on the PR, read address-comments.md to retrieve and address them.
If you made edits, read push-resolve.md to push your changes and resolve review threads.
Output a structured report:
## PR Review Summary — PR #<N>
### Auto-merge
<none in-flight | cancelled run <id>, needs manual re-enable>
### Merge conflicts
<none | list of files + resolution>
### Diff findings applied
<BUG/WARN findings fixed, one line each>
### Diff findings (STYLE — not auto-applied)
<style findings for human review>
### PR comments addressed
<thread summaries, one line each>
### Push
<commit SHA + branch>
### Threads resolved
<count resolved>
cargo fmt / cargo clippy after editing code.just test-pr first.BUG/WARN diff finding before fixing it — don't
silently patch and move on; the fix needs a resolvable, auditable thread.isolation: "worktree" when spawning any subagent during this flow.just test-pr fails, fix the failure before pushing — do not push a broken branch.