CommandOpen
Git (pr-review)
Review a pull request by number: fetch the diff, analyze changes, and post review comments.
Review a pull request by number: fetch the diff, analyze changes, and post review comments.
Steps
- Fetch PR details:
gh pr view <number> --json title,body,files,additions,deletions,commits. - Get the full diff:
gh pr diff <number>. - Read the PR description and any linked issues for context.
- Analyze each changed file across dimensions:
- Correctness: Logic errors, edge cases, missing error handling.
- Security: Input validation, credential exposure, injection risks.
- Performance: N+1 queries, unnecessary allocations, missing caching.
- Design: Coupling, naming, abstraction level, API surface.
- Tests: Coverage of new code paths, edge case testing.
- Check that CI checks are passing:
gh pr checks <number>. - Classify findings as CRITICAL, WARNING, or SUGGESTION.
- Present the review summary and offer to post it as a PR review comment.
- If approved, submit:
gh pr review <number> --approve --body "<summary>".
Format
## PR Review: #<number> - <title>
### Critical
- [ ] file.ts:L42 - Description of critical issue
### Warnings
- [ ] file.ts:L15 - Description of warning
### Suggestions
- [ ] file.ts:L88 - Description of suggestion
### Summary
Overall assessment and recommendation (approve/request-changes).Rules
- Review the full diff, not just the latest commit.
- Be specific with line references and provide concrete fix suggestions.
- Limit findings to the 15 most impactful to reduce noise.
- Acknowledge well-written code sections briefly.
- Never auto-approve PRs with critical findings.
Source: https://github.com/rohitg00/awesome-claude-code-toolkit/blob/main/commands/git/pr-review.md
Author: rohitg00, Claude Code toolkit (rohitg00). License: Apache-2.0.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The Codex library holds 7,009 entries. Members can search all of them by meaning and read every one in full.