ai-git-cleanup
From the author
Removes finished local git work in one automatic pass, with no question and no name to type: dead worktrees first (`git worktree remove`, then `git worktree prune`), then branches already merged into the local `main`, then the branches a squash-merged pull request left behind (tree identical to `origin/main`, tagged before deletion). Trigger for "tidy up", "tidy up these branches", "tidy branches", "delete old branches", "start fresh", "limpieza de branches", "limpia branches", or by naming ai-git-cleanup. A branch that is not merged into `main` is left alone — unless its tree is byte-identical to `origin/main`, which is what a squash-merged pull request looks like afterward; the pass deletes those with the proof in hand, tags the tip, and never force-deletes anything else. Not for pushing, not for remote branches, not for opening a pull request.
Install
npx skills add arcasilesgroup/ai-engineering --skill ai-git-cleanup -a claude-code
Installs to .claude/skills/ai-git-cleanup/ · Each command fetches the skill straight from GitHub with the open skills CLI.
Byte-identical to the scanned commit, with the repository’s licence and a SOURCE.txt.
Want your agent to suggest skills while you type? See how to use skills from your IDE.
Safety checks on SKILL.md
No warnings.
Why 82
aiqbench computes the trust score from public signals. It is not a security audit, so read a skill before you install it.
Similar skills
Closest to this one by what they do and when they are used.
- cleanupdavepoon/buildwithclaudeReclaim disk space and prune branches left behind by AI coding agents - merged or abandoned git worktrees, merged branches, stale build artifacts (node_modules, .venv, target), old archives and backups, package caches, and old agent session logs. Use when the user runs /cleanup, says the disk is full, or asks to clean up worktrees, branches, or storage.Engineering★ 3.7K
- git-cleanupOutlineDriven/outline-driven-developmentUse when the user explicitly invokes branch or worktree cleanup for a repo with accumulated local branches. Don't use for remote branch deletion or force-push operations.Engineering★ 54
- git-branch-cleanupgotalab/skillportAnalyzes and safely cleans up local Git branches. Categorizes branches by merge status, staleness, and remote tracking. Provides interactive selection with safety guards. Use when the user wants to clean up branches, delete old branches, organize Git branches, or asks about which branches can be safely deleted.Engineering★ 418
- tidy-branchesGoldziher/ai-rulezCleans up stale git branches. Use when the repository has many merged branches.Engineering★ 163
- pr-merge-cleanuppostmelee/hyper-waterfall在确认 PR merge 后应用 cleanup。 关闭 GitHub Issue,删除远程 publish/task{N} branch, 清理本地 local/task{N} branch 和 separate worktree,并返回 {BASE_BRANCH}。 只在 PR 实际 merge 后调用。Productivity★ 82
- worktreesericrisco/rsc-harnessUse when work is about to become commits and needs isolation first — check the tree state, then branch or cut a git worktree off a clean base (native EnterWorktree first, git fallback) so implement never runs on main. NOT what may run concurrently inside those workspaces (that is `parallel`), NOT the merge/cleanup after (that is `ship`).Engineering★ 272
Ratings & reviews
—
no reviews
Tried this skill? Rate it to help others. Sign in
Discussion
Join the discussion. Sign in