← Claude Kit
Hooks Free Claude Code hook templates
Shell commands Claude Code runs at fixed moments — before a tool, after an edit, when it needs you.
WHERE THE FILE GOES
The "hooks" block of .claude/settings.json (shared) or ~/.claude/settings.json (just you).
HOOK
Protect Files
Blocks Claude from editing .env files, secrets folders and lock files — before the edit happens.
Free
Software Development
HOOK
Block Dangerous Commands
Denies rm -rf on the root or home folder, force-pushes and hard resets before Bash runs them.
Free
Software Development
HOOK
Format After Every Edit
Runs your formatter on each file Claude edits, so diffs stay clean and style never needs a review comment.
Free
Software Development
HOOK
Desktop Notification
Pops a desktop notification when Claude Code needs your input, so you can work elsewhere while it runs.
Free
Software Development
OTHER KINDS OF TEMPLATE
112 TEMPLATES
Skills
Reusable know-how Claude loads when a task matches — and the /slash commands you type yourself.
6 TEMPLATES
Subagents
Specialist assistants Claude Code delegates to, each with its own instructions, tools and context window.
4 TEMPLATES
MCP Servers
Give Claude new tools by writing a Model Context Protocol server, then plugging it into Claude Code.
3 TEMPLATES
CLAUDE.md
The memory file Claude reads at the start of every session — your project's rules, commands and traps.
The authority
Anthropic's documentation for Hooks
Claude Code ships often. When a template here and the official docs disagree, the official docs are right.
https://code.claude.com/docs/en/hooks