Clean Gone Branches
SkillAI & modelsThis skill keeps your local git repository tidy. Once added, your AI can find branches that still exist on your machine but were deleted from the remote repository, and delete them for you. It runs when you ask to clean gone branches, remove deleted local branches, or prune branches removed from remote.
Available today. Use it from your connected AI after setup.
No other account needed.
Add the skill, then ask your AI to clean gone branches in your project. You can also invoke it by name with clean-gone-branches.
Then ask your AI: use the Clean Gone Branches skill
What your AI can do with it
- Find local git branches that no longer exist on the remote
- Delete local branches whose remote copies were removed
- Prune branches that were removed from the remote repository
- Clean up gone branches when you ask in plain language
- Respond when you invoke it by the name clean-gone-branches
What this skill tells your AI
The instructions your AI receives, as published by fcakyon/claude-codex-settings in plugins/github-dev/skills/clean-gone-branches/SKILL.md and read by ahel’s review.
Remove local git branches that have been deleted from the remote.
Process
-
Update remote references
- Run
git fetch --prune.
- Run
-
Inspect local state
- Run
git branch -vvto find branches marked as[gone]. - Run
git worktree listto see whether any of those branches still have worktrees.
- Run
-
Remove worktrees first
- For each
[gone]branch that still has a worktree, remove the worktree before deleting the branch.
- For each
-
Delete the gone branches
- Delete each local branch marked as
[gone].
- Delete each local branch marked as
-
Report the result
- List removed worktrees and deleted branches.
- If there are no
[gone]branches, report that nothing needed cleanup.
Signals
- GitHub stars
- 1k
- Forks
- 108
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
clean-gone-branches- Source
- github.com/fcakyon/claude-codex-settings