Hooks & Automation
Shell hooks, scheduled tasks, and command safety policies
Claude Code's extensibility layer: users configure shell hooks that fire on tool calls and events, schedule recurring prompts with cron-style scheduling, and a risk classification policy governs what commands can run at each permission level.
6 stepshookscronautomationsafety
Step-by-step breakdown
1
✨Event-driven hooks
Hooks System InstructionsUsers configure shell commands that trigger on tool calls, message events, and other lifecycle hooks—extending Claude Code's behavior with custom automation.
Users may configure 'hooks', shell commands that execute in response to events
Techniques
behavioral-constraintsconditional-logicguardrails
2
🔌Command risk classification
Bash: Haiku Prefix Policy Spec3
⚙️Action safety framework
Action Safety & Reversibility4
🔧Schedule recurring tasks
Cron Create Tool5
🔧View scheduled tasks
Cron List Tool6
🔧Cancel scheduled tasks
Cron Delete Tool