/pr-review
Systematic PR review for code quality assurance. Trigger with "review this PR", "check this pull request", "code review", "review please".
$ npx -y skills add wasabeef/claude-code-cookbook --skill pr-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition โ
- You can call itInvoke it directly when you want it.
- Slash command
/pr-review
Context preview
The summary Claude sees to decide when to auto-load this skill.
Systematic PR review for code quality assurance. Trigger with "review this PR", "check this pull request", "code review", "review please".
SKILL.md
pr-review.SKILL.mddescription: 'Systematic PR review for code quality assurance. Trigger with "review this PR", "check this pull request", "code review", "review please".'
allowed-tools:
- Bash(gh *)
- Read
- Grep
- Glob
Systematic PR review for code quality assurance
Ensure code quality and architectural soundness through systematic Pull Request reviews.
Usage
# Comprehensive PR review
gh pr view 123 --comments
"Systematically review this PR and provide feedback from code quality, security, and architecture perspectives"
# Security-focused review
gh pr diff 123
"Focus on reviewing security risks and vulnerabilities"
# Architecture perspective review
gh pr checkout 123 && find . -name "*.js" | head -10
"Evaluate the architecture from the perspectives of layer separation, dependencies, and SOLID principles"
Basic Examples
# Quantitative code quality assessment
find . -name "*.js" -exec wc -l {} + | sort -rn | head -5
"Evaluate code complexity, function size, and duplication, and point out improvements"
# Security vulnerability check
grep -r "password\|secret\|token" . --include="*.js" | head -10
"Check for risks of sensitive information leakage, hardcoding, and authentication bypass"
# Architecture violation detection
grep -r "import.*from.*\.\./\.\." . --include="*.js"
"Evaluate layer violations, circular dependencies, and coupling issues"Comment Classification System
๐ด critical.must: Critical issues
โโ Security vulnerabilities
โโ Data integrity problems
โโ System failure risks
๐ก high.imo: High-priority improvements
โโ Risk of malfunction
โโ Performance issues
โโ Significant decrease in maintainability
๐ข medium.imo: Medium-priority improvements
โโ Readability enhancement
โโ Code structure improvement
โโ Test quality improvement
๐ข low.nits: Minor points
โโ Style unification
โโ Typo fixes
โโ Comment additions
๐ต info.q: Questions/information
โโ Implementation intent confirmation
โโ Design decision background
โโ Best practices sharing
Review Perspectives
1. Code Correctness
- **Logic errors**: Boundary values, null checks, exception handling
- **Data integrity**: Type safety, validation
- **Error handling**: Completeness, appropriate processing
2. Security
- **Authentication/authorization**: Appropriate checks, permission management
- **Input validation**: SQL injection, XSS countermeasures
- **Sensitive information**: Logging restrictions, encryption
3. Performance
- **Algorithms**: Time complexity, memory efficiency
- **Database**: N+1 queries, index optimization
- **Resources**: Memory leaks, cache utilization
4. Architecture
- **Layer separation**: Dependency direction, appropriate separation
- **Coupling**: Tight coupling, interface utilization
- **SOLID principles**: Single responsibility, open-closed, dependency inversion
Review Flow
1. **Pre-check**: PR information, change diff, related issues 2. **Systematic checks**: Security โ Correctness โ Performance โ Architecture 3. **Constructive feedback**: Specific improvement suggestions and code examples 4. **Follow-up**: Fix confirmation, CI status, final approval
Comment Templates
Security Issues Template
**Format:**
- Priority: `critical.must.`
- Issue: Clear description of the problem
- Code example: Proposed fix
- Rationale: Why this is necessary
**Example:**
critical.must. Password is stored in plaintext
Proposed fix:
const bcrypt = require('bcrypt');
const hashedPassword = await bcrypt.hash(password, 12);
Hashing is required to prevent security risks.Performance Improvement Template
**Format:**
- Priority: `high.imo.`
- Issue: Explain performance impact
- Code example: Proposed improvement
- Effect: Describe expected improvement
**Example:**
high.imo. N+1 query problem occurs
Improvement: Eager Loading
const users = await User.findAll({ include: [Post] });
This can significantly reduce the number of queries.Architecture Violation Template
**Format:**
- Priority: `high.must.`
- Issue: Point out architectural principle violation
- Recommendation: Specific improvement method
**Example:**
high.must. Layer violation occurred
The domain layer directly depends on the infrastructure layer.
Please introduce an interface following the dependency inversion principle.
Notes
- **Constructive tone**: Collaborative rather than aggressive communication
- **Specific suggestions**: Provide solutions along with pointing out problems
- **Prioritization**: Address in order of Critical โ High โ Medium โ Low
- **Continuous improvement**: Document review results in a knowledge base
Read more
description: 'Systematic PR review for code quality assurance. Trigger with "review this PR", "check this pull request", "code review", "review please".' allowed-tools: - Bash(gh *) - Read - Grep - Glob
Systematic PR review for code quality assurance
Ensure code quality and architectural soundness through systematic Pull Request reviews.
Usage
# Comprehensive PR review gh pr view 123 --comments "Systematically review this PR and provide feedback from code quality, security, and architecture perspectives" # Security-focused review gh pr diff 123 "Focus on reviewing security risks and vulnerabilities" # Architecture perspective review gh pr checkout 123 && find . -name "*.js" | head -10 "Evaluate the architecture from the perspectives of layer separation, dependencies, and SOLID principles"
Basic Examples
# Quantitative code quality assessment
find . -name "*.js" -exec wc -l {} + | sort -rn | head -5
"Evaluate code complexity, function size, and duplication, and point out improvements"
# Security vulnerability check
grep -r "password\|secret\|token" . --include="*.js" | head -10
"Check for risks of sensitive information leakage, hardcoding, and authentication bypass"
# Architecture violation detection
grep -r "import.*from.*\.\./\.\." . --include="*.js"
"Evaluate layer violations, circular dependencies, and coupling issues"Comment Classification System
๐ด critical.must: Critical issues โโ Security vulnerabilities โโ Data integrity problems โโ System failure risks ๐ก high.imo: High-priority improvements โโ Risk of malfunction โโ Performance issues โโ Significant decrease in maintainability ๐ข medium.imo: Medium-priority improvements โโ Readability enhancement โโ Code structure improvement โโ Test quality improvement ๐ข low.nits: Minor points โโ Style unification โโ Typo fixes โโ Comment additions ๐ต info.q: Questions/information โโ Implementation intent confirmation โโ Design decision background โโ Best practices sharing
Review Perspectives
1. Code Correctness
- **Logic errors**: Boundary values, null checks, exception handling
- **Data integrity**: Type safety, validation
- **Error handling**: Completeness, appropriate processing
2. Security
- **Authentication/authorization**: Appropriate checks, permission management
- **Input validation**: SQL injection, XSS countermeasures
- **Sensitive information**: Logging restrictions, encryption
3. Performance
- **Algorithms**: Time complexity, memory efficiency
- **Database**: N+1 queries, index optimization
- **Resources**: Memory leaks, cache utilization
4. Architecture
- **Layer separation**: Dependency direction, appropriate separation
- **Coupling**: Tight coupling, interface utilization
- **SOLID principles**: Single responsibility, open-closed, dependency inversion
Review Flow
1. **Pre-check**: PR information, change diff, related issues 2. **Systematic checks**: Security โ Correctness โ Performance โ Architecture 3. **Constructive feedback**: Specific improvement suggestions and code examples 4. **Follow-up**: Fix confirmation, CI status, final approval
Comment Templates
Security Issues Template
**Format:**
- Priority: `critical.must.`
- Issue: Clear description of the problem
- Code example: Proposed fix
- Rationale: Why this is necessary
**Example:**
critical.must. Password is stored in plaintext
Proposed fix:
const bcrypt = require('bcrypt');
const hashedPassword = await bcrypt.hash(password, 12);
Hashing is required to prevent security risks.Performance Improvement Template
**Format:**
- Priority: `high.imo.`
- Issue: Explain performance impact
- Code example: Proposed improvement
- Effect: Describe expected improvement
**Example:**
high.imo. N+1 query problem occurs
Improvement: Eager Loading
const users = await User.findAll({ include: [Post] });
This can significantly reduce the number of queries.Architecture Violation Template
**Format:**
- Priority: `high.must.`
- Issue: Point out architectural principle violation
- Recommendation: Specific improvement method
**Example:**
high.must. Layer violation occurred The domain layer directly depends on the infrastructure layer. Please introduce an interface following the dependency inversion principle.
Notes
- **Constructive tone**: Collaborative rather than aggressive communication
- **Specific suggestions**: Provide solutions along with pointing out problems
- **Prioritization**: Address in order of Critical โ High โ Medium โ Low
- **Continuous improvement**: Document review results in a knowledge base
A collection of commands, roles, and automation scripts for Claude Code. Automate your workflow without unnecessary confirmations, allowing you to focus on what matters.
Repo: wasabeef/claude-code-cookbook
Other skills on claude-code-cookbook.
- /analyze-dependencies
Analyze project dependencies and evaluate architectural health. Trigger with "analyze dependencies", "detect circular dependencies", "architecture issues?", "check module coupling", "find layer violations". Generates dependency matrix, fan-in/fan-out analysis, and prioritized
Open skill - /analyze-performance
Performance analysis based on Core Web Vitals with UX scoring. Trigger with "analyze performance", "improve speed", "check Core Web Vitals", "page speed", "improve LCP", "identify performance issues".
Open skill - /check-fact
Verify information accuracy against codebase and documentation. Trigger with "is this correct?", "fact check", "verify this", "is this accurate?".
Open skill - /check-prompt
Evaluate and improve AI prompt quality. Trigger with "check this prompt", "evaluate prompt quality", "improve this prompt".
Open skill - /commit-message
Generate commit messages from staged changes. Trigger with "suggest commit message", "generate commit message", "what should the commit say?", "write commit message".
Open skill - /context7
Search technical documentation via Context7 MCP. Trigger with "check the docs", "look up documentation", "how to use this library?", "API reference".
Open skill

