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.
npx agentmods add commands/oolab-labs/patchwork-os/review-prgit clone --depth 1 https://github.com/Oolab-labs/patchwork-osWhat 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 | $0.00008 | $0.01405 |
| Opus 5 | $0.00004 | $0.00702 |
| Sonnet 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 2d 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.
- 2d 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 (30 stars, last pushed 2d ago), licensed MIT. It adds 8 tokens to every session and 1,405 once invoked, about $0.0000 per session on Opus 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
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.