Cqrs Implementation
Unverified●30/40Claude Code◐PartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor◐PartialPlain prose you can paste in — but no Cursor rules file
Codex◐PartialPlain prose you can paste in — but no AGENTS.md
Gemini CLI◐PartialPlain prose you can paste in
Copilot◐PartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add cqrs-implementationWho is stuck, and on what
Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.
The whole source
Frontmatter — 2 properties
| name | cqrs-implementation |
|---|---|
| description | Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems. |
| 1 | --- |
| 2 | name: cqrs-implementation |
| 3 | description: Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems. |
| 4 | ---A5 — No allowed-tools declared — no way to tell what this skill may touch |
| 5 | |
| 6 | # CQRS Implementation |
| 7 | |
| 8 | Comprehensive guide to implementing CQRS (Command Query Responsibility Segregation) patterns. |
| 9 | |
| 10 | ## When to Use This Skill |
| 11 | |
| 12 | - Separating read and write concerns |
| 13 | - Scaling reads independently from writes |
| 14 | - Building event-sourced systems |
| 15 | - Optimizing complex query scenarios |
| 16 | - Different read/write data models needed |
| 17 | - High-performance reporting requirements |
| 18 | |
| 19 | ## Core Concepts |
| 20 | |
| 21 | ### 1. CQRS Architecture |
| 22 | |
| 23 | ``` |
| 24 | ┌─────────────┐ |
| 25 | │ Client │ |
| 26 | └──────┬──────┘ |
| 27 | │ |
| 28 | ┌────────────┴────────────┐ |
| 29 | │ │ |
| 30 | ▼ ▼ |
| 31 | ┌─────────────┐ ┌─────────────┐ |
| 32 | │ Commands │ │ Queries │ |
| 33 | │ API │ │ API │ |
| 34 | └──────┬──────┘ └──────┬──────┘ |
| 35 | │ │ |
| 36 | ▼ ▼ |
| 37 | ┌─────────────┐ ┌─────────────┐ |
| 38 | │ Command │ │ Query │ |
| 39 | │ Handlers │ │ Handlers │ |
| 40 | └──────┬──────┘ └──────┬──────┘ |
| 41 | │ │ |
| 42 | ▼ ▼ |
| 43 | ┌─────────────┐ ┌─────────────┐ |
| 44 | │ Write │─────────►│ Read │ |
| 45 | │ Model │ Events │ Model │ |
| 46 | └─────────────┘ └─────────────┘ |
| 47 | ``` |
| 48 | |
| 49 | ### 2. Key Components |
| 50 | |
| 51 | | Component | Responsibility | |
| 52 | | ------------------- | ------------------------------- | |
| 53 | | **Command** | Intent to change state | |
| 54 | | **Command Handler** | Validates and executes commands | |
| 55 | | **Event** | Record of state change | |
| 56 | | **Query** | Request for data | |
| 57 | | **Query Handler** | Retrieves data from read model | |
| 58 | | **Projector** | Updates read model from events | |
| 59 | |
| 60 | ## Templates and detailed worked examples |
| 61 | |
| 62 | Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates. |
| 63 | |
| 64 | ## Best Practices |
| 65 | |
| 66 | ### Do's |
| 67 | |
| 68 | - **Separate command and query models** - Different needs |
| 69 | - **Use eventual consistency** - Accept propagation delay |
| 70 | - **Validate in command handlers** - Before state change |
| 71 | - **Denormalize read models** - Optimize for queries |
| 72 | - **Version your events** - For schema evolution |
| 73 | |
| 74 | ### Don'ts |
| 75 | |
| 76 | - **Don't query in commands** - Use only for writes |
| 77 | - **Don't couple read/write schemas** - Independent evolution |
| 78 | - **Don't over-engineer** - Start simple |
| 79 | - **Don't ignore consistency SLAs** - Define acceptable lag |
| 80 |
Reviews
Installed this one?Write the first review and take the Trailblazer badge.
Alternatives
Subagent Driven DevelopmentUse when executing implementation plans with independent tasks in the current session◐◐◐◐◐●36/40Python Code Style & DocumentationPython code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or establishing project standards.◐····●35/40Competitor Price Analysis 💲Competitor pricing strategy analysis and market positioning. Price mapping, pricing gaps identification, elasticity signals evaluation, and strategic pricing optimization. Use when the user asks about competitor pricing, price analysis, pricing strategy, or co◐····●34/40Competitor Price Tracker 📊Set up competitor price tracking and monitoring workflows. Track price changes, detect promotions, analyze pricing patterns, and get alerts for competitive price movements.◐····●34/40