A pre-flight checklist for leaving Claude Code running unattended (Chapter 1)
Copy this into your project’s CLAUDE.md or keep it beside your terminal.
Before your first session
- Install the safety hooks:
npx github:yurukusa/cc-safe-setup - Measure where you stand:
npx github:yurukusa/cc-safe-setup --audit(target: score 80 or more) - Create a
CLAUDE.mdwith project-specific rules - Verify
.envfiles are in.gitignore - Make sure a git remote is set, so work can be recovered
Before letting it run unattended
- Create a fallback branch:
git checkout -b backup/before-autonomous-$(date +%Y%m%d) - Commit everything you currently have
- Prove the guards actually fire:
npx github:yurukusa/cc-safe-setup --verify - Check that branch protection covers
mainandmaster - If you use a database: install
block-database-wipe - If you keep sensitive config files: install
protect-dotfiles
During the session
- Watch context usage
- Read
blocked-commands.logfrom time to time. It is the record of what was stopped - Check that commits have real messages
After the session
- Read
git logfor changes you did not expect - Run your test suite
- Check whether any
.envfile was touched - Turn the log into new protections:
npx github:yurukusa/cc-safe-setup --learn
For a team
- Add the check to CI:
uses: yurukusa/cc-safe-setup@main - Set the CI safety threshold to 70 or more
- Share
.safety-net.jsonor the hooks config across the team - Write down which hooks are required and which are optional
One line in that list differs from the version that shipped in the repository for a long time. The repository said npx cc-safe-setup. This book says npx github:yurukusa/cc-safe-setup. Chapter 5 explains why the difference matters more than it looks.