Guide for configuring PreToolUse, PostToolUse, and Stop hooks in Claude Code. Use when the user asks about hooks, wants to run commands before/after tool calls, needs auto-formatting, auto-linting, validation gates, or mentions settings.json hook config.
Receba novas skills de DevOps e Infra toda segunda
1 email curto, só com as skills novas de DevOps e Infra. 4 minutos de leitura, sem spam, cancela com 1 clique.
Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.
Ler descrição completaRecolher descrição
Pre/Post Hooks
Claude Code hooks are shell commands that execute automatically in response to tool events. They enable validation, formatting, and guardrails without manual intervention.
When to Use
User wants to run a command before or after a tool executes
User asks about PreToolUse, PostToolUse, or Stop hooks
User wants to add validation gates or blockers
User needs to configure hooks in settings.json
User mentions auto-running commands on file edit, git push, or session end
[Description truncada. Veja o README completo no GitHub.]