Claude Code Hooks: Auto-Format Code, Block Risky Edits and Get Notified
Hooks are your own scripts that Claude Code runs at fixed moments, like after every edit or before a command. Unlike instructions, they always run. Here are the events that matter, how exit codes and JSON decisions work, the five hook types, and four hooks you can copy today.
