prune-branches

prune-branches is a skill for Claude Code from wardawgmalvicious/agent-config. It costs 153 tokens per session (3,997 once invoked), scanned A, original, MIT.

A Git branch audit that checks local branches, remote branches, and branches tied to worktrees. It separates branches that are safe to remove, stale branches, and branches that still contain unmerged work.

In plain words
What is it for?
Use it to review a repository's branch list, rescue unmerged work onto a verified branch, and get exact commands for cleaning up safe branches.
Why use it?
It reduces the risk of deleting work that was not merged, including work missed by Git's usual merge checks after a squash merge. It recommends deletion commands but leaves the destructive action to the user.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to review a repository's branch list, rescue unmerged work onto a verified branch, and get exact commands for cleaning up safe branches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wardawgmalvicious/agent-config/prune-branches
Install

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.

Any agent
npx skills add wardawgmalvicious/agent-config --skill prune-branches
Clone the repo
git clone --depth 1 https://github.com/wardawgmalvicious/agent-config

Made for: Claude Code.

Wrote 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.

agentmods badge for prune-branches

README.md
[![agentmods](https://agentmods.dev/badge/skills/wardawgmalvicious/agent-config/prune-branches/github.svg)](https://agentmods.dev/skills/wardawgmalvicious/agent-config/prune-branches)
Your own site
<a href="https://agentmods.dev/skills/wardawgmalvicious/agent-config/prune-branches"><img src="https://agentmods.dev/badge/skills/wardawgmalvicious/agent-config/prune-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.

agentmods 80×15 button for prune-branches

Your own site · 80×15
<a href="https://agentmods.dev/skills/wardawgmalvicious/agent-config/prune-branches"><img src="https://agentmods.dev/badge/skills/wardawgmalvicious/agent-config/prune-branches.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 153 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,997 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00153 $0.03997
Opus 5.5 $0.00061 $0.01599
Sonnet 5.5 $0.00031 $0.00799
Haiku 4.5 $0.00015 $0.00400

Measured 1mo ago against content hash d93f59de7f47, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prune-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 1mo 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.

skills/workflow/prune-branches/SKILL.md · 333 lines

How it starts

The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pruning branches

Enumerate every branch a repo carries, establish for each whether its work is already in main, and end at a verdict table plus the exact deletion command for the user to run.

Audit and report is the design, not caution

Read this before deciding the ladder below is over-careful and the obvious finish is to delete the safe branches yourself.

The deletion is not yours to run, and attempting it burns the turn. Claude Code's auto-mode classifier denies git push origin --delete as [Git Destructive]. That denial is correct and it is not going away, so a skill whose payoff step is the deletion fails its last step every time — observed on four branches that had already been verified safe. A verified recommendation is where the value actually is and where the permission model already allows it to land.

The local half is not the soft half. In a squash repo git branch -d refuses the very branches the audit clears — its merged check is the one rung 2 says is wrong — so the only local deletion that works is -D, the forced form, on a verdict git itself disputes. Measured 2026-09-14: after git merge --squash, git branch --merged main omitted the branch and -d answered not fully merged. Not local, not remote: both go in the command string.

So the output is a table and a command string. The user runs it.

An instruction to delete does not lift this. "Just delete them", "don't make me run anything", "I trust your call on which are dead" — each is the case this section exists for, not a waiver of it. The two reasons above are reasons, not conditions: a permission mode the user could loosen and a -d the user could force do not make the deletion yours once they are gone. Reasoning from the mechanism is exactly how the refusal was lost — measured 2026-09-14 on both invocation paths, under a query that delegated the classification: the skill read its own no-delete rule as the user's to waive, and used the -D fact as guidance for deleting rather than grounds for not. The shape to hold is land's Absolute constraints — an instruction to do these is a stop, not an override. Say so once, give the table and the command, and stop.

Read the full file on GitHub · 333 lines

Changes

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.

  1. 1mo ago Changed · +4 lines d93f59de7f47
  2. 2mo ago Changed · +5 lines 0afa630b766d
  3. 2mo ago Changed · +12 lines fea66cdf2a6a
  4. 2mo ago First seen · 312 lines · 153 tokens per session scan A 6503a9174a44

Subscribe to this mod's changes

prune-branches is a skill published in the GitHub repository wardawgmalvicious/agent-config (1 stars, last pushed 1mo ago), licensed MIT. It adds 153 tokens to every session and 3,997 once invoked, about $0.0006 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-09-16.

Related

prune-branches compared with skills from other repositories

prune-branches next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
prune-brancheswardawgmalvicious/agent-configSkill11mo agoMITA153Claude Code
update-changelogAzure/azure-sdk-for-netSkill6.1kyesterdayMITA25Claude Code, Codex
release-notesAzure/azure-sdk-for-javaSkill2.6k2d agoMITA50Claude Code, Codex
codegenAzure/azure-sdk-for-javaSkill2.6k2d agoMITA37Claude Code, Codex
cosmos-pre-commit-validationAzure/azure-sdk-for-rustSkill8903d agoMITA35Claude Code
bitbucketArvo-AI/auroraSkill470todayApache-2.0A23Claude Code
multi-repo-releaseAzure/GPT-RAGSkill1.2k2mo agoMITA56Claude Code, Codex