projection-patterns

Provide patterns and templates for building read models from event streams.

4|2|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/3commas-io/commas-claude --skill projection-patterns-3commas-io
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: projection-patterns
Source: https://github.com/3commas-io/commas-claude/tree/main/skills/projection-patterns
Command: npx skills add https://github.com/3commas-io/commas-claude --skill projection-patterns-3commas-io

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured approach and reusable templates for building read models and projections from event streams, crucial for optimizing query performance and implementing CQRS read sides in event-sourced systems.

Core Features & Use Cases

  • Projection Architecture: Understand the flow from event store to read model.
  • Projection Types: Learn about live, catchup, persistent, and inline projections.
  • Reusable Templates: Implement basic projectors, order summaries, search indexes, aggregations, and multi-table projections.
  • Use Case: When building a CQRS read side, use this skill to create a OrderSummaryProjection that aggregates order events into a denormalized table for fast querying.

Quick Start

Use the projection-patterns skill to create a basic projector for order events.

Frequently Asked Questions about projection-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build read models from event streams in an event-sourced system?

Build read models from event streams by applying projection patterns that process events into denormalized tables. This skill provides Python templates to create projectors for materialized views, enabling fast querying in event-driven architectures.

What is the difference between live, catchup, and persistent projections?

Projections differ by processing timing: live projections compute on-demand, catchup projections rebuild from event history, and persistent projections continuously update read models. This skill outlines when to use each type for optimizing CQRS query performance.

How do I create an OrderSummaryProjection to aggregate order events?

Create an OrderSummaryProjection by using provided Python templates to aggregate order events into a denormalized read model table. This pattern transforms event streams into pre-calculated summaries for fast querying on the CQRS read side.

When do I need projections for query performance optimization in CQRS?

You need projections for query performance optimization in CQRS when read-side queries become slow or complex. Projections materialize event stream data into structured views, preventing expensive real-time event aggregation during reads.

Can I use these projection patterns for search indexing and multi-table updates?

Yes, you can use these projection patterns for search indexing and multi-table updates. The skill includes reusable templates for building projectors that populate search indexes and synchronize multiple read models from a single event stream.

What are the limitations of inline projections in event-driven architecture?

Inline projections in event-driven architecture can introduce transactional coupling between write and read sides, potentially causing latency in event processing. This skill details alternative projection types to avoid these bottlenecks.