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 skills add thettwe/nyann --skill cleanup-branchesgit 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/skills/thettwe/nyann/cleanup-branches)<a href="https://agentmods.dev/skills/thettwe/nyann/cleanup-branches"><img src="https://agentmods.dev/badge/skills/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/skills/thettwe/nyann/cleanup-branches"><img src="https://agentmods.dev/badge/skills/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.00144 | $0.00765 |
| Opus 5 | $0.00072 | $0.00382 |
| Sonnet 5 | $0.00029 | $0.00153 |
| Haiku 4.5 | $0.00014 | $0.00076 |
Grade A, and why
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 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 — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
cleanup-branches
Wraps bin/cleanup-branches.sh. Lists local branches whose tip is
reachable from the base branch (main / develop / wherever the
profile points), then either previews the list or actually deletes
them with git branch -d (safe — refuses unmerged work).
Mirrors the same preview-then-mutate contract as undo and
migrate-profile: nothing is deleted unless the caller passed
--yes AND --dry-run was absent.
1. Run the preview
Always invoke without --yes first:
bin/cleanup-branches.sh --target <cwd>
Output is a CleanupBranchesResult JSON (see
schemas/cleanup-branches-result.schema.json). Show the user:
- The base branch the merge check ran against (
base_branch). - The list of candidates (
candidates[]), one per merged branch, with last-commit timestamp + short SHA so they can sanity-check. - The total count from
summary.candidates_count. - The recovery hint: re-run with
--yesto delete.
If summary.candidates_count == 0, tell the user there's nothing
to clean up and exit. Don't prompt.
2. Confirm and apply
Ask: "Delete N merged branch(es)?" — list the names if there are 5 or fewer, or summarise if more. On confirmation:
bin/cleanup-branches.sh --target <cwd> --yes
The script uses git branch -d (lowercase d, the safe form) so even
if a candidate's merge state changed between the preview and the
apply, git will refuse the unsafe delete and the entry lands in
errors[] instead of deleted[]. Surface any errors verbatim.
3. After deletion
- Report
summary.deleted_countand any entries inerrors[]. - Suggest the user push the deletions to the remote if they
maintain a personal fork branch list:
Don't run this for them — pushing is a high-blast-radius action and the user should pick which deletions to mirror.git push --delete origin <branch> # per branch
When to hand off
- "Why is X still here?" → it's not reachable from base. Run
/nyann:doctorand look at theLOCAL BRANCHESrow forstale_unmergedcount, or invokebin/check-stale-branches.shdirectly to see the full classification. - "Delete a specific branch by name" → just
git branch -D <name>. This skill is for the bulk-merged case. - "Prune the remote-tracking refs too" →
git remote prune originis what they want; not in scope here.
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 · 81 lines · 144 tokens per session scan A 4e8235b4776b
cleanup-branches is a skill published in the GitHub repository thettwe/nyann (6 stars, last pushed 10d ago), licensed MIT. It adds 144 tokens to every session and 765 once invoked, about $0.0007 per session on Opus 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.
Other skills, from other repositories
release
CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on make ci, commit, tag vX.Y.Z, and create the GitHub release. Use when shipping a new plugin version. NOT distributed.
catchup
Summarize and review what changed while you were away. Use after a weekend, vacation, or flight to check missed PRs, git commits, Linear tickets, and meetings — one prioritized brief, not a firehose.
pr-review
Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.
phx-pr-review
Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.
watch-pr
Watch an Elixir/Phoenix PR with an Amp Orb keep-alive lease until required non-deployment CI is green and review threads are resolved. Use after opening or updating a PR.
pr-create
Creates a pull request from current changes, monitors GitHub CI, and debugs any failures until CI passes. Activate when the user says "create pr", "make a pr", "open pull request", "submit pr", "pr for these changes", or wants to get their current work into a reviewable PR. Assumes the project uses git, is hosted on…