| name | tidyup |
| description | Proof-based sweep of a repo's accumulated worktrees, stale local branches, and in-flight PRs — reduces open threads to what's actually alive. Explicit invocation only (/tidyup); classification is squash-merge aware and nothing is deleted without proof or approval. |
| license | Apache-2.0 |
| disable-model-invocation | true |
Tidyup
Reduce a repo's open threads — worktrees, local branches, open PRs, dirty checkouts — to only what's actually alive. The mechanical classification is a script; the judgment calls (dirt, unique artifacts, PR dispositions) stay with you and the user.
Core fact this skill is built on: in a squash-merge repo, git branch --merged and git cherry under-report what landed — a branch can sit 15 commits "ahead" with every line already in main. Merged-PR metadata is the ground truth. Proof tiers and gotchas: references/proofs.md.
Workflow
1. Audit (read-only). Run from inside the current session's worktree so it self-protects:
uv run --script ~/.claude/skills/tidyup/scripts/audit.py --json audit.json --plan plan.sh
Classifies every worktree and local branch as KEEP (primary, current session, open-PR, default branch), SAFE (provably landed), DIRTY_MERGED (landed but has uncommitted files), or UNKNOWN (no proof — never auto-deleted). Alongside it, survey the rest of the in-flight surface yourself: open PRs with CI/merge state, dirty files in the primary checkout, claimed issues, and any session-manager view of the same worktrees (e.g. ).