Skip to main content

/restore

Bring back uncommitted code that disappeared — a file an edit overwrote, a function that vanished, a working tree a command reset.

Invoke the restore-code skill with $ARGUMENTS as an optional hint (a filename, a function name, or a description of what's missing). It reads the automatic snapshots the safety-snapshot hook captures before every edit, finds the one holding your lost code, shows you the diff, and restores the chosen path(s) on confirmation — never with a destructive reset. If the snapshots don't have it, it falls back to git's reflog, stash, and dangling-blob recovery.

You don't have to invoke this explicitly: just say "I lost code" / "תשחזר את מה שהיה", or Claude offers it on its own when it detects an edit dropped code. The command is here for when you want to reach for it directly.