Create, wire up, test and debug agent hooks: Claude Code settings.json or plugin hooks, Cursor hooks.json, or a shared hooks/ tree, with working recipes. Use when asked to run something automatically on an agent event, block or rewrite a tool call, format after edits, gate Stop on tests, protect files, send notifications, inject session context, choose between a command and a prompt hook, or debug a hook that never fires.