Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
Comprehensive guide to designing event stores for event-sourced applications.
┌─────────────────────────────────────────────────────┐
│ Event Store │
├─────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Stream 1 │ │ Stream 2 │ │ Stream 3 │ │
│ │ (Aggregate) │ │ (Aggregate) │ │ (Aggregate) │ │
│ ├─────────────┤ ├─────────────┤ ├─────────────┤ │
│ │ Event 1 │ │ Event 1 │ │ Event 1 │ │
│ │ Event 2 │ │ Event 2 │ │ Event 2 │ │
│ │ Event 3 │ │ ... │ │ Event 3 │ │
│ │ ... │ │ │ │ Event 4 │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────┤
│ Global Position: 1 → 2 → 3 → 4 → 5 → 6 → ... │
└─────────────────────────────────────────────────────┘
| Requirement | Description | | ----------------- | ---------------------------------- | | Append-only | Events are immutable, only appends | | Ordered | Per-stream and global ordering | | Versioned | Optimistic concurrency control | | Subscriptions | Real-time event notifications | | Idempotent | Handle duplicate writes safely |
| Technology | Best For | Limitations | | ---------------- | ------------------------- | -------------------------------- | | EventStoreDB | Pure event sourcing | Single-purpose | | PostgreSQL | Existing Postgres stack | Manual implementation | | Kafka | High-throughput streaming | Not ideal for per-stream queries | | DynamoDB | Serverless, AWS-native | Query limitations | | Marten | .NET ecosystems | .NET specific |
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
Order-{uuid}Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/event-store-design · pinned to the source commit
git clone https://github.com/wshobson/agents.git
cd agents
git checkout d82998e7df393c671ede2387a8435075f0b633f5
mkdir -p ".claude/skills/event-store-design"
cp -r "plugins/backend-development/skills/event-store-design" ".claude/skills/event-store-design"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit d82998e7df39. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
No static rules matched. This is not a safety guarantee.