Block rm -rf with a Claude Code PreToolUse hook, and know its limits
Two ways to deny a dangerous rm before it runs: exit code 2 and permissionDecision. Why a hook deny works even in bypassPermissions, and where string
Tag archive
Two ways to deny a dangerous rm before it runs: exit code 2 and permissionDecision. Why a hook deny works even in bypassPermissions, and where string
Command hooks read JSON from standard input. The fields every event includes, the extra fields for PreToolUse, Stop and SessionStart, and jq examples
Fire a notification the moment Claude finishes responding: commands for macOS, Linux and Windows, how Stop differs from Notification, and the exit-cod
What a hook matcher compares against depends on the event. The exact-match, regex and wildcard rules, the events that silently ignore a matcher, and h
Use ai-credit-scrub v1.1.0 to clean explicit AI credit lines locally, protect commits and pushes, and keep intentional attribution intact.

You want every blog post to end with a newsletter box. The code is four...
Hooks Hooks allow functions to have access to state and other React features without using...
Every wrapper component needs the value/defaultValue/onChange triple — and the isControlled branch, the second state source, and the sync effect that come with it. A control object replaces all of it with one prop per state.
How I built Hook Machine across 21 PRs — generate, score, and rank 3-second ad openers with content-aware routing, karaoke captions, seed frame dispatch, and a winner loop UX.

TL;DR (about a 15-minute read) In May 2026, I was reworking a Claude Code plugin that...

The hooks reference lists 30+ events, but the core agent lifecycle is 8 stages that every Claude Code session moves through. Anthropic documents each hook in isolation. Here's the diagram they never shipped -- the 8 places a hook fires, in order, with what each one can and can't block.
React useEffect The useEffect Hook allows you to perform side effects in your...