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 ★
- 40+ Claude Code Tips — Tips for getting the most out of Claude Code, including a custom status line script, cutting the system prompt 5.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,
Git Contribute Finish
Clean up after your claude-harness pull request merged, by updating master and deleting the feature branch loc
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
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
Merge Integrator
Integration specialist that merges parallel work (branches, worktrees, or multiple agents' changes) into one c