Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 82% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 6% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 7% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 15% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 37% | 0% |
Comprehensive guide to implementing CQRS (Command Query Responsibility Segregation) patterns.
┌─────────────┐
│ Client │
└──────┬──────┘
│
┌────────────┴────────────┐
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ Commands │ │ Queries │
│ API │ │ API │
└──────┬──────┘ └──────┬──────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ Command │ │ Query │
│ Handlers │ │ Handlers │
└──────┬──────┘ └──────┬──────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ Write │─────────►│ Read │
│ Model │ Events │ Model │
└─────────────┘ └─────────────┘| Component | Responsibility | | ------------------- | ------------------------------- | | Command | Intent to change state | | Command Handler | Validates and executes commands | | Event | Record of state change | | Query | Request for data | | Query Handler | Retrieves data from read model | | Projector | Updates read model from events |
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
Other measured skills in the registry, with their headline benchmark lift.