EN JA
Free download

Claude Code Hooks Builder

Free · no sign-up · runs in your browser, nothing is uploaded

A hook is a command Claude Code runs automatically at moments like “waiting for your approval” or “finished responding”. Build the config here, copy it, and paste it into ~/.claude/settings.json — that is all it takes. Pick the events you care about, write one command, and copy a settings.json snippet that Claude Code accepts as-is. Every one of the 33 hook events is here with its matcher values, plus the statusLine setting. If you need the field-by-field details, see the hooks reference.

Start from a preset

The “Track session status” and “Block destructive shell commands” presets point at scripts you write yourself. If you would rather not write the status script, AgentManager installs the same hook for you and notifies you when a session is waiting.

Save to

Events

Command

Status line

~/.claude/settings.json
  1. Open ~/.claude/settings.json (create it if it doesn't exist).
  2. If the file already has a "hooks" key, add only the per-event arrays inside it (if an event name is already there, append to its array). Otherwise paste the whole object.
  3. If the command is a script file, make it executable with chmod +x. Hooks run with your user's permissions.
  4. Run /hooks inside Claude Code to confirm it picked up the change.

What you're generating

A hook is a shell command Claude Code runs at a lifecycle event, with a JSON payload on stdin (session_id, hook_event_name, cwd, and per-event fields such as tool_name or notification_type). The shape the builder produces is:

{
  "hooks": {
    "<EventName>": [
      {
        "matcher": "<optional filter>",
        "hooks": [ { "type": "command", "command": "<your command>", "timeout": 600 } ]
      }
    ]
  }
}
Check the version. Claude Code releases before 2.1.101 ignore the whole settings file when it contains an unknown event name — and that silently disables every hook and permission rule in it. Run claude --version before adding newer events like StopFailure or PostCompact.

Want to know when Claude is waiting — without writing the hook?

AgentManager sets up the same thing as the “Notify me” and “Track session status” presets above, automatically. It lists the status of every Claude Code session and notifies you the moment one is waiting for you. Free to use, no account required.

macOS 13+ — free plan shows up to 2 sessions at once