
Tutorial1 day ago
We Wrote a Claude Code Hook to Block rm -rf and Four Deletes Walked Right Past It
A PreToolUse hook that blocks rm -rf took ten minutes to write and caught 2 of 6 ways to delete a directory. Worse, it failed open: broken, it exited 0 and let the delete through.
Sep 1, 20268 min