Your estimate is optional. Your review compares it with how long it took; nothing is scored.
Rules in a markdown file are requests. Hooks are enforcement: a script that runs before every tool call and can block it. You'll block the two things that hurt us most: destructive shell commands and reading .env.
One of our agents freed a busy port by killing the process holding it. The process was Docker.
You'll needClaude Code (hooks are a Claude Code feature; other agents have their own permission settings). jq installed, or a small Node script instead. Prices checked this month are on Tools.
Write the hook script
Step 1 of 3, about 10 min
Create .claude/hooks/guard.sh:
#!/bin/bash
cmd=$(jq -r '.tool_input.command // .tool_input.file_path // ""')
case "$cmd" in
*"rm -rf"*|*"kill "*|*taskkill*|*".env"*)
echo "Blocked by guard.sh: $cmd" >&2
exit 2 ;;
esac
exit 0
Exit code 2 blocks the call and sends the message back to Claude. Make it executable with chmod +x.
The part of a video worth watching for this step
YouTube, IndyDevDan. Published Jul 2025.Checked 19 Nov 2026
Optional. The step counts when you've done it, whether or not you watch. Minutes from the creator's chapters; our notes on this video.
This file can be committed so everyone on the project gets the same guard.
Test it without the agent, then with it
Step 3 of 3, about 10 min
Feed it fake input and look at the exit code. Then, in a session, ask the agent to "clean up with rm -rf build" and to "show me .env". Both should be refused with your message.