Clean Gone Branches

SkillAI & models

This 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.

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

  1. Update remote references

    • Run git fetch --prune.
  2. Inspect local state

    • Run git branch -vv to find branches marked as [gone].
    • Run git worktree list to see whether any of those branches still have worktrees.
  3. Remove worktrees first

    • For each [gone] branch that still has a worktree, remove the worktree before deleting the branch.
  4. Delete the gone branches

    • Delete each local branch marked as [gone].
  5. 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