← ClaudeAtlas

github-cleanuplisted

Find local branches whose work already reached the default branch (including squash merges), confirm with the user, then delete them and their worktrees. USE WHEN the user runs /github-cleanup, or asks to clean up, prune or delete merged/stale local branches or worktrees. Not for remote branches or for rewriting history (see github-squash).
OpenThrottle/monorepo · ★ 2 · Code & Development · score 71
Install: claude install-skill OpenThrottle/monorepo
# github-cleanup Deleting a local branch is cheap to do and expensive to get wrong: a squash-merged branch looks _unmerged_ to git (`git branch --merged` misses it), and a branch with one unpushed commit looks just like it. This skill shows the user evidence for every branch, gets **one** yes, and acts on exactly what was approved. The flow is **Report → Confirm → Act → Housekeeping**. Never skip Confirm. ## 1. Report Run the bundled classifier from this skill's directory (it fetches with `--prune` first; it is otherwise read-only): ```bash bash <skill-dir>/scripts/classify-branches.sh # TSV: VERDICT BRANCH PR REASON WORKTREE DIRTY bash <skill-dir>/scripts/classify-branches.sh --explain <branch> # files that never reached the default branch ``` It needs `git`, `jq` and an authenticated `gh`. If `gh` is unavailable, stop and say so — PR state is what separates "open PR" from "merged", and guessing it is how work gets lost. | Verdict | Meaning | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **SAFE** | Tip i