Branch Cleanup — Git skill for Claude Code
Clean up merged, stale, and orphaned git branches.
How to install Branch Cleanup
Installs to ~/.claude/commands/kumaran-is-claude-code-onboarding-branch-cleanup.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/kumaran-is/claude-code-onboarding/HEAD/.claude/commands/branch-cleanup.md -o ~/.claude/commands/kumaran-is-claude-code-onboarding-branch-cleanup.md Restart Claude Code, or start a new session, for it to be picked up.
What Branch Cleanup does
Clean up merged, stale, and orphaned git branches.
Alternatives in Git
- Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
- Validate Title Provided — if [ -z "$PLAN_TITLE" ]; then echo "❌ Error: Plan title required" echo "Usage: /sync-todos-to-github \"Plan Ti 618 ★
- Create Worktrees — by evmts - Creates git worktrees for all open PRs or specific branches, handling branches with slashes, cleani 440 ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Mise Clean
Sweep the project for hygiene cruft — junk tracked in git, backup/scratch files, stale branches and orphaned w
Clean Branches
Safely prune merged and stale Git branches: drop dead remote-tracking refs, list merged candidates for review,
Sitemend
SEO regression tests for your repo. Fails the PR when a change breaks crawling or indexing (preview URLs in ca
Pantheon Consolidate
Find and merge duplicate or similar memory entries. /pantheon-consolidate scans for duplicates, shows preview,
Flywheel Cleanup
Clean up orphaned git worktrees from crashed or stopped sessions.
Agy Update
Check for a newer git-clone version of this plugin and pull it after confirmation
Related Agents
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
Branch Hygiene
MUST be used whenever the user asks to find stale, merged, or orphaned git branches, or asks to review/clean u
Issues Cleanup
Analyze GitHub issues, find stale/duplicate/orphaned, create cleanup plan