Afterword
The whole of this manual is a floor. It gets you from an unprotected project to one where the common destructive operations are stopped, where you can prove they are stopped, and where you are not running a frozen version by accident.
The tool is MIT licensed and lives at github.com/yurukusa/cc-safe-setup. Issues and pull requests are welcome. The checklist in Chapter 1 was a corrected version of the one in the repository; the repository has since been corrected too.
If you want more than a floor, the same author has six paid books on Leanpub. It is worth being specific about what each one has that this book does not, so you can skip the ones you do not need — and about what is free either way, because this book’s own preface says you are not paying for secrets and that has to hold in both directions.
- Claude Code Safety — arranged by the accident rather than by the mechanism: databases dropped, files deleted, git history rewritten,
/rewindtaking work with it. Each class gets the defence that applies and the recovery if it already happened, and the book marks the two places where a piece is missing: three of the four are tied to a real, publicly documented incident cited by issue number — with one widely reported third-party case marked as press-sourced rather than left unmarked among the others — while the git-history chapter is built from the mechanism and the short list of genuinely irreversible commands instead. It is explicit about where that stops: noPreToolUsehook sees/rewind, because slash commands are not tool calls, and nothing can put a confirmation step inside its menu — so the defence there is a settings-level lever and the recoverable layer underneath rather than a gate. It also marks the one avenue it did not measure, instead of claiming the door is shut. This manual asks whether your guards can refuse anything; that book asks what you are most afraid of and answers that one first. Its Appendix B prints all 195 commands the combined guard was fired at, refusals and allowances both, so the claim is re-runnable rather than asserted. - Claude Code Safety Mastery — eight dated incidents where the safety setup itself was the thing that failed, each with the root cause and the fix, plus how to score and read a fifty-point audit. The checklist itself is free: it is
audit/audit-checklist.mdin the repository, MIT, the same file byte for byte. The book is what to do with a low score, and what a guard failing quietly looked like the eight times it happened here. - CLAUDE.md Under Test — thirty-nine measured trials on whether a rule written in
CLAUDE.mdis actually obeyed, with the harness and every trial’s data. It measures when a hook is worth the trouble and when a sentence would have done. - Cut Your Claude Code Token Usage in Half — forty-eight diagnostic symptoms for spend: what each looks like, and what to change — and where there is no user-side fix yet, it says so instead of inventing one.
- Claude Code Migration Playbook — stay, switch or stack, compared against the other tools, with the triggers that should make you decide.
- Claude Code AGENTS.md Interop Handbook — one instruction file across Claude Code, Codex, Copilot, Cursor and Gemini CLI, with templates and a rollback-safe migration.
Four of those — Claude Code Safety Mastery, Cut Your Claude Code Token Usage in Half, the Claude Code Migration Playbook and the Claude Code AGENTS.md Interop Handbook — are also sold together as the Operator’s Library: $29 against $51.96 bought separately. The other two, Claude Code Safety and CLAUDE.md Under Test, are not in that bundle and are sold on their own. All six of the paid books are sold together as the Complete Edition for $39; that bundle also carries this manual, which costs nothing either way.
None of it is required reading. This book is the floor and it stands on its own, which is why it is free and why nothing has been held back from it to make the others necessary. The catalogue in Chapter 10 is the whole catalogue, and the tools it points at are the same MIT tools.
How this book was made
This book says “I” a lot, and the “I” is a pair. One half is a non-engineer who decides what ships and what gets thrown away. The other half is a Claude Code session that runs nearly unattended and does the measuring: firing commands at hooks and recording exit codes, pulling issues from the GitHub API, counting files in the repository. Every number printed here came out of that setup, and every claim was checked against a primary source before it went in — where something was not measured, or was measured by somebody else, the text says so.
That arrangement is also why the book knows what a guard does when nobody is watching. Most of the time, nobody is.
One last thing, and it is the only advice here that is not about a command. Decide in advance what you would do if you opened your terminal and found the work gone. If the answer is “restore from the remote”, you are fine. If the answer is a pause, fix that before you fix anything else. Every guard in this book is a way of buying time for a recovery plan you already have.