git-safety-net
Installation
SKILL.md
Git Safety Net
Prevent losing work in a tangle of branches/stashes/rebases, and recover it forensically when something already went sideways. The commands here are all non-destructive or additive until a step is explicitly labeled destructive — recovery must never make the loss worse.
Entry router — pick the mode from what the user is worried about
| The user says / needs… | Go to |
|---|---|
| "I think I lost a commit / branch / stash", "recover the deleted X", "git reflog" | Mode A — Recover |
| "did I lose anything?", "what worktrees/stashes/branches remain?", after a messy session | Mode B — Audit & preserve |
| "is everything merged?", "what's still not on main?", before deleting old branches | Mode C — Verify merged |
| "so this never happens again", starting parallel/multi-branch work | Mode D — Prevent |
| "clean up worktrees/stashes/branches", "converge everything onto main", "only keep one main branch" | Mode E — Retire safely |
| "an audit already said it's clean, but is anything else lost?", "check again" | Mode B, starting at Step 0 — a repeat request usually means the first pass had the wrong scope, not that it looked carelessly |