projection-patterns

Builds read models and materialized views from event streams.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Jhabbig/Habbig --skill projection-patterns-jhabbig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: projection-patterns
Source: https://github.com/Jhabbig/Habbig/tree/main/.claude/plugins/wshobson/backend-development/skills/projection-patterns
Command: npx skills add https://github.com/Jhabbig/Habbig --skill projection-patterns-jhabbig

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you transform event streams into reliable read models so applications can answer queries quickly without scanning raw events.

Core Features & Use Cases

  • Projection Architecture: Organize an event store, projector, and read model into a clear pipeline for CQRS systems.
  • Projection Types: Choose between live, catchup, persistent, and inline projections based on latency, consistency, and recovery needs.
  • Use Cases: Build dashboard views, search indexes, aggregate reports, and multi-table summaries from domain events with replayable handlers and checkpoints.

Quick Start

Use the projection-patterns skill to design an idempotent event projection for your read model with checkpointing, replay safety, and rebuild guidance.

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 a CQRS dashboard?

You build read models from event streams by organizing an event store, projector, and read model into a pipeline. This creates fast query paths for CQRS dashboards without scanning raw events, using idempotent projection handlers and checkpointed replay to ensure data consistency.

What are the different types of projections in event sourcing?

Projection types in event sourcing include live, catchup, persistent, and inline projections. You choose between them based on your specific latency, consistency, and recovery needs, allowing you to balance real-time updates with safe rebuild workflows for materialized views.

How do I ensure idempotent projection handlers during event replay?

Idempotent projection handlers are ensured by using checkpointed replay and transactional multi-table updates. This event sourcing mechanism tracks processed events safely, preventing duplicate data updates when rebuilding read models or replaying domain event streams.

Can I use event sourcing projections for search indexes and aggregate reports?

Yes, event sourcing projections support building search indexes, aggregate reports, and multi-table summaries from domain events. You apply projection patterns to transform raw event streams into optimized materialized views for fast querying and reporting.

When do I need checkpointed replay for materialized views?

You need checkpointed replay for materialized views when recovering from failures or rebuilding read models in an event-sourced system. Checkpointing tracks the last processed event, allowing projection handlers to resume safely without reprocessing the entire event stream history.