From Dev.to
What a Regex-Based Claude Code Hook Can and Can't Block
Claude Code lets you register a PreToolUse hook in settings.json: a shell command that runs before a tool call, receives the tool name and its input as JSON on stdin, and can approve or block the call...
