arch-cqrs-es

Model domain state as events with CQRS read projections.

1|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CybLow/pypaginate --skill arch-cqrs-es
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arch-cqrs-es
Source: https://github.com/CybLow/pypaginate/tree/main/.opencode/skills/arch-cqrs-es
Command: npx skills add https://github.com/CybLow/pypaginate --skill arch-cqrs-es

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Persist domain state as a sequence of events to enable audit trails, replay, and flexible read models.

Core Features & Use Cases

  • Event Store: append-only storage for domain events with versioning and replay.
  • Projections: denormalized read models built from event streams for efficient queries.
  • CQRS: separate write models (aggregates/commands) and read models (queries) with clear boundaries.
  • Use Case: design a billing system where writes emit events and reads project current status for dashboards.

Quick Start

Create a simple event-sourced domain by defining an aggregate, applying events, and projecting reads from the event stream.

Frequently Asked Questions about arch-cqrs-es

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

FAQPage Schema
How do I model domain state as events for an event-sourced application?

Model domain state as events by defining aggregates that apply commands to emit append-only events. This approach enables deterministic replay to rebuild state and provides audit trails for domain changes.

What is the best way to build read-optimized projections from an event store?

Build read-optimized projections by denormalizing event streams into separate read models. This CQRS pattern creates clear boundaries between write models and fast query models for efficient dashboard retrieval.

When do I need CQRS and event sourcing for my architecture?

You need CQRS and event sourcing when requiring separate write and read models with deterministic replay. It suits domains needing audit trails, flexible projections, and complex state modeling like billing systems.

How do I create an event-sourced domain with aggregates and projections?

Create an event-sourced domain by defining an aggregate, applying events to mutate state, and projecting reads from the event stream. This establishes an event store with versioning and replay capabilities.

Does event sourcing work for designing a billing system with dashboard reads?

Event sourcing works for billing systems by having writes emit events and reads project current status. This enables flexible read models for dashboards while maintaining an append-only event store audit trail.

What are the limitations of using CQRS with event sourcing?

CQRS with event sourcing introduces complexity in modeling domain state as events and managing separate read models. It requires handling event store versioning, deterministic replay logic, and building projections for queries.