pr-review
Guidelines for conducting thorough pull request code reviews
Best use case
pr-review is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Guidelines for conducting thorough pull request code reviews
Teams using pr-review should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/pr-review/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How pr-review Compares
| Feature / Agent | pr-review | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Guidelines for conducting thorough pull request code reviews
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## Code Quality Look for these aspects when reviewing code: **Readability and clarity** - Is the code easy to follow? Would another developer understand it without extensive explanation? - Are variable, function, and class names descriptive and consistent with the codebase conventions? - Is the code appropriately commented where logic is non-obvious? (But not over-commented for trivial things.) **Structure and design** - Does each function or method do one thing well? - Are functions a reasonable length? Very long functions often indicate opportunities to extract smaller, focused helpers. - Is there unnecessary duplication that could be refactored? - Does the code follow established patterns in the codebase, or does it introduce inconsistency? **Error handling** - Are errors handled appropriately rather than silently swallowed? - Are error messages helpful for debugging? - Are edge cases considered (empty inputs, null values, boundary conditions)? **Types and contracts** - Are types used correctly and consistently? - Are function signatures clear about what they accept and return? - For dynamically typed languages, is there sufficient validation of inputs? ## Bug Detection Watch for these common sources of bugs: - **Off-by-one errors** in loops, array indexing, and string slicing - **Null or undefined handling** - is it clear what happens when values are missing? - **Race conditions** in concurrent or async code - are shared resources properly protected? - **Resource leaks** - are files, connections, and handles properly closed? - **Logic errors** - does the boolean logic actually express the intended condition? - **State management** - is mutable state handled carefully? Could stale state cause issues? - **Boundary conditions** - what happens at the extremes (empty collections, maximum values, etc.)? ## Performance Consider performance implications, but be proportionate: - **Algorithm complexity** - is there a more efficient approach for the data sizes involved? - **Database queries** - are there N+1 query problems? Missing indexes for common queries? - **Memory usage** - are large collections being copied unnecessarily? Retained longer than needed? - **Unnecessary work** - are expensive operations being repeated when they could be cached or memoised? - **Lazy vs eager** - is data being loaded or computed before it's actually needed? Only raise performance concerns when they're likely to matter in practice. Premature optimisation is its own problem. ## Testing Evaluate the test coverage and quality: - Are new features and bug fixes covered by tests? - Do tests verify behaviour rather than implementation details? - Are edge cases tested, not just the happy path? - Are mocks and stubs used appropriately, not excessively? - Would the tests catch regressions if someone changed this code? ## Documentation Check that documentation is updated appropriately: - Are public APIs documented? - If behaviour changes, is existing documentation updated? - Are complex algorithms or non-obvious decisions explained? - For user-facing changes, does the README or user documentation need updating? ## Suggested Changes When you spot something that could be improved with a small, clear fix, offer a concrete suggestion using GitHub's suggestion format. This makes it easy for the author to apply with one click. Good candidates for suggestions: - Typos in comments, strings, or variable names - Simple refactorings (extracting a variable, simplifying a condition) - Formatting fixes that aren't caught by automated tools - Small logic corrections - Missing error handling for an obvious case Keep suggestions to **10 lines or fewer**. For larger changes, describe what to do instead. ## Writing Good Comments Your comments should be: - **Constructive** - focus on improving the code, not criticising the author - **Specific** - point to exact lines and explain precisely what could be better - **Reasoned** - explain *why* something is an issue, not just that it is - **Proportionate** - distinguish between minor suggestions and significant concerns - **Actionable** - make it clear what you're suggesting the author do Phrase things as observations and suggestions rather than demands: - "This could be simplified by..." rather than "Simplify this" - "I wonder if this handles the case where..." rather than "This is wrong" - "It might be clearer to..." rather than "This is confusing" If you're uncertain about something, frame it as a question. The author may have context you lack. ## Existing Discussions When there are already comments on the PR from other reviewers or automated tools: - Read them to understand the context and avoid duplicating feedback - Build on existing discussions where you have something to add - If a bot has flagged something relevant, you can reference it - Don't mark threads as resolved - that's the author's prerogative - If you disagree with a previous reviewer's comment, be respectful and explain your perspective
Related Skills
scaffold-bulk-review-prototypes
Review all prototypes at once for cross-prototype consistency, coverage gaps, ADR follow-through, and scope discipline. Use for a full audit of all prototypes.
review:ux
UX Review - analyzes feature for efficiency-first UX patterns, keyboard navigation, and pro-tool experience
review-model-guidance
Guidance for selecting models when performing code review with subtasks. Load this skill to enable intelligent model selection for review analysis — choosing faster models for simple tasks and deeper reasoning models for complex analysis.
ascii-design-reviewer
Review Phase 1 ASCII UI designs from a product owner perspective. Analyze user journeys, identify potential issues, ask clarifying questions about requirements and user flows, create Mermaid diagrams (flowcharts, sequence diagrams, state charts), provide detailed system behavior documentation, and document error handling strategies. Use when reviewing ASCII mockups to validate design against actual user needs, understand system workflows, and ensure completeness before moving to implementation.
academic-reviewer
Expert guidance for reviewing academic manuscripts submitted to journals, particularly in political science, economics, and quantitative social sciences. Use when asked to review, critique, or provide feedback on academic papers, research designs, or empirical strategies. Emphasizes methodological rigor, causal identification strategies, and constructive feedback on research design.
systematic-literature-review
当用户明确要求"做系统综述/文献综述/related work/相关工作/文献调研"时使用。AI 自定检索词,多源检索→去重→AI 逐篇阅读并评分(1–10分语义相关性与子主题分组)→按高分优先比例选文→自动生成"综/述"字数预算→资深领域专家自由写作(固定摘要/引言/子主题/讨论/展望/结论),保留正文字数与参考文献数硬校验,强制导出 PDF 与 Word。支持多语言翻译与智能编译(en/zh/ja/de/fr/es)。
spec-review
How to verify implementation against OpenSpec artifacts
reviewing-agent-prompting
Review and improve prompts for coding agents. Use PROACTIVELY when auditing, checking, or evaluating agent instructions, system prompts, or task delegation text. Applies state-machine thinking to identify structural gaps and improve effectiveness.
review-changes
Orchestrate multiple review agents for a comprehensive pre-PR code review. Analyzes diff, verifies intent alignment with linked issues, and checks for broader codebase impacts. Use before opening a PR to catch bugs, security issues, silent failures, and performance problems. Keywords: review, code review, pre-PR, diff review, check changes, audit changes
review-agents-md
Creates minimal, effective AGENTS.md files using progressive disclosure. Triggers on "create agents.md", "refactor agents.md", "review my agents.md", "claude.md", or questions about agent configuration files. Also triggers proactively when a project is missing AGENTS.md.
review-agent-native
Use this skill when reviewing code to ensure features are agent-native - that any action a user can take, an agent can also take, and anything a user can see, an agent can see. This enforces the principle that agents should have parity with users in capability and context.
quant-plan-reviewer
Use when reviewing implementation plans for quantitative trading systems before execution - catches data leakage, look-ahead bias, scalability risks, and production pitfalls