Claude apologised and promised never to do it again? Do not trust promises, set up hooks
Claude apologised and promised never to do it again, and a couple of days later it all happened again. A promise lives in one conversation, and Anthropic's guide calls the rules in CLAUDE.md advice. A hook is a check Claude cannot skip: Claude Code runs it itself, before an action, after it or at the end of an answer. Where a hook is needed (deleting data, emails, putting code online, spending money), where it only slows the agents down, and the author's five working hooks: dangerous commands, emails in his name, the task log, the skeptic and a sound. The recording of the masterclass and the working kit of files that goes with it.
The walkthrough is for subscribers
The write-up above is free and stays free. The recorded walkthrough is what a subscription adds to it.
See plansArtifact
Hooks kit, 18 files
- how-to-repeat.md The instruction for you: what you will need, how to set it up and how to check each hook. Start here. 6 KB
- CLAUDE.md The order for your Claude Code: explain the hooks, write in your details, test and install them. 8 KB
- block-dangerous-commands.sh Hook 1: stops deleting tables and databases, rewriting code history and turning off the computer's network. 5 KB
- block-email-in-my-name.sh Hook 2: stops an email where you are the sender, from the terminal or through a program. 4 KB
- letter.md The letter after the session: what the lesson was about and where to start. 3 KB
The files themselves are for subscribers. The list above is the whole of it: that is everything in the set.
See plansAsk about this case
The question goes to the author, not onto this page. Nothing sent here is published, and the answer comes back to the address you leave.