Agent skill · software engineering · aiskillstore

projection-patterns

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.

Why this skill is useful

Provides specific templates and architectural patterns for building projections in event-sourced systems that the AI wouldn't reliably generate on its own.

What it needs

About 5k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Projection Patterns Comprehensive guide to building projections and read models for event-sourced systems. When to Use This Skill Building CQRS read models Creating materialized views from events Optimizing query performance Implementing real-time dashboards Building search indexes from events Aggregating data across streams Core Concepts 1. Projection Architecture 2. Projection Types 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 Templates Template 1: Basic Projector Template 2: Order Summary Projection Template 3: Elasticsearch Search Projection Template 4: Aggregating Projection Template 5: Multi-Table Projection Best Practices Do's Make projections idempotent - Safe to replay Use transactions - For multi-table updates Store checkpoints - Resume after failures Monitor lag - Alert on projection delays Plan for rebuilds - Design for reconstruction Don'ts Don't couple projections - Each is independent Don't skip error handling - Log and alert on failures Don't ignore ordering - Events must be processed in order Don't over-normalize - Denormalize for query patterns Resources CQRS Pattern Projection Building Blocks

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/projection-patterns--a05318

View the source on GitHub

Browse the @skills marketplace