design-event-sourcing-cqrs

Design event-sourced and CQRS architectures with immutable events and decoupled read-write scaling.

9|3|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill design-event-sourcing-cqrs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-event-sourcing-cqrs
Source: https://github.com/Sir-chawakorn/sanook-cli/tree/main/skills/design-event-sourcing-cqrs
Command: npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill design-event-sourcing-cqrs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of building systems that require a perfect audit trail, temporal state reconstruction, or the separation of write-side commands from read-side queries, preventing common pitfalls like projection lag and data inconsistency.

Core Features & Use Cases

  • Event-Sourced Modeling: Treat business history as the primary source of truth using immutable, past-tense events.
  • CQRS Implementation: Decouple write-side command processing from read-side projections for independent scaling and optimized query performance.
  • Use Case: Ideal for financial ledgers, complex workflow state machines, or compliance-heavy systems where every state transition must be verifiable and replayable.

Quick Start

Use the design-event-sourcing-cqrs skill to architect a new domain model by defining immutable event schemas and aggregate boundaries for your system.

Frequently Asked Questions about design-event-sourcing-cqrs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design an event-sourced architecture for a financial ledger?

Designing an event-sourced architecture involves defining immutable, past-tense event schemas and aggregate boundaries. This treats business history as the primary source of truth, ensuring every state transition in your financial ledger is verifiable and replayable.

What is the best way to decouple read and write operations in CQRS?

The best way to decouple read and write operations in CQRS is to separate write-side command processing from read-side projections. This allows independent scaling and optimized query performance while maintaining state consistency across complex domain models.

When do I need event sourcing for audit trails and temporal queries?

You need event sourcing for audit trails and temporal queries when building compliance-heavy systems or complex workflow state machines. It ensures a perfect audit trail by storing immutable history, allowing temporal state reconstruction for verification.

How do I handle schema evolution and projection lag in event-sourced systems?

Handle schema evolution in event-sourced systems via upcasting and ensure idempotent projections to manage data consistency. This addresses common pitfalls like projection lag by decoupling write-side commands from read-side query updates.

Does CQRS support optimistic concurrency for complex domain models?

CQRS supports optimistic concurrency by separating command processing from read models, ensuring state consistency in complex domain models. This prevents concurrent write conflicts while maintaining an immutable, replayable event history.