branch-cleaner
CommunitySafely prune stale git branches.
AuthorjMerta
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps developers safely prune stale git branches both locally and on remote repositories, preventing accidental deletions and maintaining branch hygiene.
Core Features & Use Cases
- Identify local branches that have been merged into the base and those that have not
- Identify remote branches that are merged or stale
- Respect protected patterns (base branch, current branch, and user-specified keepers) before deletion
- Provide explicit, confirmable delete or prune commands and a clear audit trail
- Use cases: cleaning up release or feature branches after merging, auditing branch hygiene during release cycles
Quick Start
Sync with remotes and inspect
- Run: git fetch --prune
- Check status: git status Identify candidates
- Local merged into base: git branch --merged <base>
- Local not merged: git branch --no-merged <base>
- Remote merged: git branch -r --merged <base> Review and delete
- Exclude protected: keep <base>, current, and user patterns
- When ready, run the appropriate delete commands for the chosen branches
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: branch-cleaner Download link: https://github.com/jMerta/codex-skills/archive/main.zip#branch-cleaner Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.