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.mdHook types and payload shape:
references/hook-types.mdMatcher patterns and filtering:
references/hook-matchers.mdHook file placement and path rules:
references/hook-location.mdHook config validation:
scripts/validate-hooks.shHook script smoke test:
scripts/test-hook-script.shBase hooks template:
assets/templates/hooks-template.jsonCommand hook example:
assets/templates/command-hook-example.shPrompt hook example:
assets/templates/prompt-hook-example.jsonAgent 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
Sources
Converted and distributed by TomeVault — claim your Tome and manage your conversions.