Creates a named restore point in git before you make significant changes
The AI commits any uncommitted work, tags the current state with a descriptive name, and gives you exact commands to roll back if something goes wrong. Think of it as a save game before a boss fight.
Cowork Pre-Modification Backup
TL;DR
How To Start
STEP 1Tell the AI What You Are About to Do
-
operation_name
· string · required
Short descriptive name for the operation about to be performed. Used in the tag name (e.g., “version-bump-0226a5” becomes tag “backup/pre-version-bump-0226a5”). -
files_at_risk
· list · optional
Specific files that will be modified. If not provided, the backup covers all tracked files.
STEP 2Confirm the Backup Tag
STEP 3Use the Restore Commands if Needed
Usage Examples
How AI Reads This Recipe
- VERIFY that a git repository exists — if not, direct the user to CWK-004 (Git Initialization) and stop.
- COMMIT any uncommitted changes before creating the backup tag to ensure the restore point captures the complete current state.
- CREATE an annotated git tag with the backup/ prefix convention and include the operation name, date, and files at risk in the tag message.
- REPORT the tag name, commit hash, protected files, and the exact git commands for restoration and diffing.
- NEVER proceed with the planned operation within this recipe — this recipe only creates the backup. The operation itself is a separate step.
When to Use This Recipe
- Are about to make a large or risky change to project files.
- Want a named restore point before a version bump, refactor, or cookbook edit.
- Need to protect specific files before an operation that might corrupt them.
- Want the ability to diff against a known-good state after completing an operation.
Recipe FAQ
Q.How is this different from a regular git commit?
Q.What if I forget to run this before my operation?
Q.Can I have multiple backup tags?
Q.How do I list all backup tags?
Q.Does the backup include untracked files?
Q.How do I delete old backup tags I no longer need?
Version History
Get this recipe with CRAFT for Claude Cowork
Cowork recipes ship bundled with CRAFT for Claude Cowork — there’s no separate download. Clone the framework once, and your AI runs every recipe automatically when invoked.
Pull anytime to stay on the latest version — free to clone, no login or email required.
Then start your session
Once CRAFT is in your project folder, open a new Cowork session and ask Claude to initialize. For example:
You
Claude
Not familiar with Git? Download as a ZIP
No command line needed. Just download, move, and unzip:
- Open the CRAFT framework repo on GitHub.
- Click the green Code button, then choose Download ZIP.
- Move the downloaded ZIP into your Claude Cowork project folder.
- Unzip it: double-click on Mac, or right-click → Extract All on Windows.
