Lists and removes stale local and remote branches that have been merged
Scanned 6/1/2026
Install via CLI
openskills install berkcangumusisik/claude-code-practices---
name: branch-cleanup
description: Lists and removes stale local and remote branches that have been merged
user-invocable: true
allowed-tools: Bash(git *)
effort: low
---
## Branch Cleanup
1. Show current state:
```bash
git branch -vv
git branch --merged main 2>/dev/null || git branch --merged master
```
2. List candidates for deletion:
- Local branches merged into main/master
- Local branches with gone remote tracking refs
- Remote branches merged into main (requires confirmation)
3. Show the list to the user with what would be deleted. Ask for confirmation before deleting anything.
4. On confirmation:
```bash
# Delete merged local branches (never delete main/master/develop/staging)
git branch --merged main | grep -vE '^\*|main|master|develop|staging' | xargs -r git branch -d
```
5. Report what was deleted and what was skipped.
No comments yet. Be the first to comment!
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...