event-driven-architecture

event-driven-architecture is a skill for Claude Code from camilooscargbaptista/cto-toolkit. It costs 85 tokens per session (1,256 once invoked), scanned A, original, MIT.

A guide for designing and reviewing systems that communicate through events, such as messages saying an order was placed or a payment was processed. It covers event sourcing, CQRS, sagas, domain events, message brokers, and eventual consistency.

In plain words
What is it for?
Use it to review or design event flows, message handlers, audit histories, read models, event schemas, and coordination across services.
Why use it?
It helps you reason about systems whose parts work asynchronously, including duplicate messages, changing event formats, long-running workflows, and data that updates at different times.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cto-toolkit plugin — 54 skills, 6 agents, 3 hooks shipped together

Good fit Use it to review or design event flows, message handlers, audit histories, read models, event schemas, and coordination across services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/camilooscargbaptista/cto-toolkit/event-driven-architecture
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add camilooscargbaptista/cto-toolkit --skill event-driven-architecture
Clone the repo
git clone --depth 1 https://github.com/camilooscargbaptista/cto-toolkit

Made for: Claude Code.

Or install cto-toolkit, the plugin that ships this one along with the rest of its 54 skills, 6 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for event-driven-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/event-driven-architecture/github.svg)](https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/event-driven-architecture)
Your own site
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/event-driven-architecture"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/event-driven-architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for event-driven-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/camilooscargbaptista/cto-toolkit/event-driven-architecture"><img src="https://agentmods.dev/badge/skills/camilooscargbaptista/cto-toolkit/event-driven-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,256 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.01256
Opus 5 $0.00043 $0.00628
Sonnet 5 $0.00017 $0.00251
Haiku 4.5 $0.00009 $0.00126

Measured 9d ago against content hash e41a49caa02b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

event-driven-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

event-driven-architecture/SKILL.md · 140 lines

How it starts

The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Event-Driven Architecture Review

You are a senior distributed systems architect specializing in event-driven patterns. You've built systems processing millions of events per second and know the trade-offs between every pattern.

Directive: Read ../quality-standard/SKILL.md before producing any output.

Core Patterns

1. Event Sourcing

When to use: Audit trail requirements, temporal queries, complex domain with business rule evolution. When NOT to use: Simple CRUD, low-complexity domains, team inexperienced with the pattern.

Review checklist:

  • Events are immutable facts (past tense: OrderPlaced, PaymentProcessed)
  • Events contain all data needed to reconstruct state
  • Event schema versioning strategy (upcasting, weak schema)
  • Snapshots for aggregates with many events (>100 events threshold)
  • Event store append-only (no updates, no deletes)
  • Projection rebuild strategy (how to rebuild read models from scratch)
  • Idempotent event handlers (same event processed twice = same result)
❌ Bad event design:
{ type: "UpdateOrder", data: { status: "shipped" } }  // Imperative, loses context

✅ Good event design:
{ type: "OrderShipped", data: { orderId, carrier, trackingNumber, shippedAt } }  // Fact, self-contained

2. CQRS (Command Query Responsibility Segregation)

Review checklist:

  • Commands validated before execution (business rules enforced)
  • Read models optimized for specific query patterns
  • Eventual consistency between write and read sides documented
  • Projection lag acceptable for the use case (SLA defined)
  • Read model can be rebuilt from event stream
  • No cross-aggregate transactions (each aggregate is a consistency boundary)

Anti-patterns:

  • Using CQRS for simple CRUD (over-engineering)
  • Querying the write model for reads (defeats the purpose)
  • Tightly coupling read and write deployments
  • Missing compensating actions for failed commands

3. Saga Pattern

Choreography vs Orchestration:

Aspect Choreography Orchestration
Coupling Low — services react to events Higher — orchestrator knows all steps
Visibility Hard to trace flow Easy to see full workflow
Complexity Grows with participants Centralized in orchestrator
Best for Simple flows (2-3 steps) Complex flows (4+ steps)

Read the full file on GitHub · 140 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 140 lines · 85 tokens per session scan A e41a49caa02b

Subscribe to this mod's changes

event-driven-architecture is a skill published in the GitHub repository camilooscargbaptista/cto-toolkit (7 stars, last pushed 5mo ago), licensed MIT. It adds 85 tokens to every session and 1,256 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

architecture-paradigm-cqrs-es

Applies CQRS and Event Sourcing for read/write separation and audit trails. Use when designing systems with complex domain logic or full state-change history.

athola/claude-night-market · 39 tokens

backend-event-sourcing

Use this skill when the user says 'event sourcing', 'event store', 'event stream', 'event sourced', 'rehydrate from events', 'event replay', 'projection rebuild', 'event log', 'append-only log', 'event history'. This skill enforces: events as the single source of truth, current state derived from event replay…

j4flmao/agent-skills · 118 tokens

Event Sourcing Testing

Testing event sourcing patterns including event store validation, projection testing, saga orchestration, and event versioning compatibility.

PramodDutta/qaskills · 27 tokens

backend-cqrs-patterns

Use this skill when the user says 'CQRS', 'command query segregation', 'separate read write model', 'command model', 'query model', 'read model', 'write model', 'materialized view', 'command handler', 'query handler'. This skill enforces: strict command/query separation, write model optimized for consistency, read…

j4flmao/agent-skills · 125 tokens

cratis-chronicle-client-dotnet

Talk to a Chronicle server from a standalone .NET application with the Cratis.Chronicle client - connection strings, ChronicleClient construction outside any host, AddCratisChronicle for a worker or ASP.NET host, [EventType] records, IEventSequence.Append, reactors and reducers found by assembly scanning, the…

Cratis/AI · 123 tokens

cratis-chronicle-client-elixir

Talk to a Chronicle server from an Elixir application with the cratischronicle Hex package - putting Chronicle.Client in a supervision tree, connection strings, use Chronicle.Events.EventType structs, Chronicle.append returning ok or error tuples, reactors with the @handles attribute and a handle/2 callback…

Cratis/AI · 112 tokens