← ClaudeAtlas

prune-brancheslisted

Audits every branch a repo carries — local, remote, and worktree-pinned — and sorts them into safe to delete, stale, and carrying unmerged work, rescuing the last group onto a fresh verified branch before recommending anything. Built for repos that squash-merge, where `git branch --merged` and `git cherry` both report merged branches as unmerged because patch-ids never match, so merge evidence has to come from the PR list instead. Separates a stale remote-tracking ref from a branch that really is still on the remote. Reports and recommends; never deletes a branch and never pushes a deletion. Complements land-branch, which prevents this debris on the happy path — this cleans up what never took it.
wardawgmalvicious/claude-plugins · ★ 0 · Code & Development · score 78
Install: claude install-skill wardawgmalvicious/claude-plugins
# 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