What problem does it solve?
Repetitive tasks like code formatting, validation, or logging often require manual intervention or external scripting. This Skill enables automated execution of scripts at specific lifecycle events, streamlining your development workflow and reducing manual effort.
Core Features & Use Cases
- Event-Driven Automation: Trigger scripts
PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, and more, for comprehensive workflow control.
- Granular Control: Use matchers (including regex) to target specific tools or events, ensuring precise automation.
- Decision Control: Allow, deny, or modify tool execution based on hook script output, providing powerful conditional logic.
- Use Case: Configure a
PostToolUse hook to automatically run prettier on any .ts file after Claude edits it, ensuring consistent code formatting across your project without any manual steps.
Quick Start
Show me how to create a hook that runs a script before any Bash command is executed.