Welcome to HowToShipIt — practical how-to guides for developers: code, AI tools, and servers, explained step by step.

Claude Code Hooks Explained: 7 Practical Examples You Can Copy (2026)

Claude Code hooks workflow illustration: gears, plug and circuit lines showing how PreToolUse, PostToolUse and Stop hooks automate coding sessions

Claude Code hooks are one of the most powerful features in the AI coding assistant — and one of the least used. A hook is a shell command (or an LLM prompt, a subagent, or an HTTP endpoint) that runs automatically at a specific point in Claude Code’s lifecycle: before a tool executes, after a … Read more