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/armanzeroeight/fastagent-plugins/branch-cleanupgit clone --depth 1 https://github.com/armanzeroeight/fastagent-pluginsWrote 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/armanzeroeight/fastagent-plugins/branch-cleanup)<a href="https://agentmods.dev/commands/armanzeroeight/fastagent-plugins/branch-cleanup"><img src="https://agentmods.dev/badge/commands/armanzeroeight/fastagent-plugins/branch-cleanup.svg" alt="Measured on agentmods" 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 | $0.00009 | $0.01143 |
| Opus 5 | $0.00005 | $0.00571 |
| Sonnet 5 | $0.00002 | $0.00229 |
| Haiku 4.5 | $0.00001 | $0.00114 |
Grade A, and why
branch-cleanup 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.
How it starts
The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Branch Cleanup
Context
- Current branch: !
git branch --show-current - Local branches: !
git branch --list | wc -l - Remote branches: !
git branch -r | wc -l - Merged branches: !
git branch --merged | grep -v "^\*" | grep -v "main" | grep -v "master" | grep -v "develop" | wc -l
Your Task
Identify and clean up merged and stale branches to maintain a clean repository.
Arguments
--dry-run(optional): Show what would be deleted without actually deleting--remote(optional): Also clean up remote branches--force(optional): Delete unmerged branches (use with caution)
Steps
-
Fetch latest changes:
git fetch --prune -
Identify merged branches:
git branch --merged | grep -v "^\*" | grep -v "main" | grep -v "master" | grep -v "develop" -
Identify stale branches (no commits in 30+ days):
git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short) %(committerdate:relative)' -
Review branches to delete:
- Merged feature branches
- Merged bugfix branches
- Stale branches (no activity in 30+ days)
- Branches with naming like
test-*,tmp-*,wip-*
-
Delete local merged branches:
git branch --merged | grep -v "^\*" | grep -v "main" | grep -v "master" | grep -v "develop" | xargs git branch -d -
Delete remote merged branches (if --remote flag):
git branch -r --merged | grep -v "main" | grep -v "master" | grep -v "develop" | sed 's/origin\///' | xargs -I {} git push origin --delete {} -
Report cleanup results:
- Number of branches deleted
- List of deleted branches
- Remaining active branches
- Disk space saved (if significant)
Examples
Dry run to preview:
/branch-cleanup --dry-run
# Shows what would be deleted without actually deleting
Clean up local branches:
/branch-cleanup
# Deletes merged local branches
Clean up local and remote:
/branch-cleanup --remote
# Deletes merged branches locally and on remote
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 · 178 lines · 9 tokens per session scan A a43cea3eae1f
branch-cleanup is a command published in the GitHub repository armanzeroeight/fastagent-plugins (29 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 1,143 once invoked, about $0.0000 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-09-03.
Other commands, from other repositories
tech-debt
Run bun run check:fix and then bunx knip and identify unused files and functions to refactor the project and simplify. Look at the deprecated features and confirm with the user to delete them. Look at the dependencies and remove the ones that are not needed based on knip results.
doctor
Diagnose installation health. Check Node, CDP bridge, rn-fast-runner (iOS), rn-android-runner (Android), maestro-runner, simulators, Metro, CDP, injected helpers, ffmpeg, physical devices, plugin version, Vercel rules sync. Reports what's missing — does NOT modify your project.
multi-workflow
Run a full multi-model development workflow with research, planning, execution, optimization, and review.
kotlin-test
Enforce TDD workflow for Kotlin. Write Kotest tests first, then implement. Verify 80%+ coverage with Kover.
santa-loop
Adversarial dual-review convergence loop — two independent model reviewers must both approve before code ships.
gan-design
Run a generator/evaluator design loop for frontend or visual work with bounded iterations and scoring.