Tooluck logoTooluck
SKILL.md

projection-patterns

Agent skill fromwshobson/agents

Build read models and projections from event streams. Use when implementing CQRS read sides, building materialized views, or optimizing query performance in event-sourced systems.

How to install projection-patterns

install projection-patterns
# install the agents pack with the skills CLI
npx skills add wshobson/agents

# or add only this skill to Claude Code: copy the folder

plugins/backend-development/skills/projection-patterns/

# into

~/.claude/skills/projection-patterns/ (all projects)

.claude/skills/projection-patterns/ (one project)

plugins/backend-development/skills/projection-patterns/SKILL.md

MITFull file
1# Projection Patterns
2
3Comprehensive guide to building projections and read models for event-sourced systems.
4
5## When to Use This Skill
6
7- Building CQRS read models
8- Creating materialized views from events
9- Optimizing query performance
10- Implementing real-time dashboards
11- Building search indexes from events
12- Aggregating data across streams
13
14## Core Concepts
15
16### 1. Projection Architecture
17
18```
19┌─────────────┐ ┌─────────────┐ ┌─────────────┐
20│ Event Store │────►│ Projector │────►│ Read Model │
21│ │ │ │ │ (Database) │
22│ ┌─────────┐ │ │ ┌─────────┐ │ │ ┌─────────┐ │
23│ │ Events │ │ │ │ Handler │ │ │ │ Tables │ │
24│ └─────────┘ │ │ │ Logic │ │ │ │ Views │ │
25│ │ │ └─────────┘ │ │ │ Cache │ │
26└─────────────┘ └─────────────┘ └─────────────┘
27```
28
29### 2. Projection Types
30
31| Type | Description | Use Case |
32| -------------- | --------------------------- | ---------------------- |
33| **Live** | Real-time from subscription | Current state queries |
34| **Catchup** | Process historical events | Rebuilding read models |
35| **Persistent** | Stores checkpoint | Resume after restart |
36| **Inline** | Same transaction as write | Strong consistency |
37
38## Templates and detailed worked examples
39…

Excerpt shown under the repository's MIT license.

More skills in agents

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates