hooks-json-valid¶
hooks.json must be valid JSON with proper hook configuration structure
| Severity | error |
| Autofix | - |
| Since | v0.1.0 |
| Category | Skills, Agents, Hooks |
Why¶
hooks.json configures commands that run automatically on agent
events. Invalid JSON, unknown event types, or misconfigured handler
objects will cause hooks to fail silently — the command never runs
and no error is surfaced to the user.
Examples¶
Bad:
Good:
How to fix¶
Fix the structural issue identified in the violation message. Common
problems: event values must be arrays of config objects, each config
must have a hooks array, each handler needs a type field, and
type-specific fields (command, url, prompt) must match the
handler type.
Configuration¶
Run skillsaw explain hooks-json-valid to see this documentation and the rule's effective configuration in your terminal.