What problem does it solve? Secrets, forbidden identities, or workstation paths sometimes land in committed git history, and history rewrites leave branches looking hundreds of commits behind or orphaned with no common ancestor. This Skill provides a single decision framework for safely scrubbing contaminated history, force-pushing with recorded leases, and recovering branches using byte-identical tree-twin verification instead of misleading ahead/behind counts. ## Core Features & Use Cases - Contaminated History Expunge: Step-by-step scrub sequence using filter-repo, reflog expiry, all-ref blob scanning with local-only pattern files, and clean replacement PRs when intermediate commits are poisoned. - Post-Rewrite Branch Recovery: Tree-twin classification (SAFE-BEHIND vs NEEDS-REANCHOR), cherry-reanchor automation, and patch-equivalence rebase for stacked PR families after sibling merges. - Safety Guardrails: Mandatory hooks-off surgery windows, pending-operation push guards, whole-file deletion preflight, and explicit --force-with-lease targets recorded before any force-push. - Use Case: After a secret leaks into 40 branches of commit history, disable hooks, run the expunge sequence, force-publish with recorded lease SHAs, run the all-ref blob scan to prove zero remaining hits, then re-anchor every stale branch and verify each PR with gh pr view before declaring completion. ## Quick Start Ask the agent to expunge a leaked secret from git history and recover the branches that now show hundreds of commits behind main.