К основному содержанию
скилл CX Codex

event-driven-architecture · nickcrew — скилл для Claude Code: как установить

Скилл event-driven-architecture для Claude Code помогает проектировать системы на событиях: event sourcing, CQRS, саги и обмен сообщениями. Охватывает микросервисы и распределённые транзакции.

MIT 118 установок ★ 71 обновлён 2026-06-29

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add NickCrew/Claude-Cortex --skill event-driven-architecture -a claude-code
Открыть на GitHub

Что делает event-driven-architecture

Скилл разбирает проектирование систем с асинхронной связью и слабой связанностью сервисов. Он помогает выделять доменные и интеграционные события, выбирать event sourcing, CQRS, саги, хореографию или оркестрацию, а также подбирать Kafka, RabbitMQ или другие брокеры сообщений.

Внутри есть справочные материалы по структуре событий, event sourcing, разделению чтения и записи, брокерам, сагам, согласованности со временем и тестированию. Рабочий процесс охватывает схемы событий с версиями, хранилище только для добавления записей, проекции, идемпотентные обработчики, повторную обработку событий и мониторинг задержки.

Архитектура здесь рассчитана на согласованность со временем, поэтому сценарии с обязательной немедленной согласованностью между сервисами потребуют другого решения.

Какие задачи решает

  • спроектировать обмен событиями между микросервисами
  • выбрать между event sourcing, CQRS и сагами
  • разделить чтение и запись через проекции
  • обработать повторную доставку событий
  • организовать версионирование и повтор событий

Примеры запросов агенту

  • Спроектируй обмен событиями между сервисами заказов и платежей с учётом саги.
  • Раздели модель чтения и записи для этого сервиса с помощью CQRS и опиши проекции.
  • Проверь схему событий: добавь версионирование, correlation ID и идемпотентную обработку.

Как установить event-driven-architecture

1Через Skills CLI (Vercel)

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

2Вручную: положить файлы

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

Папка скилла целиком; для одного проекта — .claude/skills/event-driven-architecture/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об event-driven-architecture

Как установить event-driven-architecture в Claude Code?

Выполните npx skills add NickCrew/Claude-Cortex --skill event-driven-architecture -a claude-code, затем проверьте файл ~/.claude/skills/event-driven-architecture/SKILL.md.

Что делает event-driven-architecture?

Скилл помогает проектировать архитектуры с событиями, асинхронным обменом и согласованностью со временем. Он охватывает event sourcing, CQRS, саги, брокеры сообщений и повторную обработку событий.

Какие материалы входят в скилл?

В него входят справки по событиям, event sourcing, CQRS, брокерам сообщений, сагам, хореографии и оркестрации, согласованности со временем и тестированию.

Исходный текст

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

Похожие скиллы

Все скиллы по теме «Бэкенд и API» →

Сначала — event-driven-architecture от других авторов.

event-driven-architecture travisjneuman Скилл event-driven-architecture для Claude Code помогает проектировать системы с асинхронными сообщениями, брокерами и распределёнными сценариями. Разбирает архитектуру микросервисов и потоков событий. CX Codex +1 143установок event-driven-architect patricio0312rev Скилл event-driven-architect для Claude Code помогает проектировать событийную архитектуру: определять события, описывать их схемы и связывать публикацию с обработчиками. Также рассматривает CQRS и event sourcing. CX Codex +1 292установок event-sourcing aj-geddes Скилл event-sourcing для Claude Code, Codex и других агентов. Помогает строить системы, где состояние хранится как последовательность событий, а не текущая картина. CX Codex +1 893установок domain-driven-design davila7 Скилл domain-driven-design помогает решить, нужен ли проекту полный DDD, и разложить работу по этапам — от стратегических моделей до событийной архитектуры. CX Codex +1 93установок event-sourcing-architect Seth Hobson Субагент event-sourcing-architect для Claude Code проектирует event-sourced системы: разбирает домен на агрегаты, события, проекции и саги. CX Codex ★ 42 780звёзд репо microservices-architecture travisjneuman Скилл microservices-architecture для Claude Code помогает проектировать микросервисные системы, делить монолит и выбирать способы связи между сервисами. Активируется при обсуждении распределённой архитектуры. CX Codex +1 153установок enterprise-architecture-patterns manutej Скилл enterprise-architecture-patterns для Claude Code даёт агенту справочник по архитектурным паттернам для проектирования микросервисов. CX Codex +1 530установок

Из того же набора21

Весь набор →
code-explanation Скилл code-explanation для Claude Code и Codex объясняет код, архитектуру и поведение систем с учётом уровня читателя. Помогает разбирать код, обучаться и передавать знания. CX Codex +1 173установок security-testing-patterns Скилл security-testing-patterns задаёт правила тестирования безопасности: от SAST и SCA до фаззинга, DAST и аудита API по OWASP. Помогает выстроить CI/CD пайплайн и разобрать уязвимости. CX Codex +1 154установок secure-coding-practices Скилл secure-coding-practices для Claude Code помогает применять защитные практики при работе с авторизацией, пользовательским вводом и чувствительными данными. Подключается и для проверки кода на уязвимости. CX Codex +1 134установок ux-review Скилл ux-review проверяет компонент или поток с трёх сторон: удобство, доступность по WCAG 2.1 AA и поведение интерфейса. Отдаёт отчёт с находками по приоритетам. CX Codex +1 119установок dashboard-designer Скилл dashboard-designer для Claude Code помогает спроектировать дашборд: выбрать KPI, расположить блоки и настроить визуальную иерархию. Запускается на запросы о структуре панели мониторинга или выборе BI-инструмента. CX Codex +1 109установок terraform-best-practices Скилл terraform-best-practices внедряет инженерные стандарты Terraform: разбиение на модули, блокировку стейта, разделение сред и валидацию в CI/CD. CX Codex +1 109установок mermaid-diagramming Скилл mermaid-diagramming учит агента рисовать диаграммы Mermaid: блок-схемы, sequence-диаграммы, ERD, состояния, Gantt и архитектурные виды, отдельно базовую и стилизованную версию. CX Codex +1 105установок kubernetes-security-policies Скилл kubernetes-security-policies для Claude Code помогает настроить Pod Security Standards, сетевые политики и RBAC в Kubernetes. Ужесточает защиту прод-окружения. CX Codex +1 104установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой