nickcrew/claude-cortex
Overview
This skill provides practical guidance for designing, implementing, and operating event-driven architectures using event sourcing, CQRS, sagas, and message-driven communication. It focuses on patterns and operational practices that enable scalable, loosely coupled, and eventually consistent distributed systems. Use it when you need auditability, high throughput, or resilient cross-service workflows.
How this skill works
The skill helps you identify domain events, design immutable event schemas with versioning and correlation IDs, and choose patterns (event sourcing, CQRS, choreography/orchestration, sagas) that match your requirements. It recommends infrastructure choices (Kafka, RabbitMQ, managed cloud services), outlines implementation details like append-only event stores, idempotent handlers, and read-model projections, and covers operation needs such as monitoring, replay, and schema management.
When to use it
- Designing asynchronous, decoupled microservices or distributed systems
- Implementing event sourcing for audit trails and temporal queries
- Applying CQRS to scale read models independently from writes
- Coordinating distributed transactions using sagas or compensations
- Building real-time event streams, data pipelines, or pub/sub systems
Best practices
- Model events as immutable, past-tense facts with correlation and causation IDs
- Design idempotent handlers and assume at-least-once delivery
- Version event schemas and support multiple versions during migration
- Partition by aggregate ID for scalability and keep event stores append-only
- Implement monitoring for event lag, processing errors, and throughput
- Provide replay capability and a schema registry for safe evolution
Example use cases
- E-commerce orders: OrderCreated events, payment sagas, and read-models for customer portals
- Financial ledgers: Event sourcing for auditability and temporal balance queries
- Inventory systems: CQRS read stores for fast queries and event streams for updates
- Cross-service workflows: Saga coordination for multi-step business processes
- Analytics pipelines: Kafka-based event streams feeding real-time dashboards
FAQ
Choose event sourcing when you need a complete audit trail, temporal queries (state at time T), multiple projections, or replay for recovery. For simple CRUD needs, event sourcing adds complexity and may be unnecessary.
How do I handle schema changes in events?
Use versioned event schemas, a schema registry, and backward/forward compatibility strategies. Support multiple schema versions during migration and provide transformers for older events when rebuilding projections.
4 skills
This skill helps you design and implement scalable event-driven systems using patterns like event sourcing, CQRS, and message-driven communication.
This skill helps you implement production-grade GitOps workflows with ArgoCD and Flux for declarative, multi-environment Kubernetes deployments.
This skill helps you implement scalable Terraform infrastructure by applying module design, state management, security, and testing best practices across
This skill helps you master TypeScript advanced patterns to build type-safe APIs, complex domain models, and reusable libraries with compile-time guarantees.