implement-cqrs-pattern

Community

Turn domain events into fast read models.

Authormariotoffia
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a structured blueprint for implementing CQRS in a domain-driven design. It explains how to separate the write model (aggregates and domain events) from the read models (denormalized projections) and how to wire events into projections to support fast, query-optimized reads.

Core Features & Use Cases

  • Command model with aggregates and domain events: write operations mutate state via aggregates that emit events.
  • Projections for read models: events update dashboard and analytics views without touching the write model.
  • Query handlers for reads: retrieve pre-computed views (dashboard, analytics, lists) efficiently.
  • Use Case: heating-building domain uses HeatingBuilding aggregates and HeatingOptimized events to populate BuildingDashboardView and BuildingAnalyticsView for real-time monitoring.

Quick Start

Define the HeatingBuilding aggregate and its command handlers, emit HeatingOptimized events, and wire projections to update the read models. Implement GetBuildingDashboardHandler and GetBuildingAnalyticsHandler to query the views, and ensure views can be rebuilt by replaying events.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: implement-cqrs-pattern
Download link: https://github.com/mariotoffia/gobridge/archive/main.zip#implement-cqrs-pattern

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.