git-branch-cleanuplisted
Install: claude install-skill austinmao/feature-fix-swarm
# Git Branch Cleanup
## Host dispatch contract
- Codex: `$skill`, Codex collaboration roles, and GPT-5.6 tiers.
- Claude: `/skill`, Agent/Skill tools, and Claude aliases.
- A bare `/skill` in this shared source denotes the Claude form; Codex dispatches the same named skill as `$skill`.
Reconcile local branches with the base branch. Most "unmerged" branches are already
squash-merged — this is mostly pruning, not merging. **Triage first, act second.**
Never blind-merge: open PRs are operator-gated and CI can be red even when
conflict-free.
Pairs with `/git-branch-consolidate`, which audits the whole estate for
spec/plan/test completeness and hands its `delete-safe` set here. This skill owns
the deletion approval flow; consolidate owns the audit.
## Golden rules
- **Assess before acting.** PR state is authoritative, not `git branch --merged`
(misses squash-merges).
- **Conflict-free != ready.** A clean merge-tree probe says nothing about CI. Check both.
- **Open PR = operator decision.** Never auto-merge an open PR without explicit go.
High-blast-radius changes (infra, multi-tenant, auth, row-level security, scheduled
jobs) go through `/review-gate` first.
- **Worktree before branch.** A branch with a worktree cannot be deleted; remove the
worktree first.
- **Never touch:** the base branch (`main`/`master`/`develop`), the current checkout, or
any branch whose worktree was committed to in the last hour (active work).
- **Preserve dirty state.** Uncommitted work in