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.
git clone --depth 1 https://github.com/thettwe/nyannWrote 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/thettwe/nyann/cleanup-branches)<a href="https://agentmods.dev/commands/thettwe/nyann/cleanup-branches"><img src="https://agentmods.dev/badge/commands/thettwe/nyann/cleanup-branches/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/thettwe/nyann/cleanup-branches"><img src="https://agentmods.dev/badge/commands/thettwe/nyann/cleanup-branches.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.00054 | $0.00613 |
| Opus 5.5 | $0.00022 | $0.00245 |
| Sonnet 5.5 | $0.00011 | $0.00123 |
| Haiku 4.5 | $0.00005 | $0.00061 |
Grade A, and why
nyann:cleanup-branches 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 3mo 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.
What it actually says
Plugin root: This is a Claude Code plugin, NOT a CLI tool. Do NOT
search via which, npm list, pip list, or brew list. This file
is at <plugin_root>/commands/. All scripts: <plugin_root>/bin/.
Read the matching skills/*/SKILL.md for the full flow.
/nyann:cleanup-branches
Wraps bin/cleanup-branches.sh. Same --yes-required-to-mutate
contract as /nyann:undo and /nyann:migrate-profile.
When to invoke
- "clean up branches" / "delete merged branches" / "prune local branches" → run this.
- "I see N merged branches in
/nyann:doctor's output" → exact same flow.
Output
A CleanupBranchesResult JSON:
| Mode | Triggered by | What happens |
|---|---|---|
preview |
(default) | List candidates + warn "re-run with --yes". Nothing deleted. |
dry-run |
--dry-run |
Same shape, no warn. Nothing deleted. |
applied |
--yes |
git branch -d per candidate. Failures land in errors[]. |
Safety
git branch -d(lowercase d) refuses to delete an unmerged branch even if the candidate list says it should be safe — race conditions between preview and apply can't drop unmerged work.- Current branch and base branch are never candidates.
- Remote-tracking refs aren't touched. Use
git push --delete origin <branch>separately if you want to mirror to the remote.
See also:
/nyann:doctor— shows the merged-branch count alongside other hygiene signals./nyann:undo— undo the last commit (different shape, same preview-mutate contract).
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.
- 3mo ago First seen · 58 lines · 54 tokens per session scan A 87f6457303ce
nyann:cleanup-branches is a command published in the GitHub repository thettwe/nyann (7 stars, last pushed 23d ago), licensed MIT. It adds 54 tokens to every session and 613 once invoked, about $0.0002 per session on Opus 5.5. 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.
nyann:cleanup-branches compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nyann:cleanup-branchesthettwe/nyann | Command | 7 | 23d ago | MIT | A | 54 | Claude Code |
| genshijin-commitInterfaceX-co-jp/genshijin | Command | 337 | 2d ago | MIT | A | 16 | Claude Code |
| commitfusengine/agents | Command | 34 | 1mo ago | MIT | A | 31 | Claude Code |
| create-pull-requestfusengine/agents | Command | 34 | 1mo ago | MIT | A | 22 | Claude Code |
| fix-pr-commentsfusengine/agents | Command | 34 | 1mo ago | MIT | A | 18 | Claude Code |
| run-tasksfusengine/agents | Command | 34 | 1mo ago | MIT | A | 23 | Claude Code |
| shipCavalry-Collective/visual-stack | Command | 16 | yesterday | MIT | A | 16 | Claude Code |