Diff Snapshot
Overview
Use this skill for manual safety checkpoints before risky edits.
It creates restorable file snapshots under ~/.codex/diff-snapshots.
Workflow
- Run
scripts/snapshot.sh <file...>before making a risky edit. - After the edit, run
scripts/restore.sh diff <snapshot-file>if you need to compare. - Run
scripts/restore.sh restore <snapshot-file>only when the user explicitly wants rollback. - Prefer snapshotting specific files or
--changedfiles in a git repo instead of the whole tree.
Resources
- Script:
scripts/snapshot.sh - Script:
scripts/restore.sh