cleanup-git
Installation
SKILL.md
Cleanup Git
Clean local git branches and worktrees after work has merged. Dry-run first. Destructive commands require user approval.
Prefer a repo-local scripts/cleanup-git.sh when the target repo ships one. If it does not, use the bundled skill script from this skill's scripts/ directory. Manual fallback: git fetch --prune, inspect git worktree list, then remove only branches/worktrees that meet the same rules below.
Command
Run from anywhere inside a repository:
scripts/cleanup-git.sh
scripts/cleanup-git.sh --apply
scripts/cleanup-git.sh --apply --force
scripts/cleanup-git.sh --base <ref>