Hooks Validator
The Hooks validator checks hooks configuration files for schema compliance, event validity, and script references. It discovers hooks/hooks.json at the plugin root (auto-loaded by Claude Code) and any additional hooks files referenced in plugin.json.
What It Checks
- hooks.json schema validation
- Valid event names (PreToolUse, PostToolUse, SessionStart, etc.)
- Hook type correctness
- Script file existence
- Matcher pattern syntax
Rules
This validator includes 3 rules. See the Hooks rules category for the complete list.
hooks-missing-scriptHook references a command script that does not exist
hooks-invalid-eventHook uses an unrecognized event name
hooks-invalid-confighooks.json does not match the expected schema
CLI Usage
bash
claudelint validate-hooks
claudelint validate-hooks --verbosePlugin Skill
If you have the claudelint plugin installed, you can run this validator inside Claude Code with /validate-hooks or by asking "Why is my hook not firing?"
See Also
- Claude Code Hooks - Official hooks documentation
- Claude Code Hooks Integration - Using hooks with claudelint