Claude Code Hooks Preset Generator

Pick the automations you want, and get a validated Claude Code hooks block for settings.json, grouped and merged the same way the official examples are.

Step 1 of 6

What should Claude Code do automatically?

Pick as many as you want. Nothing runs until you paste the result into your settings.json - turning one on here just adds it to the file.

6 quick steps - free, no sign-up, nothing you configure here leaves your browser

FAQ

What does this hooks generator actually output?

A hooks block for Claude Code's settings.json: one entry per event you configured (PostToolUse, PreToolUse, Stop, or Notification), each with the matcher and command Claude Code expects. Automations that share an event and matcher, like auto-format and auto-fix-lint, are merged into a single group with two handlers instead of two separate groups.

Why does the exit code matter so much?

Because it's the only thing that decides whether a hook actually blocks anything. Exit code 2 blocks the action and sends your stderr message back to Claude as the reason; exit code 1 does not block anything at all, even though it looks like an error. Every command this generator writes uses exit 2 for that reason.

Does the file guard actually stop Claude from editing a file?

Yes, if you pick at least one path to protect. It's a PreToolUse hook that reads the file path Claude is about to touch off the JSON payload on stdin, checks it against the patterns you chose, and exits 2 to block the edit if it matches. Turn the automation on with nothing selected below it and the validator flags it, because an empty guard blocks nothing.

What is the Stop hook, and why does my check run on every turn?

Stop fires every time Claude finishes responding, and it's one of the events that ignores matchers entirely - there's no way to limit it to specific tools or files. That's also what makes it the right event for a check-before-done hook: it runs your tests or command once per turn and blocks completion if the exit code isn't 0.

Where do I put the generated hooks block?

Inside the hooks key of whichever settings file you pick on the last screen: .claude/settings.json for a project shared with your team, .claude/settings.local.json for a project-only copy that stays out of git, or ~/.claude/settings.json for every project on your machine. The paste-prompt output merges it into an existing file instead of overwriting it.

Is this hooks generator free?

Yes - free, no sign-up, and nothing you pick or type leaves your browser; the JSON is assembled locally. ClockedCode separately sells a complete done-for-you Claude Code setup, but the generator itself is not gated.

This generator builds one thing: the hooks block for Claude Code's settings.json, not the whole file. Pick which automations you want, answer a couple of quick configuration questions for the ones that need them, and it hands back valid JSON plus a validator readout that flags anything you turned on but didn't finish configuring.

Hooks trip people up in the same two places every time. First, exit codes: a hook that exits 2 blocks the action and hands Claude the stderr message as the reason, but exit 1 blocks nothing at all, which is the single most common mistake in hand-written guards. Every command this generator writes uses exit 2 on purpose. Second, matchers: ten events, including the Stop event this tool's check-before-done hook uses, ignore matchers entirely, so a matcher on one of those is silently discarded rather than doing what it looks like it should. The validator calls that out by name whenever it applies instead of leaving you to find out the hard way.

The file guard is the part I use daily. Pick which paths Claude should never touch without asking - .env files, lockfiles, a secrets/ folder, CI workflow files, or a pattern you type in - and it writes a PreToolUse hook that reads the file path off the JSON payload and blocks the edit if it matches. Turn on both auto-format and auto-fix-lint and the generator merges them into one PostToolUse matcher group with two handlers instead of two separate groups, which is the shape Claude Code's own documentation uses when more than one command should fire on the same event.

"Make Claude prove the checks pass before calling it done" is a Stop hook: it runs your test suite (using whichever package manager you picked) or a command you type yourself, and if that command fails, the hook exits 2 and blocks the turn instead of letting Claude claim victory on broken code. It's the same idea behind the CLAUDE.md generator's "double-check the work" rule, just enforced instead of requested.

This tool only covers hooks. For the rest of settings.json - permissions, environment variables, model selection - the settings.json generator builds the whole file, and the complete hooks guide documents all 29 lifecycle events and five handler types if you want the reasoning behind a specific answer.

I run Claude Code daily and this generator writes the same hook conventions my own settings.json uses. If you want the finished version of the whole idea - a tuned settings.json, a tuned CLAUDE.md, and the full vetted tool stack, installed in one paste - that is what ClockedCode is. The link is at the bottom of this page.

Neo ZinoBy Neo Zino - builder of ClockedCode

Other free tools

Config generator

Permissions Generator

Pick a safe starting mode and your OS, and get a validated allow/deny permissions block for settings.json in under a minute.

Try tool
Config generator

Output Style Generator

Pick a persona and a tone, and get a valid output-style file with correct frontmatter, ready to save and switch to.

Try tool
Config generator

Subagent Generator

Describe the job in plain English, pick a specialty, and get a complete subagent file ready to save.

Try tool
Config generator

MCP Config Generator

Pick the MCP servers you use and get the exact claude mcp add commands or a ready .mcp.json block, scoped and copy-pasteable.

Try tool
Config generator

Slash Command Generator

Answer 7 quick questions and get a custom Claude Code slash command with valid frontmatter, ready to drop into .claude/commands/.

Try tool
Config generator

Statusline Generator

Toggle the segments you want, watch the exact statusline render live, then copy the tested script and settings.json block.

Try tool
Config generator

settings.json Generator

Pick permission rules, hook presets, env vars, and a model override one step at a time, then copy or download the finished settings.json.

Try tool
Config generator

CLAUDE.md Generator

Answer 7 quick questions, get a tuned CLAUDE.md for your project in 30 seconds.

Try tool
Template library

Claude Code Templates

A curated library of copy-paste Claude Code templates: subagents, hooks, slash commands, settings, and CLAUDE.md starters, each one explained and pulled from a setup that gets used every day.

Try tool
Token scanner

UsageCut

Scan your Claude Code setup in 30 seconds and see exactly what is burning your tokens - bloated context, heavy MCP servers, and settings quietly draining your usage limits.

Try tool