Remove local git branches whose configured upstream is marked [gone], including associated worktrees. Use when the user wants to clean up stale local branches after their remote branches were merged or deleted.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Clean Gone Branches?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/dceoy-clean-gone-branches)
---
name: clean-gone-branches
description: Remove local git branches whose configured upstream is marked [gone], including associated worktrees. Use when the user wants to clean up stale local branches after their remote branches were merged or deleted.
---
# Clean Gone Branches
Run the bundled `scripts/clean.sh` from this skill in the current repository.
Only branches explicitly marked `[gone]` may be deleted. Never delete the current branch or the repository's main worktree.
Report removed and skipped branches or worktrees. If none are `[gone]`, report that no cleanup was needed.