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…
Agent hooks must be an object with event name keys
> /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.
Agent hooks must be an object with event name keys
description: "Agent hooks must be an object with event name keys"
<RuleHeader description="Agent hooks must be an object with event name keys" severity="error" :fixable="false" :configurable="false" category="Agents" />
This rule enforces that the `hooks` field in agent markdown frontmatter is a valid object keyed by event names. The supported event names are PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, UserPromptSubmit, Notification, Stop, SubagentStart, SubagentStop, PreCompact, SessionStart, SessionEnd, TeammateIdle, and TaskCompleted. Each key maps to an array of hook matchers. Validation is delegated to the AgentFrontmatterSchema.shape.hooks Zod schema. Correctly structured hooks allow the agent framework to register event handlers at runtime.
Hooks defined as an array instead of an object
--- name: build-agent description: Runs build pipelines hooks: - PreToolUse - PostToolUse ---
Hooks defined as a plain string
--- name: build-agent description: Runs build pipelines hooks: PreToolUse ---
Hooks as an object with event name keys
---
name: build-agent
description: Runs build pipelines
hooks:
PreToolUse:
- matcher: Bash
command: echo "pre-check"
---Reformat the `hooks` field as an object where each key is a valid event name (PreToolUse, PostToolUse, etc.) and each value is an array of hook matcher objects.
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…
Hook configuration in agents.json violates schema requirements