projection-patterns

Build Python read models from event streams using Live, Catchup, Persistent, and Inline projections.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill projection-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: projection-patterns
Source: https://github.com/ccf/claude-code-ccf-marketplace/tree/main/plugins/backend-development/skills/projection-patterns
Command: npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill projection-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Projection patterns provide a disciplined approach to turning event streams into queryable read models, enabling scalable CQRS read sides and materialized views.

Core Features & Use Cases

  • Live projections: maintain real-time read models from active event streams.
  • Catchup projections: rebuild read models from historical events.
  • Persistent projections: checkpoint state to allow resuming after failures.
  • Inline projections: ensure strong consistency by updating read models in the same transaction as writes.
  • Templates and patterns: ready-to-adapt projectors for common domain scenarios (e.g., order processing, product catalogs, customer analytics).

Use cases include building order read models, dashboards, search indexes, and cross-stream analytics in event-sourced architectures.

Quick Start

Define a Projection subclass, wire it to a Projector, register it, and start processing 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 for CQRS queries?

Build read models from event streams by defining a Projection subclass, wiring it to a Projector, and registering it to process events. This creates queryable materialized views for scalable CQRS read sides.

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

Live projections maintain real-time read models from active streams, catchup projections rebuild from historical events, persistent projections checkpoint state to resume after failures, and inline projections update read models in the same transaction as writes.

How do I rebuild a read model from historical events after a failure?

Use catchup projections to rebuild read models from historical events, or persistent projections to checkpoint state and resume processing from the last saved point after a failure occurs.

Can I use projection patterns for Python event-sourced architectures?

Yes, projection patterns provide reusable templates and ready-to-adapt projectors for Python implementations, supporting common domain scenarios like order processing, product catalogs, and customer analytics in event-sourced architectures.

When should I use inline projections instead of live projections?

Use inline projections when you need strong consistency by updating read models in the same transaction as writes. Use live projections when maintaining real-time read models from active event streams without strict transactional guarantees.

What are the limitations of using projections for cross-stream analytics?

Projections for cross-stream analytics require transactional updates and checkpoint management to handle failures. Complex cross-stream scenarios may need persistent projection architectures to ensure state consistency and enable recovery.