/workflows-development:git-cleanupfrom workflows-development
Prunes merged/stale branches, detects orphaned branches, and runs repository health checks including large files and dangling refs.
Ships in workflows-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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/git rev-parse --is-inside-work-tree) — except for all action which scans directoriesall), tell the user and stopThe following branches are NEVER suggested for deletion: main, master, develop
git fetch --prunegit symbolic-ref refs/remotes/origin/HEAD 2>/dev/null or fall back to main/master)git branch --merged <default> — local branches already merged into defaultgit branch -vv — look for [origin/...: gone] entriesgit branch -d <branch> (safe delete)-d (unmerged), warn the user and offer -D with explicit explanation that commits may be lost — only proceed with user confirmationgit log -1 --format='%ci' <branch>git branch -d first; offer -D only with warning if unmergedRun a comprehensive repository health check:
Repository size:
.git directory size: du -sh .gitdu -sh . --exclude=.git (or equivalent)git count-objects -vHLarge files (top 10 by size in history):
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | awk '/^blob/ {print $3, $4}' | sort -rn | head -10Dangling objects:
git fsck --no-reflogs 2>&1 — look for dangling commits, blobs, treesgit gc if significantWorktrees:
git worktree list — show active worktreesRemote status:
git remote -v — list remotesStale tracking branches:
git remote prune origin --dry-run — branches that would be prunedPresent findings with recommendations
If cleanup is recommended (gc, prune), show the commands but always ask before running them
~/Projects/:
find ~/Projects -maxdepth 3 -name .git -type dgit push origin --delete on protected branchesgit gc without askingall — don't batch-delete across reposgit branch -d (safe delete) first; only offer -D with explicit warningWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub specterops/skills --plugin workflows-development6 skills in this plugin
/git-mergeComplex git operations — merge conflict resolution, cherry-picks, rebases. Use when merging branches, resolving conflicts, cherry-picking commits, or rebasing./git-preflightPre-commit and pre-edit git checklist — staged diff code-review, macOS case renames, remote branch sync verification. Run before committing or starting work on a feature branch./readme-generationGenerate a professional README.md for a project. Works on local codebases and remote GitHub repos. Use when a project needs a README, when an existing README is outdated, or when documenting someone else's tool.Other plugins' skills for the same job