From r5
This skill should be used when the user asks to "review a PR", "review pull request", "check this PR", "look at this PR", "is this PR ready to merge", "PRレビューして", "PRをレビュー", "PR見て", "コードレビュー", or when performing automated or manual code reviews on GitHub pull requests. Provides a structured, incremental review workflow with security checks, file prioritization, and merge readiness assessment.
How this skill is triggered — by the user, by Claude, or both
Slash command
/r5:pr-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. **No Low severity reports.** Do NOT report style nits, type annotation improvements, debug statements, import order, documentation suggestions, or any Low severity finding. This applies to your own findings AND all agent outputs. If unsure, don't report it.
### 🤖 AI Fix Prompt section per references/review-templates.md.gh pr review. Never just output text. Always run the gh pr review command.gh pr diff <PR_NUMBER> -- path/to/file.references/review-templates.md. Do NOT invent your own format. The body MUST start with one of: ## ✅ LGTM, ## ⚠️ Changes Requested, ## 💬 Review Complete, ## ⏭️ Auto Review Skipped. Do NOT use # Issue 1, # Issue 2, numbered issue headers, before/after code diffs, or any other custom format.Read the repository's CLAUDE.md, then collect PR metadata:
gh pr view <PR_NUMBER> --json title,body,baseRefName,headRefName,files,commits
gh pr diff <PR_NUMBER> --name-only
gh pr view <PR_NUMBER> --json additions,deletions | jq '.additions + .deletions'
Diff size tiers:
references/review-templates.mdCheck for previous review: Try to load the review cache artifact, then check for previous review content on GitHub:
Check for previous review:
# CI: read cache restored by actions/cache
cat .claude-reviews/pr-<PR_NUMBER>.json 2>/dev/null
# Fallback: get previous review from GitHub
gh pr view <PR_NUMBER> --json comments,reviews --jq '
[(.comments[]? | select(.body | contains("Reviewed by Claude")) | {body: .body, at: .createdAt}),
(.reviews[]? | select(.body | contains("Reviewed by Claude")) | {body: .body, at: .createdAt})]
| sort_by(.at) | last | .body'
If a previous review exists: avoid repeating the same feedback, focus only on new changes.
Classify files by priority per references/file-categories.md and review in order: source → tests → config → lock files (acknowledge only).
Focus on:
references/security-patterns.md)Severity threshold:
Use pr-review-toolkit agents selectively — only invoke what's relevant to the changes:
Filter agent outputs by the same severity threshold. Discard all Low findings from agents.
Only run this step when NO Critical or High severity issues were found in Steps 2–3.
Run the code-simplifier agent against source code files changed in the PR. The goal is to identify opportunities for improving clarity, reducing complexity, and removing unnecessary abstractions — without changing behavior.
Scope:
references/file-categories.mdHow to use results:
### 💡 Simplification SuggestionsDetermine merge readiness and post via gh pr review using templates from references/review-templates.md:
gh pr review --approve (LGTM)gh pr review --request-changesgh pr review --comment then --approveRequired template structure (Hard Rule 6):
For changes requested, the body MUST follow this skeleton exactly:
## ⚠️ Changes Requested
**Summary**: [One sentence]
**Assessment**: [Why not ready]
### Issues Found
[Bulleted list with file:line references and severity]
### 🤖 AI Fix Prompt
<details>
<summary>Copy this prompt to your AI agent to fix all issues at once</summary>
Fix the following issues in this repository:
In @path/to/file:
</details>
---
*Reviewed by Claude*
```
Populate the `### 🤖 AI Fix Prompt` section with self-contained fix instructions (exact file paths, line numbers, what to change and why). Use 4 backticks (` ```` `) for the outer code fence so inner code examples with 3 backticks don't break rendering. (Hard Rule 2)
**NEVER DO THIS — the following formats are WRONG:**
- ❌ `# Issue 1: ...` / `# Issue 2: ...` — numbered issue headers
- ❌ Showing "変更前" / "変更後" / "before" / "after" code diffs in the review body
- ❌ Listing file paths as section headers (`## path/to/file.ts`)
- ❌ Any format that doesn't start with `## ✅`, `## ⚠️`, or `## 💬`
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub radius5-study/r5-plugin --plugin r5