Comprehensive GitHub Pull Request code review skill. Use when asked to "review this PR", "code review", "review pull request", "check this PR", or when a GitHub PR URL is provided. Fetches PR metadata, diff, comments, commits, and related issues using gh CLI. Creates organized review workspace, analyzes code against industry-standard criteria, and optionally adds inline comments to the PR.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
pr-reviewer
description
Comprehensive GitHub Pull Request code review skill. Use when asked to "review this PR", "code review", "review pull request", "check this PR", or when a GitHub PR URL is provided. Fetches PR metadata, diff, comments, commits, and related issues using gh CLI. Creates organized review workspace, analyzes code against industry-standard criteria, and optionally adds inline comments to the PR.
pr/review.md - Detailed internal review with emojis and line numbers
pr/human.md - Clean review for posting (no emojis, em-dashes, line numbers)
pr/inline.md - Proposed inline comments with code snippets
Also creates slash commands in .claude/commands/:
/send - Post human.md and approve PR
/send-decline - Post human.md and request changes
/show - Open review directory in VS Code
Findings JSON structure:
{"summary":"Overall assessment of the PR...","metadata":{"repository":"owner/repo","number":123,"title":"PR title","author":"username","head_branch":"feature","base_branch":"main"},"blockers":[{"category":"Security","issue":"SQL injection vulnerability","file":"src/db/queries.py","line":45,"details":"Using string concatenation for SQL query","fix":"Use parameterized queries","code_snippet":"result = db.execute('SELECT * FROM users WHERE id = ' + user_id)"}],"important":[...],"nits":[...],"suggestions":["Consider adding...","Future enhancement..."],"questions":["Is this intended to...","Should we..."],"praise":["Excellent test coverage","Clear documentation"],"inline_comments":[{"file":"src/app.py","line":42,"comment":"Consider edge case handling for empty input","code_snippet":"def process(data):\n return data.strip()","start_line":41,"end_line":43,"owner":"owner","repo":"repo","pr_number":123}]}
Step 4: Review and Edit Files
Use /show to open the review directory in VS Code.
Actions available:
Read pr/review.md - Detailed analysis
Edit pr/human.md - Modify before posting
Review pr/inline.md - Check proposed comments
Adjust any content as needed
NOTHING is posted until explicit approval in Step 5.
Step 5: Approve and Post
Post the review when ready:
Option A: Approve the PR
/send
Posts pr/human.md as comment
Approves the PR
Confirms action
Option B: Request Changes
/send-decline
Posts pr/human.md as comment
Requests changes on the PR
Confirms action
Posting inline comments (optional, after /send or /send-decline):
Review pr/inline.md and run the provided commands for specific code comments.
Step 6: Apply Review Criteria
Reference references/review_criteria.md for comprehensive checklist. Review against these categories:
Category
Key Questions
Functionality
Does code solve the problem? Bugs? Edge cases?
Readability
Clear code? Meaningful names? DRY?
Style
Follows linter rules? Consistent with codebase?
Performance
Efficient algorithms? Scalable?
Security
Vulnerabilities addressed? Secrets protected?
Testing
Tests exist? Cover happy paths and edge cases?
PR Quality
Focused scope? Clean commits? Clear description?
Priority markers for findings:
Blocker: Must be fixed before merge
Important: Should be addressed
Nit: Nice to have, optional
Suggestion: Consider for future
Question: Clarification needed
Praise: Good work
For detailed criteria: Read references/review_criteria.md
Reference Documentation
This skill includes comprehensive reference guides:
Reference
Purpose
references/review_criteria.md
Complete checklist covering functionality, security, testing, and more
references/gh_cli_guide.md
Quick reference for GitHub CLI commands
references/scenarios.md
Detailed workflows for common review scenarios
references/troubleshooting.md
Common issues and solutions
Scripts Reference
scripts/fetch_pr_data.py
Automated PR data fetching and organization.
python scripts/fetch_pr_data.py <pr_url> [options]
Options:
--output-dir DIR Base output directory (default: /tmp)
--no-clone Skip cloning repository
scripts/generate_review_files.py
Generate structured review files from analysis findings.
pr/inline.md - Proposed inline comments with commands
.claude/commands/send.md - Slash command to approve and post
.claude/commands/send-decline.md - Slash command to request changes
.claude/commands/show.md - Slash command to open in VS Code
REVIEW_READY.txt - Summary of next steps
scripts/add_inline_comment.py
Add inline code review comments to specific lines in PR.
python scripts/add_inline_comment.py <owner> <repo> <pr_number> <commit_id> <file_path> <line> "<comment>" [options]
Options:
--side RIGHT|LEFT Side of diff (default: RIGHT)
--start-line N Starting line for multi-line comment
--start-side RIGHT|LEFT Starting side for multi-line comment
Best Practices
Communication
Frame feedback as suggestions, not criticism
Explain why an issue matters, not just what is wrong
Acknowledge excellent practices
Prioritize blockers first, style issues last
Review Efficiency
Use scripts to automate data fetching and comment posting
Reference review_criteria.md as checklist
Focus: Critical issues > Important > Nice-to-have
Review promptly (within 24 hours if possible)
Inline Comments
Reference exact lines and files
Provide better alternatives
Test inline comments on test PRs first
Use sparingly to avoid overwhelming
PR Size Handling
Large PRs (>400 lines): Suggest splitting
Review in logical chunks
Focus on architecture for large changes
For detailed scenarios: Read references/scenarios.md