git-cleanup
Installation
SKILL.md
Git Repository Cleanup
Repository hygiene: prune branches, detect stale work, and check repo health.
Parse the user's input to determine the action:
$git-cleanupor$git-cleanup branches— find and prune merged/stale branches$git-cleanup stale [days]— branches with no commits in N days (default 30)$git-cleanup health— large files, dangling refs, worktrees, repo size$git-cleanup all— scan all git repos under ~/Projects/
Prerequisites
- Verify we're in a git repository (
git rev-parse --is-inside-work-tree) — except forallaction which scans directories - If not in a git repo (and not using
all), tell the user and stop
Protected Branches
The following branches are NEVER suggested for deletion: main, master, develop