What problem does it solve? Stale branches and worktrees pile up after merges, and git branch -d falsely refuses to delete branches whose work landed as duplicate commits, cherry-picks, or squash merges, leaving repositories cluttered with refs that hold no unique work. ## Core Features & Use Cases - Three-test staleness detection: Combines git merge-base --is-ancestor, git cherry patch-equivalence, and gh pr list --state merged lookup by headRefOid to catch ordinary merges, cherry-picks, and squash-merged PRs. - Dry-run by default with explicit opt-ins: Prints STALE, KEEPING, and BLOCKED reports and changes nothing until --apply is passed; remote deletion requires the separate --prune-remote flag. - Safety guardrails: Never touches the target or current branch, skips dirty worktrees instead of forcing, warns about stashes anchored outside the target branch, and leaves gc/reflog expiry to the user. - Use Case: After a sprint of squash-merged PRs, run the dry run to see which of 16 lingering origin branches actually landed, confirm with the user, then apply local and remote deletion in one pass. ## Quick Start Run the cleanup script in dry-run mode against the default branch, show me the stale local and remote branch lists, and ask for confirmation before deleting anything.