hooks-test
Installation
SKILL.md
Hooks Test Skill
Demonstrates the complete hooks functionality in Claude Agent SDK. This skill showcases how PreToolUse, PostToolUse, and Stop hooks work together to provide event-driven automation.
What are Hooks?
Hooks are event-driven commands that run at specific points during skill execution:
- PreToolUse: Runs BEFORE a tool is executed
- PostToolUse: Runs AFTER a tool completes successfully
- Stop: Runs when the skill execution stops or completes
Hook Configuration
Each hook has:
- matcher: Pattern to match tool names (e.g., "Bash", "Write", "*")
- command: Shell command to execute
- once: If true, runs only once per session (default: false)
- type: Execution type - "command", "script", or "function"