branches-cleanup
Automatically clean up local git branches that have been merged into the base branch
SKILL.md.claude/skills/branches-cleanup/SKILL.md
GitHubCleanup Merged Branches
Automatically clean up local git branches that have been merged into the base branch.
Instructions
When this skill is invoked manually, clean up merged branches:
- Run
git branch --merged <base-branch>to find branches merged into the base branch - Exclude protected branches:
develop,main,master - For each merged branch found, delete the local branch with
git branch -d <branch> - Report what was cleaned up
Protected Branches (NEVER delete)
developmainmaster
Automation
This skill automatically runs after git pull via the PostToolUse hook in .claude/settings.json.