
If you're building event-sourced systems with CQRS, you'll eventually need to create read models from your event streams, and that's where this becomes essential. It provides concrete projector implementations that handle the mechanics of consuming events, maintaining checkpoints, and updating read models in databases or search indexes. The templates cover real scenarios like building order summaries from multiple event types and syncing data to Elasticsearch. What I appreciate is the focus on practical concerns like batch processing, error handling, and projection rebuilding. It's the kind of code you'd write anyway, but having tested patterns saves you from reinventing the checkpoint management and event handling infrastructure.
$ npx -y skills add wshobson/agents --skill projection-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Comprehensive guide to building projections and read models for event-sourced systems.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Event Store │────►│ Projector │────►│ Read Model │
│ │ │ │ │ (Database) │
│ ┌─────────┐ │ │ ┌─────────┐ │ │ ┌─────────┐ │
│ │ Events │ │ │ │ Handler │ │ │ │ Tables │ │
│ └─────────┘ │ │ │ Logic │ │ │ │ Views │ │
│ │ │ └─────────┘ │ │ │ Cache │ │
└─────────────┘ └─────────────┘ └─────────────┘
| Type | Description | Use Case |
|---|---|---|
| Live | Real-time from subscription | Current state queries |
| Catchup | Process historical events | Rebuilding read models |
| Persistent | Stores checkpoint | Resume after restart |
| Inline | Same transaction as write | Strong consistency |
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
Sponsors