What problem does it solve?
This Skill enables users to automate actions in response to specific Claude Code events, such as tool calls or user prompts. It allows for custom validation, formatting, logging, and integration with external systems, streamlining workflows and enforcing project standards.
Core Features & Use Cases
- Event-Driven Automation: Configure
onToolCall hooks to execute scripts before or after tools like Write, Edit, or Bash, or onUserPromptSubmit for user interactions.
- Custom Validation & Formatting: Implement hooks for auto-formatting code on write, running linters on edit, or validating git commands before execution.
- Integration with External Systems: Use hooks to trigger notifications, log events to external services, or integrate with CI/CD pipelines.
- Use Case: To ensure all code written by Claude Code adheres to project style guides, implement an
onToolCall hook for the Write tool that automatically runs prettier --write {{file_path}} and eslint --fix {{file_path}} after any file modification.
Quick Start
Create a hook that automatically runs 'prettier --write' on a file after Claude Code uses the 'Write' tool.