claude-md-optimizer
Use this agent when the user wants to autonomously validate and optimize their CLAUDE.md files. This agent runs claudelint validation, analyzes results, and…
Hook configuration in agents.json violates schema requirements
> /plugin marketplace add pdugan20/claudelint > /plugin install claudelint@claudelint
How it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Hook configuration in agents.json violates schema requirements
description: "Hook configuration in agents.json violates schema requirements"
<RuleHeader description="Hook configuration in agents.json violates schema requirements" severity="error" :fixable="false" :configurable="false" category="Agents" />
This rule checks that hooks declared in agents.json have the correct structure and all required fields. Hook objects must include valid event names (e.g., PreToolUse, PostToolUse, SessionStart, TaskCompleted) and properly structured matchers. Validation is performed by AgentsValidator.validateFrontmatter() using the shared validateSettingsHooks() utility. Invalid hook schemas cause runtime failures when the agent framework attempts to register event handlers.
Hook with missing required command field
{
"hooks": {
"PreToolUse": [
{ "matcher": "Bash" }
]
}
}Hook with invalid event name
{
"hooks": {
"OnStart": [
{ "matcher": ".*", "command": "echo hi" }
]
}
}Properly structured hook with all required fields
{
"hooks": {
"PreToolUse": [
{ "matcher": "Bash", "command": "echo pre-check" }
]
}
}Ensure each hook entry has a valid event name key (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, UserPromptSubmit, Notification, Stop, SubagentStart, SubagentStop, PreCompact, SessionStart, SessionEnd, TeammateIdle, or TaskCompleted) and that each matcher object includes the required fields.
This rule does not have any configuration options.
Available since: v0.2.0
A linter for Claude Code projects. Validates CLAUDE.md files, skills, settings, hooks, MCP servers, plugins, and more.
Repo: pdugan20/claudelint
Use this agent when the user wants to autonomously validate and optimize their CLAUDE.md files. This agent runs claudelint validation, analyzes results, and…