marten-projections

Design and register Marten projections in CritterCab with lifecycle management.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/erikshafer/CritterCab --skill marten-projections
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: marten-projections
Source: https://github.com/erikshafer/CritterCab/tree/main/docs/skills/marten-projections
Command: npx skills add https://github.com/erikshafer/CritterCab --skill marten-projections

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires marten, wolverine, aspire, alba, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the process of designing and registering Marten projections in CritterCab, enabling efficient read model creation and event projection management.

Core Features & Use Cases

  • Projection Design: Offers guidance on designing projections for single-stream, multi-stream, and event projections.
  • Lifecycle Management: Helps in selecting the appropriate projection lifecycles (live, inline, async).
  • Registration: Shows how to register projections with service-bootstrap, including IoC-injected projections.
  • Use Case: Use this Skill to implement a read model for a service by registering a projection that processes events and generates the required data.

Quick Start

Register a new projection for the 'Trip' aggregate by following the instructions outlined in the skill unit.

Frequently Asked Questions about marten-projections

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

FAQPage Schema
How do I register Marten projections with dependency injection in dotnet?

You can register Marten projections using service-bootstrap to configure IoC-injected projections, allowing your read models to resolve dependencies directly through the application's service container during event projection processing.

What is the difference between live, inline, and async Marten projection lifecycles?

Marten projection lifecycles determine when read models update: live projections calculate on demand, inline projections update synchronously during event commits, and async projections update asynchronously via a background daemon for higher throughput.

How do I design a multi-stream projection in Marten for event sourcing?

Designing a multi-stream projection in Marten involves mapping events from multiple independent streams into a single aggregated read model, enabling you to query cross-stream data efficiently without rebuilding the original aggregate state.

Can I use Wolverine with Marten to manage event projection lifecycles?

Yes, Wolverine integrates with Marten to handle event projection lifecycles and message routing, facilitating the management of async projection daemons and ensuring reliable event processing within your dotnet application.

When should I use async projections instead of inline projections in Marten?

Use async projections in Marten when you need to process high volumes of events without blocking write operations, whereas inline projections are better suited for scenarios requiring immediately consistent read models upon event commitment.