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 pivoshenko/pivoshenko.ai --skill git-branches-cleanupgit clone --depth 1 https://github.com/pivoshenko/pivoshenko.aiWrote 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/pivoshenko/pivoshenko.ai/git-branches-cleanup)<a href="https://agentmods.dev/skills/pivoshenko/pivoshenko.ai/git-branches-cleanup"><img src="https://agentmods.dev/badge/skills/pivoshenko/pivoshenko.ai/git-branches-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/pivoshenko/pivoshenko.ai/git-branches-cleanup"><img src="https://agentmods.dev/badge/skills/pivoshenko/pivoshenko.ai/git-branches-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.00099 | $0.00833 |
| Opus 5 | $0.00049 | $0.00417 |
| Sonnet 5 | $0.00020 | $0.00167 |
| Haiku 4.5 | $0.00010 | $0.00083 |
Grade A, and why
git-branches-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 4d 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 — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cleanup Branches
Prune locals = merged OR remote gone. Destructive -> preview + confirm.
Flow
- If user mentioned keep-patterns inline (e.g. "but keep
spike/*") -> capture them. Else assume none. Don't prompt up front. - Parallel:
git fetch --all --prunegit branch --show-current
- Base: user names one -> use it. Else detect:
git symbolic-ref --short refs/remotes/origin/HEAD-> strip theorigin/; ref missing ->git remote set-head origin -a, re-read; no remote ->main, fall backmaster. Why -> this is a delete path, and--merged <wrong-base>misclassifies live branches as merged. Compare againstorigin/<base>, not the local ref -> the local base is often stale or absent entirely (git-branch-createbranches offorigin/<base>without ever creating it), so a local-ref check either errors or reports branches as unmerged that the remote already has. - Candidates:
- Gone: upstream gone.
git for-each-ref --format='%(refname:short) %(upstream:track)' refs/heads \ | awk '$2 == "[gone]" {print $1}' - Merged: fully merged into the remote base (step 1 already fetched + pruned).
git branch --merged origin/<base> --format='%(refname:short)' - Note: squash-merged PRs leave no merge commit, so they won't appear in Merged. Closing the PR deletes the remote -> they show up in Gone instead. The Gone bucket is the catch-all for PR-merged work.
- Union. Exclude:
- current
- base (
main/master) - protected: any long-lived branch the repo treats as non-disposable if present (e.g.
develop,release/*,staging). Skip silently if none exist. - user keep-patterns from step 0 (if provided).
- Gone: upstream gone.
- Print grouped by reason (gone vs merged), one line per branch, no prose. Ask confirm.
- On confirm:
- Merged:
git branch -d <name>.-dre-checks against HEAD/upstream, notorigin/<base>, so it can refuse a branch the Merged bucket listed -> that's a safe refusal, not a bug: report it as skipped, don't reach for-D. - Gone + unmerged:
git branch -D <name>. Explicit confirm only.
- Merged:
- Print summary: counts + one line per skipped branch (+ why). No recap of what was already listed.
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.
- 4d ago Changed 7ef456e2483f
- 9d ago First seen · 50 lines · 99 tokens per session scan A 366792b43972
git-branches-cleanup is a skill published in the GitHub repository pivoshenko/pivoshenko.ai (4 stars, last pushed 4d ago), licensed MIT. It adds 99 tokens to every session and 833 once invoked, about $0.0005 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
skill-upstream-pr
Improve an open-source GitHub skill and open a friendly suggestion PR upstream: fork, run skill-auto-improver, attach asm eval before/after metrics. Don't use for local-only skills, authoring from scratch, bulk repos, or registry publish.
80-livekit-agents-majiayu000-claude-skill-registr
Create your LiveKit Agents skill from official documentation, then learn to improve it throughout the chapter.
agent-creation-skill
Procedural guide for creating new agents from templates when project complexity requires delegation.
agent-creator
Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use…
ac-commit-manager
Manage git commits for autonomous coding. Use when committing feature implementations, creating descriptive commits, managing git workflow, or handling version control.
agent-commit
Analyze changes and create a meaningful commit with agent authorship. Internal skill for evolveloop.