Clean up local git branches marked as [gone] (deleted on remote but still exist locally). Use when the user wants to clean up stale branches, remove gone branches, or delete branches that no longer exist on remote.
Automatically cleans up local git branches that were deleted on remote (marked as `[gone]`). Triggers when users want to clean stale branches or when you detect `[gone]` branches during git operations.
/plugin marketplace add mixomat/claude-plugins/plugin install git-workflow@mixomat-claude-pluginsThis skill is limited to using the following tools:
Automatically clean up all local git branches that have been deleted from the remote repository (marked as [gone]).
Execute this command to see all local branches and their status:
git branch -v
What to look for:
[gone] have been deleted from the remote+ prefix have associated worktrees and will be skipped (must be cleaned up manually)+ prefix can be safely deleted[gone], inform the user that no cleanup is needed and STOPExecute this command to clean up [gone] branches without worktrees:
git branch -v | grep '\[gone\]' | while read line; do
if [[ $line =~ ^[+] ]]; then
branch=$(echo "$line" | awk '{print $1}' | sed 's/^+//')
echo "Skipping $branch (has worktree - remove worktree first)"
else
branch=$(echo "$line" | sed 's/^[* ]//' | awk '{print $1}')
echo "Deleting branch: $branch"
git branch -D "$branch"
fi
done
What this does:
[gone]+ prefix (worktree exists), skip it and warn the user-D (force delete)After execution, inform the user:
If no branches were marked as [gone], report that no cleanup was needed.
git branch -D (force delete) because [gone] branches are already merged/deleted remotelyExample with branches to clean:
Deleting branch: fix/obsolete-fix
Skipping feature/old-feature (has worktree - remove worktree first)
Deleting branch: chore/cleanup-task
Cleanup complete:
- Deleted 2 branches marked as [gone]
- Skipped 1 branch with worktree
Note: Branches with worktrees must be cleaned up manually using 'git worktree remove' before the branch can be deleted.
Example with no cleanup needed:
No branches marked as [gone] found. Your local repository is already clean.
Example with only worktree branches:
Skipping feature/old-feature (has worktree - remove worktree first)
Skipping fix/another-branch (has worktree - remove worktree first)
Cleanup complete:
- Deleted 0 branches marked as [gone]
- Skipped 2 branches with worktrees
Note: Branches with worktrees must be cleaned up manually using 'git worktree remove' before the branch can be deleted.
If any command fails:
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.