Use cases/Hooks & Automation

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 Instructions
Hide

Users 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 Spec
Show
3
⚙️Action safety framework
Action Safety & Reversibility
Show
4
🔧Schedule recurring tasks
Cron Create Tool
Show
5
🔧View scheduled tasks
Cron List Tool
Show
6
🔧Cancel scheduled tasks
Cron Delete Tool
Show