review-pr

A command for reviewing a GitHub pull request, which is a proposed set of code changes submitted for review.

In plain words
What is it for?
Use it to resolve a pull request reference, inspect its metadata and diff, read related issues and comments, and validate the proposed changes.
Why use it?
It gathers the change list, discussion, linked issues, and review information in a defined order, reducing the chance of missing important context.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/modelcontextprotocol/python-sdk/review-pr
Clone the repo
git clone --depth 1 https://github.com/modelcontextprotocol/python-sdk

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 908 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00908
Opus 5 $0.00000 $0.00454
Sonnet 5 $0.00000 $0.00182
Haiku 4.5 $0.00000 $0.00091

Measured yesterday against content hash 2203ee8d472b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

review-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/review-pr.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Review the pull request: $ARGUMENTS

Follow these steps carefully. Use the gh CLI for all GitHub interactions.

Step 1: Resolve the PR

Parse $ARGUMENTS to determine the PR. It can be:

  • A full URL like https://github.com/owner/repo/pull/123
  • A owner/repo#123 reference
  • A bare number like 123 (use the current repo)
  • A description — search for it with gh pr list --search "<description>" --limit 5 and pick the best match

Once resolved, fetch the PR metadata:

gh pr view <PR> --json number,title,body,author,state,baseRefName,headRefName,url,labels,milestone,additions,deletions,changedFiles,createdAt,updatedAt,mergedAt,reviewDecision,reviews,assignees

Step 2: Gather the diff

Get the full diff of the PR:

gh pr diff <PR>

If the diff is very large (>3000 lines), focus on the most important files first and summarize the rest.

Step 3: Collect PR discussion context

Fetch all comments and review threads:

gh api repos/{owner}/{repo}/pulls/{number}/comments --paginate
gh api repos/{owner}/{repo}/issues/{number}/comments --paginate
gh api repos/{owner}/{repo}/pulls/{number}/reviews --paginate

Pay attention to:

  • Reviewer feedback and requested changes
  • Author responses and explanations
  • Any unresolved conversations
  • Approval or rejection status

Step 4: Find and read linked issues

Look for issue references in:

  • The PR body (patterns like #123, fixes #123, closes #123, resolves #123)
  • The PR branch name (patterns like issue-123, fix/123)
  • Commit messages

For each linked issue, fetch its content:

gh issue view <number> --json title,body,comments,labels,state

Read through issue comments to understand the original problem, user reports, and any discussed solutions.

Step 5: Analyze and validate

With all context gathered, analyze the PR critically:

  1. Intent alignment: Does the code change actually solve the problem described in the PR and/or linked issues?
  2. Completeness: Are there aspects of the issue or requested feature that the PR doesn't address?
  3. Scope: Does the PR include changes unrelated to the stated goal? Are there unnecessary modifications?
  4. Correctness: Based on the diff, are there obvious bugs, edge cases, or logic errors?
  5. Testing: Does the PR include tests? Are they meaningful and do they cover the important cases?
  6. Breaking changes: Could this PR break existing functionality or APIs?
  7. Unresolved feedback: Are there reviewer comments that haven't been addressed?

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 119 lines · 0 tokens per session scan A 2203ee8d472b

Subscribe to this mod's changes

review-pr is a command published in the GitHub repository modelcontextprotocol/python-sdk (24,160 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 908 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.