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-cleanup or $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

  1. Verify we're in a git repository (git rev-parse --is-inside-work-tree) — except for all action which scans directories
  2. 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

Installs
4
GitHub Stars
739
First Seen
Sep 4, 2026