What problem does it solve? Patches and diffs go stale as upstream code evolves, and blindly applying them to a dirty or changed checkout corrupts work. This Skill determines whether a patch is still needed, whether upstream already contains the change, what drifted since it was written, and how to regenerate it safely against the current baseline. ## Core Features & Use Cases - Read-only analysis mode: Uses git history archaeology (git log -S, ancestry tests, per-file git apply --check) to classify each hunk as context-compatible or failed, and attributes drift to specific upstream commits. - Authorized repair mode: Rebuilds the patch in an isolated detached worktree using three-way apply, runs focused gates, regenerates the artifact from an explicit file allowlist, and verifies forward and reverse apply before touching the live checkout. - Concurrency safety: Detects snapshot branches with no shared ancestry, protects pre-existing dirty files, and re-verifies the tree at the end to catch concurrent writers. - Use Case: A developer returns to a month-old fix-parser.diff after upstream refactored the parser API. The Skill identifies which hunks still apply, explains that upstream renamed the target functions, and regenerates a clean patch against current HEAD. ## Quick Start Ask the agent to reconcile the stale patch file 'fix-parser.diff' against the current HEAD and report whether upstream already contains the change.