Skip to content

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.

CLI Usage

bash
claudelint validate-hooks
claudelint validate-hooks --verbose

Plugin 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