Implement Hooks
Build or update hooks/hooks.json and related script handlers with deterministic validation.
Workflow
- •Identify required hook event(s), matcher(s), and hook type(s).
- •Implement
hooks/hooks.jsonusing stable${CLAUDE_PLUGIN_ROOT}paths. - •Add or update hook handler scripts and mark them executable.
- •Run hook validation and script smoke tests.
- •Verify plugin-level integration from
implement-pluginand cross-check inplugin-verification.
Progressive Disclosure
- •
Event model and usage:
references/hook-events.md - •
Hook types and payload shape:
references/hook-types.md - •
Matcher patterns and filtering:
references/hook-matchers.md - •
Hook file placement and path rules:
references/hook-location.md - •
Hook config validation:
scripts/validate-hooks.sh - •
Hook script smoke test:
scripts/test-hook-script.sh - •
Base hooks template:
assets/templates/hooks-template.json - •
Command hook example:
assets/templates/command-hook-example.sh - •
Prompt hook example:
assets/templates/prompt-hook-example.json - •
Agent hook example:
assets/templates/agent-hook-example.json
Related Skills
- •Umbrella routing and tradeoffs:
../implement-claude-extensions/SKILL.md - •Plugin packaging and manifest wiring:
../implement-plugin/SKILL.md