Claude Code Hooks Guides
In-depth guides on Claude Code hooks: what they are, when to use PreToolUse vs PostToolUse, and how hooks compare to slash commands and prompt instructions.
What Are Claude Code Hooks? A Practical Guide
Claude Code hooks are scripts that run automatically at lifecycle events to enforce deterministic behavior. Learn what they are, how the lifecycle works, and how to install your first hook.
6 min readPreToolUse vs PostToolUse: Which Claude Code Hook to Use
PreToolUse runs before a tool and can block it; PostToolUse runs after and reacts. Learn when to use each Claude Code hook event, with examples and a simple decision rule.
5 min readClaude Code Hooks vs Slash Commands vs Prompt Instructions
Three ways to steer Claude Code — hooks, slash commands, and prompt instructions. Learn how they differ, when to use each, and why only hooks are guaranteed to run.
5 min read