You let Claude Code edit files, run shell commands, touch your database — maybe unattended, while you do something else. The question this book answers is the one in the back of your mind: what stops it from destroying something you cannot get back? That fear is not paranoia. An agent ran drizzle-kit push --force on a production Postgres and wiped more than sixty tables (#27063). Another escalated to prisma db push --force-reset and dropped all eighty-seven (#36183). A third was asked only to investigate a production error and ran ALTER TABLE ... DROP COLUMN twice on the live database (#46684). Every incident here is cited by issue number so you can read the original yourself — with one exception, a widely reported third-party case, which the book flags in the table as press-sourced rather than letting it sit unmarked among the others. Four classes of irreversible accident — databases, files, git history, and /rewind — each get the defence that applies and an ordered recovery runbook, with an honest line about what is genuinely gone. Three of the four get the exact PreToolUse hook that stops the command before it runs, ready to paste into settings.json; /rewind does not, because slash commands are not tool calls and no PreToolUse hook sees one, so that chapter gives the settings-level lever, the recovery order, and the one place a refusal could still live. The git-history chapter is built from the mechanism and the blockable list rather than from a single cited incident. What you get that a list of hooks does not give you: - A guard that was fired in both directions, and the results are printed. 195 commands: 123 that must be blocked, 72 ordinary ones that must not. The passing set is what decides whether you keep the guard — git stash push passes while git stash drop is blocked; git push origin main passes while git push --force is blocked; rm -rf ~/projects/app/node_modules passes while rm -rf ~/Documents is blocked; docker compose down passes while docker compose down -v is blocked. - The false positives, with the exact commands. You will know before you install it which harmless things it interrupts, so you can decide once instead of discovering them one irritation at a time. - The four things it genuinely cannot catch, also with commands — including the empty-variable accident that is Chapter 2's own headline story, because a hook sees the command before the shell expands it. Where the boundary is, and what covers the other side of it. - The one line that decides whether any of it runs. On a machine without jq, a guard like this exits 0 — which Claude Code reads as permission, with no error and no warning. The book shows the check that makes that condition announce itself instead, and why the exit code you choose determines whether the warning reaches a human at all. - A setting that removes /rewind's destructive option at the source, confirmed in the shipped 2.1.258 binary, with the part that was not tested kept clearly separate from the part that was. - Where each cited issue stands today. Five of the six closed for inactivity, not because anything was fixed. The sixth closed as "completed" and users kept reporting the same behaviour afterwards. The book explains why, in that table, "completed" is the weakest signal on the page — a habit you can apply to any tracker. Also: a chapter on why writing "never delete the database" in CLAUDE.md is not a control point you can check — with the documented case of exactly that rule being ignored, and with my own 48 runs measuring how often a written rule actually holds — and what to use instead. Written for the individual operator, not a security team. Fifteen minutes gets you a recoverable setup. The guards come from cc-safe-setup, the author's free MIT-licensed hook collection; this book is the organised depth on top of it, not the only way to stay safe. Independent, and not affiliated with Anthropic or any provider. The verification runs described in the first person were carried out by the author's Claude Code agent, on the author's machine, under the author's direction — which is also the setup this book is about. This book is also in Claude Code Operator's Library: Complete Edition - seven handbooks for $39, against $74.94 bought separately: https://leanpub.com/b/cc-operators-complete