Claude Certification
Claude Code Configuration & Workflows
Lesson 3 · 8 min

Hooks

Shell commands that fire on Claude Code events.

Hooks fire on events: PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, Notification, Stop. A hook is just a shell command; its stdout becomes context for the model and its exit code can block tool execution.

Quick check
Claude CodeSelect one
Which file format defines a Claude Code slash command?