event-sourcing

Stores state changes as a sequence of events for audit and replay.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/pohlai88/afenda-vite-react --skill event-sourcing-pohlai88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: event-sourcing
Source: https://github.com/pohlai88/afenda-vite-react/tree/main/.agents/skills/event-sourcing
Command: npx skills add https://github.com/pohlai88/afenda-vite-react --skill event-sourcing-pohlai88

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Store state changes as a sequence of events to enable durable audit trails, temporal queries, and event replay across systems.

Core Features & Use Cases

  • Event sourcing and CQRS patterns with an append-only event store, aggregates, and projections.
  • Auditability and historical reconstruction, with support for snapshots for performance.
  • Use cases include financial systems, compliance-heavy domains, and debugging complex domain models.

Quick Start

Create a minimal event store example that creates an aggregate, appends a few events, and replays them to produce state.

Frequently Asked Questions about event-sourcing

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

FAQPage Schema
What is event sourcing and how does it enable audit trails in CQRS architectures?

You can implement an event store by creating an aggregate, appending a sequence of domain events, and replaying them to produce current state. This Skill provides the core mechanics for capturing state changes and building projections for querying the reconstructed data.

How do I replay domain events to reconstruct aggregate state?

You can replay domain events by loading the append-only event sequence for an aggregate and applying each state change in order. This Skill provides the mechanics to replay the event store, rebuild aggregates, and generate queryable projections from the historical data.

Does event sourcing work for compliance-heavy financial systems requiring full history?

Event sourcing is well-suited for compliance-heavy financial systems because it captures every state change as an immutable domain event. This guarantees a complete audit trail and enables temporal queries to reconstruct any past state for regulatory compliance and debugging.

When do I need snapshots in an event-sourced system?

You need snapshots in an event-sourced system when replaying long sequences of domain events for a single aggregate becomes a performance bottleneck. Snapshots save the aggregate state at intervals, reducing the number of events that must be processed during event replay.

What are the limitations of using an append-only event store for state management?

A limitation of an append-only event store is that updating or deleting past domain events is disallowed, which complicates schema migrations and error corrections. Additionally, reconstructing current state requires event replay, potentially creating read latency without optimized projections or snapshots.