projection-patterns

Generate projection and read model templates from event streams in Python.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ACGSpgp/ACGS --skill projection-patterns-acgspgp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: projection-patterns
Source: https://github.com/ACGSpgp/ACGS/tree/main/.agent/workflows/backend-development/1.2.3/skills/projection-patterns
Command: npx skills add https://github.com/ACGSpgp/ACGS --skill projection-patterns-acgspgp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and templates for building projections and read models in event-sourced systems, optimizing query performance and enabling efficient data retrieval.

Core Features & Use Cases

  • CQRS Read Models: Implement read sides for Command Query Responsibility Segregation.
  • Materialized Views: Create and maintain denormalized views of event data.
  • Query Optimization: Improve the speed of complex queries by pre-aggregating data.
  • Real-time Dashboards & Search: Power live dashboards and search indexes from event streams.

Quick Start

Use the projection-patterns skill to generate a basic projector template.

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?

To build read models from event streams, you apply projection patterns that subscribe to events and update materialized views, enabling efficient data querying without impacting the write side. This Skill provides Python templates for implementing these projectors.

What is the best way to implement the CQRS read side with materialized views?

Implementing the CQRS read side involves creating projections that consume event streams to populate denormalized materialized views. This Skill offers patterns and Python code examples to maintain these views, optimizing query performance for complex data retrieval.

How do I ensure idempotent and transactional updates when creating projections?

Ensuring idempotent and transactional projection updates requires applying specific patterns that handle duplicate events and maintain data consistency. This Skill includes best practices and templates to achieve reliable, transactional read model updates.

Can I use event sourcing projections to power real-time dashboards and search indexes?

Yes, event sourcing projections can power real-time dashboards and search indexes by continuously applying event streams to update materialized views. This Skill provides the architectural patterns needed to feed live data into these downstream interfaces.

Do I need event-driven architecture to use projection patterns for query optimization?

Yes, projection patterns are designed for event-driven architecture, specifically event-sourced systems where data is stored as a sequence of events. They optimize complex queries by pre-aggregating event data into structured materialized views.