git-branch-cleanup
Installation
SKILL.md
Git Branch Cleanup
Use this skill to safely remove merged or stale branches with explicit user confirmation.
Safety Rules
- Stop if the working tree is not clean.
- Detect the default branch from
origin/HEADand fall back tomain, thenmaster. - Never delete protected branches.
- Never force delete unless the user explicitly approves.
Workflow
- Check repository state
git status --porcelain- If not clean, ask the user to commit or stash first.