Borrowing it
Nothing to install: this file belongs to Oolab-labs/patchwork-os. 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/Oolab-labs/patchwork-os/main/.claude/commands/review-pr.mdgit clone --depth 1 https://github.com/Oolab-labs/patchwork-osWrote 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/oolab-labs/patchwork-os/review-pr)<a href="https://agentmods.dev/commands/oolab-labs/patchwork-os/review-pr"><img src="https://agentmods.dev/badge/commands/oolab-labs/patchwork-os/review-pr/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/oolab-labs/patchwork-os/review-pr"><img src="https://agentmods.dev/badge/commands/oolab-labs/patchwork-os/review-pr.svg" alt="Reviewed on agentmods" width="80" 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.00008 | $0.01405 |
| Opus 5.5 | $0.00003 | $0.00562 |
| Sonnet 5.5 | $0.00002 | $0.00281 |
| Haiku 4.5 | $0.00001 | $0.00140 |
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 1mo 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.
This is a copy
100% identical to review-pr — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
GitHub PR Code Review
Review pull request #$1 and post findings back to GitHub as a structured code review.
Repository (optional): $2
Step 1: Fetch the PR and Validate State
Call githubGetPRDiff with prNumber $1. If $2 is provided, pass it as repo.
If the tool returns an error, report it to the user and stop.
After fetching, check these conditions before proceeding:
- Closed/merged PR: If
stateisCLOSEDorMERGED, warn the user that the PR is no longer open and ask whether they still want a review. If proceeding, always useCOMMENTevent (neverREQUEST_CHANGESon non-open PRs). - Draft PR: If
isDraftistrue, inform the user this is a draft PR and ask whether to proceed. The author may not be ready for review. - Diff unavailable: If the
difffield starts with"(diff unavailable", inform the user the diff could not be fetched (typically because the head branch was deleted after merge). Stop — inline comments are not possible without a diff. Only a summary review based on metadata can be posted. - Truncated diff: If
truncatedistrue, warn the user that the diff exceeds 256 KB and only a partial review is possible. Note in the review body that the analysis covers the first 256 KB only. Be cautious with inline comments near the end of the visible diff — line numbers may not map correctly. - Incomplete file list: If
filesIncompleteistrue, warn that not all changed files are listed (GitHub API pagination limit). The review will cover only the files visible in the diff.
Step 2: Assess Review Depth
Check the PR metadata to determine review scale:
- Small (< 100 lines changed = additions + deletions): Single-pass review of the entire diff
- Medium (100–500 lines): Review file-by-file, examining each changed file in sequence
- Large (500+ lines): Launch up to 3 parallel Agent subagents, each reviewing a subset of the changed files. Combine their findings before proceeding.
For large PRs, split files into groups and give each agent the relevant portion of the diff with instructions to find bugs, security issues, error handling gaps, and performance concerns.
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.
- 1mo ago First seen · 121 lines · 8 tokens per session scan A 3bfa1304ef7b
review-pr is a command published in the GitHub repository Oolab-labs/patchwork-os (31 stars, last pushed today), licensed MIT. It adds 8 tokens to every session and 1,405 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to review-pr, differing in 0 lines, and is treated as a copy.
Other commands, from other repositories
resolve_pr_parallel
Resolve all PR comments using parallel processing.
create-pr
Context-aware GitHub Pull Request creation and update assistant.
resolve-review
Analyze, verify, and resolve review suggestions from a GitHub PR or local code-review report.
pr
Analyze changes, detect scope issues, and create a well-structured PR.
align
Context-aware alignment. In plan mode it audits the active plan and folds the amendments in. Otherwise it reviews the branch, a named branch, or a pull request against Ion's principles, authors a fix plan, and after approval implements and commits the fixes.
code-review
Review someone else's open GitHub PR — posts a real review with line-anchored inline comments; verdict computed mechanically; mandatory preview gate. Workspace-aware. For your OWN working diff, prefer the bundled /code-review instead.