Borrowing it
Nothing to install: this file belongs to ddgonzal3/rally. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ddgonzal3/rally/main/.claude/commands/review-pr.mdgit clone --depth 1 https://github.com/ddgonzal3/rallyWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/ddgonzal3/rally/review-pr)<a href="https://agentmods.dev/commands/ddgonzal3/rally/review-pr"><img src="https://agentmods.dev/badge/commands/ddgonzal3/rally/review-pr.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02488 |
| Opus 5 | $0.00000 | $0.01244 |
| Sonnet 5 | $0.00000 | $0.00498 |
| Haiku 4.5 | $0.00000 | $0.00249 |
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 8d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PR Review (Edit, Fix Loop & Stage)
You are a senior engineer orchestrating a thorough, iterative code review. Your goal is to leave the code meaningfully better than you found it.
CRITICAL: All review work MUST be delegated to Task agents. The main agent handles only orchestration (branch detection, merging findings, applying fixes, staging, and reporting). This keeps the main conversation context clean and unaffected by the volume of code read during review.
Step 1: Determine the Base Branch (Main Agent)
This is lightweight — do it directly.
-
If PR number provided:
gh pr view <number> --json baseRefName,headRefName,files -
If branch name provided:
gh pr list --head <branch-name> --json number,baseRefName # If no PR exists, ask the user for the target branch -
If "current branch" or no input:
gh pr view --json baseRefName,number 2>/dev/null # If no PR, detect default branch git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
Store: BASE_BRANCH="<determined-base>"
Step 2: Collect Changed File List (Main Agent)
Run these commands to get the file list and stats — but do NOT read the files yourself:
git diff --name-only $(git merge-base HEAD $BASE_BRANCH)...HEAD
git diff --stat $(git merge-base HEAD $BASE_BRANCH)...HEAD
git log --oneline $(git merge-base HEAD $BASE_BRANCH)...HEAD
Use the file count to decide the review strategy in Step 3.
Step 3: Delegate Review to Task Agents
All code reading and review happens in subagents. Never read changed files or diffs in the main context.
Small PRs (1-4 files, single layer)
Launch one Task agent (subagent_type: general-purpose) with this prompt structure:
You are a senior engineer doing a thorough code review. Review the PR diff and changed files against the checklist below.
BASE_BRANCH: <base>
Changed files: <file list>
## Instructions
1. Run: git diff $(git merge-base HEAD <base>)...HEAD
2. Read each changed file completely
3. Understand what the PR is trying to accomplish
4. Review against EVERY checklist category below
5. For each issue found, note: file, line, severity, description
6. Return your findings in the structured format at the bottom
<include the full Review Checklist from below>
<include the Severity Levels from below>
<include the Output Format from below>
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.
- 8d ago First seen · 276 lines · 0 tokens per session scan A b75a7cb15d51
review-pr is a command published in the GitHub repository ddgonzal3/rally (6 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,488 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-31.
Other commands, from other repositories
devkit.github.review-pr
Provides comprehensive GitHub pull request review with code quality, security, and best practices analysis. Use when reviewing a PR before merging.
speckit.spex.submit
Push and create PR for team review, with optional watch mode for CI monitoring.
git
The pre-finish status: branch, hygiene findings, message checks, workflow lint, template state.
merge-conflict-analysis
You are analyzing merge conflicts for PR #${{ pr-number }}.
code-review
Code review for branch changes. Analyzes git diff between branches with multi-level depth (low/medium/high). Matches changes against task description. Returns structured report with severity levels and verdict.
repo-audit
Audit a codebase (local or remote GitHub/GitLab) against architecture principles and requirements, surfacing drift, risk, and missing decisions.