Clean Gone — Git skill for Claude Code
Cleans up all git branches marked as [gone] (branches that have been deleted on the remote but still exist locally), including removing associated worktrees.
How to install Clean Gone
Installs to ~/.claude/commands/alirezarezvani-aeo-box-clean_gone.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/alirezarezvani/aeo-box/HEAD/.claude/commands/clean_gone.md -o ~/.claude/commands/alirezarezvani-aeo-box-clean_gone.md Restart Claude Code, or start a new session, for it to be picked up.
What Clean Gone does
description: Cleans up all git branches marked as [gone] (branches that have been deleted on the remote but still exist locally), including removing associated worktrees.
Your Task
You need to execute the following bash commands to clean up stale local branches that have been deleted from the remote repository.
Commands to Execute
**First, list branches to identify any with [gone] status** Execute this command:
git branch -vNote: Branches with
Alternatives in Git
- Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
- Bulletproof Quick Start Guide — Target Audience: Complete beginners Never used Python/git before 11.1k ★
- Git MCP — GitHub Repo stars Free open-source remote MCP server for any GitHub project Git integration MCP 7.8k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Git.Merge
Merge the current branch's PR, switch to the default branch, and clean up all merged/gone local and remote bra
Branch Cleanup
Clean up merged, stale, and orphaned git branches. Protects main/develop/release/ automatically. Supports --dr
Clean Branches
Safely prune merged and stale Git branches: drop dead remote-tracking refs, list merged candidates for review,
Mise Clean
Sweep the project for hygiene cruft — junk tracked in git, backup/scratch files, stale branches and orphaned w
Cleanup Merged
Clean up worktree and local + remote branch for a merged PR
Commit Fast
by steadycursor - Automates git commit process by selecting the first suggested message, generating structured
Related Agents
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
Delivery Tpm
Delivery control (code: tpm). Reconciles the board with branches, worktrees, pull requests, and gates; keeps o
Git Operations Agent
Repository git specialist for branches, remote sync, and conflict resolution via the Agent tool.