Skills · Coding

Event Store Design

Unverified30/40

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
CursorPartialPlain prose you can paste in — but no Cursor rules file
CodexPartialPlain prose you can paste in — but no AGENTS.md
Gemini CLIPartialPlain prose you can paste in
CopilotPartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add event-store-design

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

The whole source

No sign-in, no blur, nothing truncated
event-store-design/SKILL.md81 lines4.1 KBRawView on GitHub
Frontmatter — 2 properties
nameevent-store-design
descriptionDesign and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
1---
2name: event-store-design
3description: Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
4---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# Event Store Design
7 
8Comprehensive guide to designing event stores for event-sourced applications.
9 
10## When to Use This Skill
11 
12- Designing event sourcing infrastructure
13- Choosing between event store technologies
14- Implementing custom event stores
15- Optimizing event storage and retrieval
16- Setting up event store schemas
17- Planning for event store scaling
18 
19## Core Concepts
20 
21### 1. Event Store Architecture
22 
23```
24┌─────────────────────────────────────────────────────┐
25│ Event Store │
26├─────────────────────────────────────────────────────┤
27│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
28│ │ Stream 1 │ │ Stream 2 │ │ Stream 3 │ │
29│ │ (Aggregate) │ │ (Aggregate) │ │ (Aggregate) │ │
30│ ├─────────────┤ ├─────────────┤ ├─────────────┤ │
31│ │ Event 1 │ │ Event 1 │ │ Event 1 │ │
32│ │ Event 2 │ │ Event 2 │ │ Event 2 │ │
33│ │ Event 3 │ │ ... │ │ Event 3 │ │
34│ │ ... │ │ │ │ Event 4 │ │
35│ └─────────────┘ └─────────────┘ └─────────────┘ │
36├─────────────────────────────────────────────────────┤
37│ Global Position: 1 → 2 → 3 → 4 → 5 → 6 → ... │
38└─────────────────────────────────────────────────────┘
39```
40 
41### 2. Event Store Requirements
42 
43| Requirement | Description |
44| ----------------- | ---------------------------------- |
45| **Append-only** | Events are immutable, only appends |
46| **Ordered** | Per-stream and global ordering |
47| **Versioned** | Optimistic concurrency control |
48| **Subscriptions** | Real-time event notifications |
49| **Idempotent** | Handle duplicate writes safely |
50 
51## Technology Comparison
52 
53| Technology | Best For | Limitations |
54| ---------------- | ------------------------- | -------------------------------- |
55| **EventStoreDB** | Pure event sourcing | Single-purpose |
56| **PostgreSQL** | Existing Postgres stack | Manual implementation |
57| **Kafka** | High-throughput streaming | Not ideal for per-stream queries |
58| **DynamoDB** | Serverless, AWS-native | Query limitations |
59| **Marten** | .NET ecosystems | .NET specific |
60 
61## Templates and detailed worked examples
62 
63Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates.
64 
65## Best Practices
66 
67### Do's
68 
69- **Use stream IDs that include aggregate type** - `Order-{uuid}`
70- **Include correlation/causation IDs** - For tracing
71- **Version events from day one** - Plan for schema evolution
72- **Implement idempotency** - Use event IDs for deduplication
73- **Index appropriately** - For your query patterns
74 
75### Don'ts
76 
77- **Don't update or delete events** - They're immutable facts
78- **Don't store large payloads** - Keep events small
79- **Don't skip optimistic concurrency** - Prevents data corruption
80- **Don't ignore backpressure** - Handle slow consumers
81 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Coding