Skip to main content
skill CX Codex

event-driven-architecture · nickcrew — Claude Code skill: install guide

The event-driven-architecture skill guides event-driven system design with event sourcing, CQRS, sagas, and message brokers. Use it for microservices and distributed transactions.

MIT 118 installs ★ 71 updated 2026-06-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NickCrew/Claude-Cortex --skill event-driven-architecture -a claude-code
Open on GitHub

What event-driven-architecture does

The skill helps design systems around asynchronous communication and loosely coupled services. It covers domain and integration events, event sourcing, CQRS, sagas, choreography, orchestration, and technology choices such as Kafka and RabbitMQ.

Reference material covers event structure, event stores, read projections, message brokers, consistency handling, and testing. Its workflow also addresses versioned schemas, correlation IDs, idempotent handlers, replay, monitoring, and partitioning by aggregate ID.

The design assumes consistency arrives over time, so a workflow that requires immediate consistency across services needs a different approach.

What it helps with

  • design event flows between microservices
  • choose between event sourcing, CQRS, and sagas
  • separate read and write models with projections
  • handle duplicate event delivery safely
  • plan event replay and schema versioning

Example prompts for the agent

  • Design an event flow for order and payment services with a saga for failure compensation.
  • Split this service into read and write models with CQRS, then outline the required projections.
  • Review these event schemas for versioning, correlation IDs, and idempotent handlers.

How to install event-driven-architecture

1Skills CLI (Vercel)

npx skills add NickCrew/Claude-Cortex --skill event-driven-architecture -a claude-code

2Manually: put the files in place

~/.claude/skills/event-driven-architecture/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/event-driven-architecture/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about event-driven-architecture

How do I install event-driven-architecture in Claude Code?

Run npx skills add NickCrew/Claude-Cortex --skill event-driven-architecture -a claude-code, then check ~/.claude/skills/event-driven-architecture/SKILL.md.

What does event-driven-architecture do?

It guides event-based architecture with asynchronous messaging and eventual consistency. The skill covers event sourcing, CQRS, sagas, message brokers, and event replay.

What topics does the skill cover?

It includes event fundamentals, event sourcing, CQRS, message brokers, saga coordination, choreography versus orchestration, eventual consistency, and testing.

Source text

SKILL.md · MIT
---
name: event-driven-architecture
description: Event-driven architecture patterns with event sourcing, CQRS, and message-driven communication. Use when designing distributed systems, microservices communication, or systems requiring eventual consistency and scalability.
keywords:
  - CQRS
  - Kafka
  - RabbitMQ
  - domain event
  - event bus
  - event sourcing
  - event-driven
  - eventual consistency
  - message broker
  - message queue
file_patterns:
  - '**/*event_bus*.*'
  - '**/cqrs/**'
  - '**/event-sourcing/**'
  - '**/eventsourcing/**'
confidence: 0.84
---

# Event-Driven Architecture Patterns

Expert guidance for designing, implementing, and operating event-driven systems with proven patterns for event sourcing, CQRS, message brokers, saga coordination, and eventual consistency management.

## When to Use This Skill

- Designing systems with asynchronous, decoupled communication
- Implementing event sourcing and CQRS patterns
- Building systems requiring eventual consistency and high scalability
- Managing distributed transactions across microservices
- Processing real-time event streams and data pipelines
- Implementing publish-subscribe or message queue architectures
- Designing reactive systems with complex event flows

## Core Principles

### 1. Events as First-Class Citizens
Events represent immutable facts that have occurred in the system. Use past tense naming (OrderCreated, PaymentProcessed) and include all necessary context.

### 2. Eventual Consistency
Systems achieve consistency over time rather than immediately. Trade strong consistency for higher availability and scalability.

### 3. Loose Coupling
Services communicate through events without direct dependencies, enabling independent evolution and deployment.

### 4. Asynchronous Communication
Operations don't block waiting for responses, improving system responsiveness and resilience.

### 5. Event-Driven Thinking
Design around what happened (events) rather than what to do (commands).

## Quick Reference

| Topic | Load reference |
| --- | --- |
| Event structure, types, and characteristics | `skills/event-driven-architecture/references/event-fundamentals.md` |
| Event sourcing pattern and implementation | `skills/event-driven-architecture/references/event-sourcing.md` |
| CQRS pattern with read/write separation | `skills/event-driven-architecture/references/cqrs.md` |
| Message brokers (RabbitMQ, Kafka, SQS/SNS) | `skills/event-driven-architecture/references/message-brokers.md` |
| Saga pattern for distributed transactions | `skills/event-driven-architecture/references/saga-pattern.md` |
| Choreography vs orchestration patterns | `skills/event-driven-architecture/references/choreography-orchestration.md` |
| Eventual consistency and conflict resolution | `skills/event-driven-architecture/references/eventual-consistency.md` |
| Best practices, anti-patterns, testing | `skills/event-driven-architecture/references/best-practices.md` |

## Workflow

### 1. Design Phase
- **Identify Events**: What business facts need to be captured?
- **Define Boundaries**: Which events are domain vs integration events?
- **Choose Patterns**: Event sourcing? CQRS? Sagas? Choreography or orchestration?
- **Select Technology**: Kafka for high throughput? RabbitMQ for routing? AWS managed services?

### 2. Implementation Phase
- **Event Schema**: Define versioned event structures with correlation IDs
- **Event Store**: Implement append-only storage with optimistic concurrency
- **Projections**: Create read models from events for query optimization
- **Handlers**: Ensure idempotent, at-least-once delivery handling
- **Sagas**: Implement compensating transactions for failures

### 3. Operation Phase
- **Monitoring**: Track event lag, processing time, failure rates
- **Replay**: Build capability to replay events for debugging/recovery
- **Versioning**: Support multiple event schema versions simultaneously
- **Scaling**: Partition by aggregate ID, scale consumers horizontally
- **Testing**: Test handlers in isolation with contract testing

## Common Mistakes

### Event Design Errors
- ❌ Using commands instead of events (CreateOrder vs OrderCreated)
- ❌ Mutable events or missing versioning
- ❌ Events without correlation/causation IDs
- ✓ Immutable, past-tense, self-contained events

### Consistency Issues
- ❌ Assuming immediate consistency across services
- ❌ Not handling duplicate event delivery
- ❌ Missing idempotency in handlers
- ✓ Design for eventual consistency, idempotent handlers

### Architecture Mistakes
- ❌ Synchronous event chains (waiting for responses)
- ❌ Events coupled to specific service implementations
- ❌ No compensation strategy for sagas
- ✓ Async fire-and-forget, domain-focused events, compensating transactions

### Operational Gaps
- ❌ No event replay capability
- ❌ Missing monitoring for event lag
- ❌ No schema registry or version management
- ✓ Replay-ready, monitored, schema-managed events

## Pattern Selection Guide

### Use Event Sourcing When:
- Need complete audit trail of all changes
- Temporal queries required ("state at time T")
- Multiple projections from same events
- Event replay for debugging/recovery

### Use CQRS When:
- High read:write ratio (10:1+)
- Complex query requirements
- Need to scale reads independently
- Different databases for read/write optimal

### Use Sagas When:
- Distributed transactions across services
- Need atomicity without 2PC
- Complex multi-step workflows
- Compensation logic required

### Choose Choreography When:
- Simple workflows (2-4 steps)
- High service autonomy desired
- Event-driven culture established
- No complex dependencies

### Choose Orchestration When:
- Complex workflows (5+ steps)
- Sequential dependencies
- Need centralized visibility
- Business logic in workflow

## Resources

- **Books**: "Designing Event-Driven Systems" (Stopford), "Versioning in an Event Sourced System" (Young)
- **Sites**: eventuate.io, event-driven.io, Martin Fowler's event sourcing articles
- **Tools**: Kafka, EventStoreDB, RabbitMQ, Axon Framework, MassTransit
- **Patterns**: Event Sourcing, CQRS, Saga, Outbox, CDC, Event Streaming

© NickCrew · MIT · NickCrew/Claude-Cortex

Similar skills

All skills for Backend and APIs →

event-driven-architecture by other authors comes first.

event-driven-architecture travisjneuman The event-driven-architecture skill guides asynchronous system design around brokers, event flows, and distributed work. Use it when services must communicate through messages. CX Codex +1 143installs event-driven-architect patricio0312rev event-driven-architect guides event-driven system design, from domain events and payload schemas to buses and handlers. Useful when shaping a CQRS or event-sourcing design. CX Codex +1 292installs event-sourcing aj-geddes event-sourcing — a skill for Claude Code, Codex and other coding agents. It walks the agent through storing state as a sequence of events rather than a mutable current snapshot. CX Codex +1 893installs domain-driven-design davila7 domain-driven-design decides whether a project needs full DDD, then lays out the work from strategic modeling to evented architecture. CX Codex +1 93installs event-sourcing-architect Seth Hobson event-sourcing-architect — a subagent for designing event-sourced systems: aggregates, projections, sagas and eventual consistency. Useful when you need a full audit trail or queries against past state. CX Codex ★ 42,780repo stars microservices-architecture travisjneuman The microservices-architecture Claude Code skill guides microservice design, monolith decomposition, and service communication choices. It activates for distributed-system design tasks. CX Codex +1 153installs enterprise-architecture-patterns manutej enterprise-architecture-patterns is a Claude Code skill with architecture-pattern references for designing microservices. CX Codex +1 530installs

From the same set21

The whole set →
code-explanation The code-explanation skill explains code, architecture, and system behavior at a depth that matches the reader. Use it for walkthroughs, teaching, and knowledge transfer. CX Codex +1 173installs security-testing-patterns security-testing-patterns guides security testing workflows across SAST, SCA, DAST, and OWASP API audits. Use it to build CI/CD scanning pipelines and triage vulnerabilities. CX Codex +1 154installs secure-coding-practices secure-coding-practices is a Claude Code skill for applying defensive coding patterns to authentication, user input, and sensitive data. It also supports security-focused code reviews. CX Codex +1 134installs ux-review ux-review reviews a component or flow from three angles: usability heuristics, WCAG 2.1 AA accessibility and interaction design. Comes back with a prioritized report. CX Codex +1 119installs dashboard-designer The dashboard-designer Claude Code skill plans dashboard KPIs, layout, and visual hierarchy. It activates for requests about monitoring dashboards or choosing a BI tool. CX Codex +1 109installs terraform-best-practices terraform-best-practices adds enterprise Terraform guidelines covering module layout, secure remote state, workspace isolation, and CI/CD security scanning. CX Codex +1 109installs mermaid-diagramming mermaid-diagramming gets the agent to write Mermaid diagrams for docs: flowcharts, sequence and ER diagrams, state machines, Gantt charts and architecture views. CX Codex +1 105installs kubernetes-security-policies kubernetes-security-policies — a coding-agent skill that walks through Kubernetes hardening: pod security standards, network policies, RBAC. Useful when a cluster needs tightening before production. CX Codex +1 104installs

Project sponsors

Companies that keep this analytics open