MCPInstall

event-driven-architecture

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.

Installs
116
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/nickcrew/claude-cortex --skill event-driven-architecture
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads event-driven-architecture automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

TopicLoad reference
Event structure, types, and characteristicsskills/event-driven-architecture/references/event-fundamentals.md
Event sourcing pattern and implementationskills/event-driven-architecture/references/event-sourcing.md
CQRS pattern with read/write separationskills/event-driven-architecture/references/cqrs.md
Message brokers (RabbitMQ, Kafka, SQS/SNS)skills/event-driven-architecture/references/message-brokers.md
Saga pattern for distributed transactionsskills/event-driven-architecture/references/saga-pattern.md
Choreography vs orchestration patternsskills/event-driven-architecture/references/choreography-orchestration.md
Eventual consistency and conflict resolutionskills/event-driven-architecture/references/eventual-consistency.md
Best practices, anti-patterns, testingskills/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

FAQ

What does the event-driven-architecture skill do?

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.

How do I install event-driven-architecture?

Run npx skills add https://github.com/nickcrew/claude-cortex --skill event-driven-architecture in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/event-driven-architecture/ (personal) or .claude/skills/event-driven-architecture/ (project).

Which AI agents can use event-driven-architecture?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is event-driven-architecture safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains event-driven-architecture?

It is published by nickcrew in nickcrew/claude-cortex. It has 116 recorded installs.

More from nickcrew/claude-cortex

View all →

react-performance-optimization

nickcrew/claude-cortex

React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets.

Frontend & Design1.9K installs

owasp-top-10

nickcrew/claude-cortex

OWASP Top 10 security vulnerabilities with detection and remediation patterns. Use when conducting security audits, implementing secure coding practices, or reviewing code for common security vulnerabilities.

Security758 installs

ui-design-aesthetics

nickcrew/claude-cortex

Generates high-quality, non-generic UI designs with a focus on performance, progressive disclosure, and distinctive aesthetics.

Frontend & Design358 installs

threat-modeling-techniques

nickcrew/claude-cortex

Open the skill to read its SKILL.md instructions.

Security357 installs

token-efficiency

nickcrew/claude-cortex

Compressed communication using symbols and abbreviations. Use when context is limited or brevity is needed.

228 installs

helm-chart-patterns

nickcrew/claude-cortex

Helm chart development patterns for packaging and deploying Kubernetes applications. Use when creating reusable Helm charts, managing multi-environment deployments, or building application catalogs for Kubernetes.

DevOps & Cloud179 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.