Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add TOMOSIA-VIETNAM/open-pr/plugin install open-prWrote 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/tomosia-vietnam/open-pr/clean)<a href="https://agentmods.dev/commands/tomosia-vietnam/open-pr/clean"><img src="https://agentmods.dev/badge/commands/tomosia-vietnam/open-pr/clean/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/tomosia-vietnam/open-pr/clean"><img src="https://agentmods.dev/badge/commands/tomosia-vietnam/open-pr/clean.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.00026 | $0.00757 |
| Opus 5 | $0.00013 | $0.00378 |
| Sonnet 5 | $0.00005 | $0.00151 |
| Haiku 4.5 | $0.00003 | $0.00076 |
Grade C, and why
clean scanned grade C with 1 finding 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 9d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
Per worktree, in this order — a bare `rm -rf` leaves a stale worktree registration behind: How it starts
The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CRITICAL:
Read"${CLAUDE_PLUGIN_ROOT}"/core/guardrails.mdFIRST — shared rules, not repeated here. On top of those:
- Deletes ONLY directories under
notebooks/review/*/worktrees/. FORBIDDEN, in the same tree and unrecoverable:memory.md,memories/,templates/,ALWAYS_RULE.md,settings.json,notebooks/review/.git, and any path outsidenotebooks/review/*/worktrees/.- FORBIDDEN: deleting anything before the user answers Step 3.
- Reads no PR and needs no vendor CLI.
This CRITICAL block is the SOLE enforcement layer — no
allowed-toolsbacks it (deliberate).
Step 1 — Find the worktrees
Same layout /open-pr:upgrade searches: notebooks/review/ sits wherever /open-pr:review ran, from
pwd or one level down. FORBIDDEN: cd.
find . -maxdepth 6 -type d -path '*/notebooks/review/*/worktrees/*' 2>&1 | grep -Ev '^\./.*/worktrees/[^/]+/'
None → say there is nothing to clean, STOP.
Step 2 — Narrow, then size
ARGUMENTS non-empty ⇒ keep only worktrees whose <repo> segment it names, case-insensitive; 0
matched ⇒ STOP, listing the <repo>s found. Over what remains — never over what was just dropped,
since each is a full checkout and du walks all of it:
du -sh <each worktree>
Step 3 — Show what would go, then ask
ONE CHOICE per core/guardrails.md, EXACTLY 2 options. Its body lists every worktree by path with its
size and the total ⇒ consent covers a list the user has read:
Remove all N (Recommended)— detail: the reclaimed total; review re-creates a worktree next run ⇒ only disk is lost, unless/open-pr:fixcommitted there and never pushedKeep them— detail: nothing deleted
Subset wanted (free text, or a re-run naming those repos) ⇒ honour it, those only. Keep them ⇒ STOP.
Step 4 — Remove
Per worktree, in this order — a bare rm -rf leaves a stale worktree registration behind:
git -C "<worktree>" rev-parse --git-common-dir # ABSOLUTE <repo>/.git; <repo> = that minus /.git
git -C "<repo>" worktree remove --force "<worktree>"
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.
- 9d ago First seen · 70 lines · 26 tokens per session scan C 384ea89838b8
clean is a command published in the GitHub repository TOMOSIA-VIETNAM/open-pr (42 stars, last pushed 3d ago), licensed MIT. It adds 26 tokens to every session and 757 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
pr
Open a pull request with a description generated from the diff.
ship
Pre-ship pipeline — test, review, then prepare a clean commit.
pr-shepherd
Take every open PR end-to-end — diagnose, fix mechanical failures, stop at the merge gate.
pr
Prepare and open a pull request the senior way: gate, template, scrubbed, everything visible.
status
The state of play, computed fresh: branch, dirty files, the active sprint, open work, index freshness.
done
Finish a task - document, create PR or merge, close.