/system-design:cqrs-designfrom system-design
Guides implementing CQRS to separate command and query models for complex domains with divergent read/write patterns, audit requirements, or immutability needs.
Ships in system-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Implement Command Query Responsibility Segregation (CQRS) to align data models with actual usage patterns and enable independent scaling of reads and writes.
You are designing or refactoring a system with complex read and write patterns. The user faces performance issues, audit requirements, or divergent read/write needs. Read their current data access patterns.
Based on Greg Young's CQRS work and Fowler's research:
Analyze Read vs Write: List all queries used; identify divergences from write model. Example: commands work with Orders (with line items), but queries need denormalized OrderSummary (customer name, total, status).
Design Command Model: Optimize for consistency and rule enforcement. Aggregate should protect invariants. Example: Order aggregate ensures total ≥ sum of items.
Design Read Models: For each query pattern, denormalize to minimize joins. Example: OrderSummary includes customer name (copied from command), total (calculated), status (current).
Define Synchronization: How does read model stay updated? Options:
Handle Eventual Consistency: Users must accept slight staleness. Define lag threshold (e.g., reads lag writes by max 2 seconds). Show stale data indicator if lag exceeds threshold.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cqrs, event-sourcing, read-model, command-model, domain-driven-design
10 skills in this plugin
/api-gateway-designDesign API gateways that route, authenticate, rate-limit, and aggregate backend services. Use when building client-facing APIs or managing service boundaries./caching-strategyDesign multi-layer caching strategies (client, edge, service, database) for performance. Use when optimizing latency or reducing database load./data-partitioningDesign partitioning and sharding strategies for data at scale. Use when single database hits throughput or storage limits.npx claudepluginhub sethdford/claude-skills --plugin architect-system-designOther plugins' skills for the same job