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 gspencergoog/skills --skill branch-cleanupgit clone --depth 1 https://github.com/gspencergoog/skillsWrote 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/gspencergoog/skills/branch-cleanup)<a href="https://agentmods.dev/skills/gspencergoog/skills/branch-cleanup"><img src="https://agentmods.dev/badge/skills/gspencergoog/skills/branch-cleanup/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/gspencergoog/skills/branch-cleanup"><img src="https://agentmods.dev/badge/skills/gspencergoog/skills/branch-cleanup.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.00103 | $0.01697 |
| Opus 5.5 | $0.00041 | $0.00679 |
| Sonnet 5.5 | $0.00021 | $0.00339 |
| Haiku 4.5 | $0.00010 | $0.00170 |
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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Branch Cleanup Skill
Finds branches whose work has landed and deletes them, together with their worktrees and, on request, their remote tracking branches.
The script runs in two phases. analyze inspects the repository and writes a
plan saying what it believes is safe to delete and why. --execute reads that
plan back, checks every branch tip still matches, and only then deletes
anything. Nothing is deleted without a plan.
Workflow
-
Analyze. This fetches every remote first, because a merge verdict measured against stale refs is worthless.
python3 scripts/cleanup_branches.py --repo-dir /path/to/repoThe plan is printed and written to
<repo>/.git/branch-cleanup-plan.jsonalongside a readable.mdversion. Use--outto put it elsewhere. -
Read the plan. Every branch carries a verdict and the evidence behind it. Check the Needs review section by hand. When the
a2ui-paneplugin is available (render_a2uiis reachable as a native or lazy MCP tool) and the plan reportsDIVERGEDorUNKNOWNbranches under Needs review, read thegenuiskill and render atriage_matrixsurface in the pane so the user can classify each branch (Delete,Keep,Inspect); otherwise present the Markdown summary and ask via your interactive question tool or chat. -
Confirm and execute. Before running
--execute, request confirmation via an inlineconfirm_gatesurface ingenui(whena2ui-paneis available) or via your interactive question tool / chat (waiting for approval):python3 scripts/cleanup_branches.py --execute /path/to/plan.json
Verdicts
Only CONTAINED and SQUASHED are deleted.
| Verdict | Meaning |
|---|---|
CONTAINED |
The branch is an ancestor of a target, or every commit has an equivalent patch there. |
SQUASHED |
Merging the branch into the target changes nothing, so its content already landed. |
DIVERGED |
Neither git nor the pull request data shows the work landing. |
UNKNOWN |
The evidence is inconclusive. Reported for review, never deleted. |
PROTECTED |
Excluded by rule. The reason is recorded in the plan. |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 Changed · -1 tokens per session f4caaa9eef1a
- 10d ago Changed · +7 lines · +50 tokens per session daafc21de535
- 14d ago Changed · +7 lines 39d118ae788a
- 1mo ago Changed · +103 lines acafc3c5ce09
- 1mo ago Changed · +2 lines 553043df16dc
- 2mo ago First seen · 35 lines · 54 tokens per session scan A 01a9e9e93415
branch-cleanup is a skill published in the GitHub repository gspencergoog/skills (2 stars, last pushed today), licensed Apache-2.0. It adds 103 tokens to every session and 1,697 once invoked, about $0.0004 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.
Other skills, from other repositories
merge-batch
Prepare and merge an owner-selected PR batch with contributor credit and exact-candidate admission. Use for a pasted PR list; combined focused validation is diagnostic, and every actual landing still requires its applicable checks and authorization.
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
release-helper
Ensures configuration and code changes are released correctly. Use PROACTIVELY whenever you edit config.json, change any setting, or fix a configuration bug in this project, so the change reaches production.