/trogonstack-eda:event-definitionfrom trogonstack-eda
Reviews or creates event definitions for event-driven architecture: naming, field placement, record boundaries, and quality gates. Use when designing, reviewing, or auditing event definitions.
Ships in trogonstack-eda. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Review or create event definitions for event-driven systems. Keep the default pass focused on event identity, naming, field placement, record boundaries, and the quality gate; load references only when a decision needs examples, detailed criteria, or deeper modeling guidance.
Read these references only when the task needs that depth:
references/event-naming-rules.md - examples for event tense, domain language, CRUD naming, suffixes, infrastructure terms, negatives, and integration-event prefixes.references/field-naming-rules.md - examples for field names, identifiers, temporal fields, enums vs booleans, derived values, money, collections, polymorphic payloads, PII, and casing.references/event-record-boundaries.md - event type identity, stream names, stream version vs event schema revision, actor context, ownership checks, and deterministic handlers.references/quality-checklist.md - full checklist for pass/fail reviews and future criteria additions.An event definition declares what happened, how it is identified, and which business facts were captured.
Keep three layers distinct:
event_id, stream_id, stream_version, and recorded_atevent_type, actor_id, on_behalf_of, occurred_at, correlation_id, and causation_idorder_id, owner_id, approved_by, effective_at, and expires_atDo not push generic causality, tracing, persistence, or transport facts into the domain payload. Keep actor and time fields in the payload only when they are part of the domain rule.
Before reviewing or creating event definitions, establish:
If the user provides event definitions to review, skip to the review. If the user asks to design new event definitions, gather the business context first.
OrderPlaced, not PlaceOrder.ClaimApproved, not ClaimStatusChanged, unless status changes are the domain concept.OrderItemAdded, not OrderChanged.Created, Updated, and Deleted for domains where those operations are the business concept.Event, Message, or Notification.For examples and edge cases, read references/event-naming-rules.md.
Integration events cross service boundaries and form public contracts.
For examples and collision guidance, read references/event-naming-rules.md.
Persisted event_type should identify the domain/event schema contract without requiring stream-name parsing. Stream names are storage/routing addresses and may be compact, e.g. tenant/tenant_123/orders/order_456; keep tenant, environment, region, and shard values out of event_type.
Do not carry both a versioned event_type and a separate schema_version when both encode the same schema version. Keep event_type stable for compatible additive changes; use revisions such as OrderPlacedV2 only for incompatible schema or semantic changes.
For self-identifying event types, stream names, stream version vs event schema revision, and tenant-scoped streams, read references/event-record-boundaries.md.
actor_id, occurred_at._by, _at, or _on fields only when that actor or time is part of the domain fact.order_id, not id._at for datetimes and _on for dates; keep generic occurred_at in context.For examples and edge cases, read references/field-naming-rules.md.
Keep record metadata, event context, and business payload separate. Generic actor, time, correlation, causation, persistence, transport, and routing facts belong outside payload unless they are themselves domain facts.
Use actor_id only for the initiating/requesting actor in event context; do not infer ownership or authorization from it. Validate ownership against domain state or policy before emitting events.
Event handlers and projections should consume immutable recorded-event data and avoid clocks, random IDs, actor lookups, or authorization services during replay.
For record-layer, actor-context, ownership, and deterministic-handler rules, read references/event-record-boundaries.md.
Use this as the required quality gate when creating or reviewing event definitions:
event_type is a self-identifying schema discriminator and is not coupled to stream routing details.For formal pass/fail review output or when adding criteria, read references/quality-checklist.md.
Provide:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub trogonstack/agentskills --plugin trogonstack-eda2 skills in this plugin
Other plugins' skills for the same job