30 Claude Code Prompts for Hooks
Name the hook event and the files. Claude Code writes or fixes hooks in that scope and does not invent a second platform. Not a malware kit and not a silent network hook.
In short: This page contains 30 copy-paste ready prompts, organized into 6 categories with a description and pro tip for each. The first 5 prompts are free instantly, no signup needed. Drafted with AI writing assistance and checked against our editorial policy.
Add
5 promptsPre Tool
1/30✨ What it does
Claude Code adds a PreToolUse hook in [COMMAND] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a hook writer working in Claude Code. <context> I need you to add a PreToolUse hook I named. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [COMMAND] - Files: [FILES] - Matcher: [MATCHER OR VERIFY] </inputs> <task> 1. Hook in [FILES] 2. Matcher or ask 3. Fail closed on error if I said so </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent a matcher.
Post Tool
2/30✨ What it does
Claude Code adds a PostToolUse hook in [COMMAND] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a hook writer working in Claude Code. <context> I need you to add a PostToolUse hook I named. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [COMMAND] - Files: [FILES] </inputs> <task> 1. Hook in [FILES] 2. No network unless I asked 3. Log path I named </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent a Slack webhook.
Stop
3/30✨ What it does
Claude Code adds a Stop hook in [COMMAND] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a stop-hook writer working in Claude Code. <context> I need you to add a Stop hook I named. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [COMMAND] - Files: [FILES] </inputs> <task> 1. Stop hook in [FILES] 2. What it checks 3. How I disable it </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent a second Stop.
Session Start
4/30✨ What it does
Claude Code adds a SessionStart hook in [COMMAND] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a session writer working in Claude Code. <context> I need you to add a SessionStart hook I named. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [COMMAND] - Files: [FILES] </inputs> <task> 1. SessionStart in [FILES] 2. Fast only 3. No network unless I asked </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent a fetch to prod.
User Prompt
5/30✨ What it does
Claude Code adds a UserPromptSubmit hook in [COMMAND] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a prompt-hook writer working in Claude Code. <context> I need you to add a UserPromptSubmit hook I named. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [COMMAND] - Files: [FILES] </inputs> <task> 1. Hook in [FILES] 2. What it injects 3. How I turn it off </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent secret injection.
Safety
5 promptsNo Network
6/30✨ What it does
Claude Code keeps the hook offline in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a safety hook writer working in Claude Code. <context> I need you to keep this hook offline. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Files: [FILES] </inputs> <task> 1. Strip network from [HOOK FILE] 2. Stay in [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Hooks should not call home.
Fail Closed
7/30✨ What it does
Claude Code makes the hook fail closed in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a fail-closed writer working in Claude Code. <context> I need you to make this hook fail closed. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Files: [FILES] </inputs> <task> 1. Non-zero on bad state 2. Stay in [FILES] 3. Tell me the exit codes </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not swallow errors.
Timeout
8/30✨ What it does
Claude Code adds a hook timeout in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a timeout writer working in Claude Code. <context> I need you to add a timeout I named. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Seconds: [SECONDS OR VERIFY] - Files: [FILES] </inputs> <task> 1. Timeout or ask 2. Stay in [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent 30s.
Secrets
9/30✨ What it does
Claude Code redacts hook secrets in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a secrets hook writer working in Claude Code. <context> I need you to stop this hook from printing secrets. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Files: [FILES] </inputs> <task> 1. Redact 2. Stay in [FILES] 3. No env dumps </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not log tokens.
Disable
10/30✨ What it does
Claude Code adds a hook skip in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a disable writer working in Claude Code. <context> I need you to add a way to skip this hook. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Flag: [FLAG OR VERIFY] - Files: [FILES] </inputs> <task> 1. Skip via [FLAG] or ask 2. Stay in [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent SKIP_ALL_HOOKS unless I asked.
Kinds
5 promptsLint Hook
11/30✨ What it does
Claude Code runs the linter in a hook in [LINT] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a lint-hook writer working in Claude Code. <context> I need you to run my linter in a hook. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [LINT] - Files: [FILES] </inputs> <task> 1. Use [LINT] only 2. Stay in [FILES] 3. No new linter </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent eslint --fix of the tree.
Test Hook
12/30✨ What it does
Claude Code runs tests in a hook in [TEST] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a test-hook writer working in Claude Code. <context> I need you to run my tests in a hook. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [TEST] - Files: [FILES] </inputs> <task> 1. Use [TEST] 2. Stay in [FILES] 3. Fail closed </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent npm test.
Format Hook
13/30✨ What it does
Claude Code runs the formatter in a hook in [FMT] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a format-hook writer working in Claude Code. <context> I need you to run my formatter in a hook. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [FMT] - Files: [FILES] </inputs> <task> 1. Use [FMT] 2. Stay in [FILES] 3. Only files I named if possible </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent prettier on the monorepo.
Secret Scan
14/30✨ What it does
Claude Code runs a secret scan hook in [SCAN OR VERIFY] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a scan-hook writer working in Claude Code. <context> I need you to run my secret scan in a hook. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [SCAN OR VERIFY] - Files: [FILES] </inputs> <task> 1. Use [SCAN] or ask 2. Stay in [FILES] 3. No invented scanner </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent gitleaks config.
Notify Stub
15/30✨ What it does
Claude Code adds a local notify hook in [COMMAND] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a notify-hook writer working in Claude Code. <context> I need you to local notify hook only. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [COMMAND] - Files: [FILES] </inputs> <task> 1. Local only 2. Stay in [FILES] 3. No Slack unless I gave a command </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent a webhook.
These prompts give you the what. Tutorials give you the why.
Learn when to use extended thinking, how to build Claude Projects, and workflows that compound. The library keeps growing.
Fix
5 promptsBroken Hook
16/30✨ What it does
Claude Code fixes the broken hook in [ERROR] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a hook fixer working in Claude Code. <context> I need you to fix this broken hook. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [ERROR] - Files: [FILES] </inputs> <task> 1. Fix in [FILES] 2. Show a dry run 3. What you ran </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not rewrite all hooks.
Slow Hook
17/30✨ What it does
Claude Code speeds the hook in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a slow-hook fixer working in Claude Code. <context> I need you to speed this hook in scope. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Files: [FILES] </inputs> <task> 1. Speed in [FILES] 2. Keep the check </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent 10ms.
Dupes
18/30✨ What it does
Claude Code dedupes hooks in [FILES] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a dupe-hook cutter working in Claude Code. <context> I need you to dedupe hooks in scope. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [FILES] - Keep: [KEEP] </inputs> <task> 1. Keep [KEEP] 2. Stay in [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not drop a hook I still need.
Windows
19/30✨ What it does
Claude Code ports the hook to my OS in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a windows-hook fixer working in Claude Code. <context> I need you to make this hook work on my OS. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - OS: [OS] - Files: [FILES] </inputs> <task> 1. Fix for [OS] 2. Stay in [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent WSL if I did not say.
Docs
20/30✨ What it does
Claude Code documents the hook in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a hook-docs writer working in Claude Code. <context> I need you to document this hook in scope. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Files: [FILES] </inputs> <task> 1. Docs in [FILES] 2. How to disable 3. What it runs </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent a second README.
Stop
5 promptsAsk First
21/30✨ What it does
Claude Code plans the hook then waits in [GOAL] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a plan hook writer working in Claude Code. <context> I need you to plan the hook then wait. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [GOAL] - Files: [FILES] </inputs> <task> 1. Plan only 2. Wait for GO 3. Stay about [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not write until I say go.
No New Deps
22/30✨ What it does
Claude Code writes the hook without new packages in [GOAL] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a deps hook writer working in Claude Code. <context> I need you to hook without new packages. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [GOAL] - Files: [FILES] </inputs> <task> 1. [GOAL] in [FILES] 2. No new packages </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent node-fetch.
One Hook
23/30✨ What it does
Claude Code changes one hook in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a one-hook writer working in Claude Code. <context> I need you to change one hook only. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Files: [FILES] </inputs> <task> 1. Only that hook 2. Stay in [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Neighbors stay.
Match Existing
24/30✨ What it does
Claude Code matches existing hook style in [GOAL] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a match hook writer working in Claude Code. <context> I need you to match existing hook style. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [GOAL] - Files: [FILES] </inputs> <task> 1. Match neighbors 2. Stay in [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent YAML if we use JSON.
Off Limits
25/30✨ What it does
Claude Code honors hook off limits in [GOAL] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a fence hook writer working in Claude Code. <context> I need you to honor off limits on hooks. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [GOAL] - Off: [OFF] - Files: [FILES] </inputs> <task> 1. Honor [OFF] 2. Stay in [FILES] </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Off limits stays off.
Most people use 10% of Claude. Tutorials unlock the rest.
AI Academy: hands-on tutorials on Claude, ChatGPT, Midjourney, and many other AI tools. New tutorials are added regularly.
Fixes
5 promptsUndo Wander
26/30✨ What it does
Claude Code reverts extra hook files in [DIFF] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a scope hook writer working in Claude Code. <context> I need you to revert extra hook files. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [DIFF] - Allowed: [FILES] </inputs> <task> 1. Revert extras 2. Keep the hook </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Neighbors stay.
Hook Plus Test
27/30✨ What it does
Claude Code adds a hook plus dry-run in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a combo hook writer working in Claude Code. <context> I need you to hook plus a dry-run note. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Files: [FILES] </inputs> <task> 1. Hook 2. How I dry-run </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Dry-run stays local.
Hook Plus Disable
28/30✨ What it does
Claude Code adds a hook plus disable docs in [HOOK FILE] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a combo hook writer working in Claude Code. <context> I need you to hook plus disable docs. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK FILE] - Files: [FILES] </inputs> <task> 1. Hook 2. Disable steps </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: I need an off switch.
Cut Network
29/30✨ What it does
Claude Code strips network from hooks in [FILES] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a network cutter working in Claude Code. <context> I need you to strip network from hooks. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [FILES] - Keep: [KEEP] </inputs> <task> 1. Strip 2. Keep [KEEP] if local </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: No silent webhooks.
Settings Note
30/30✨ What it does
Claude Code writes the hook settings snippet in [HOOK] without wandering outside the files you named. Plan if more than two files change, then tell me what you ran.
You are a settings writer working in Claude Code. <context> I need you to show the settings snippet. Stay inside the scope I name. Do not refactor neighbors. Do not add packages I did not ask for. </context> <inputs> - Primary: [HOOK] - Files: [FILES] </inputs> <task> 1. Snippet in [FILES] 2. No invented schema fields </task> <constraints> - Plan before you edit if more than two files change. - Do not touch files I mark OFF LIMITS. - Run the test command I gave. If I gave none, ask before inventing one. - Do not invent APIs, env vars, or tickets. </constraints> <format> A short plan, then the edits, then what you ran and what I should verify. </format>
Pro tip: Do not invent a key.
Free tool
Prompt Optimizer
Turn a rough idea into a structured, professional AI prompt.
Frequently Asked Questions
Prompts are the starting line. Tutorials are the finish.
A growing library of hands-on tutorials on ChatGPT, Claude, Midjourney, and many other AI tools. New tutorials are added regularly.
7-day free trial. Cancel anytime.