Skip to content

agent-events

Agent events must be an array with maximum 3 event names

From plugin
claudelint
1413 skills13 agents1 command1 hook

Claude Code

> /plugin marketplace add pdugan20/claudelint
> /plugin install claudelint@claudelint

Agent definition

agent-events.md
description: "Agent events must be an array with maximum 3 event names"

agent-events

<RuleHeader description="Agent events must be an array with maximum 3 event names" severity="error" :fixable="false" :configurable="false" category="Agents" />

Rule Details

This rule validates the `events` field in agent frontmatter. Events must be an array of strings with a maximum of 3 items. This constraint keeps agents focused on a small set of triggers rather than responding to every possible event. The validation is enforced via the AgentFrontmatterWithRefinements schema.

Incorrect

Agent with too many events

---
name: my-agent
description: Monitors everything
events:
  - PreToolUse
  - PostToolUse
  - Stop
  - SessionStart
---

Correct

Agent with a focused set of events

---
name: my-agent
description: Validates tool usage
events:
  - PreToolUse
  - PostToolUse
---

How To Fix

Reduce the `events` array to at most 3 entries. If you need to respond to more events, consider splitting the logic across multiple focused agents.

Options

This rule does not have any configuration options.

Related Rules

  • [`agent-hooks`](/rules/agents/agent-hooks)
  • [`agent-description`](/rules/agents/agent-description)

Resources

  • [Rule Implementation](https://github.com/pdugan20/claudelint/blob/main/src/rules/agents/agent-events.ts)
  • [Rule Tests](https://github.com/pdugan20/claudelint/blob/main/tests/rules/agents/agent-events.test.ts)

Version

Available since: v0.2.0

Read more
@pdugan20
Ships withclaudelint

A linter for Claude Code projects. Validates CLAUDE.md files, skills, settings, hooks, MCP servers, plugins, and more.

Stars on GitHub

Momentum

stars in total
14
Star history of pdugan20/claudelint on GitHub, a chart by star-history.com

Other agents on claudelint.

claude-md-optimizer
Auto-invoked

claude-md-optimizer

Agent

Use this agent when the user wants to autonomously validate and optimize their CLAUDE.md files. This agent runs claudelint…

@pdugan20@pdugan20Install Agent

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc2w293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react3d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex2d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman4d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about agent-events.

Which coding agents can use agent-events?
agent-events installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.