event-store-design — Claude Code skill: event store design
This skill guides event store design for event-sourced systems and helps compare storage technologies. Use it when building event persistence infrastructure or choosing a store.
/plugin marketplace add wshobson/agents
/plugin install backend-development@claude-code-workflowsWhat event-store-design does
The guide models an event store as aggregate streams with ordered events and a global position. It covers append-only writes, optimistic concurrency, subscriptions, and handling duplicate writes. These concepts help define how a store should behave before implementation.
It compares EventStoreDB, PostgreSQL, Kafka, DynamoDB, and Marten, including where each fits and its limitations. The practices cover stream IDs, event versioning, deduplication, and indexing. Detailed templates and worked examples are in references/details.md.
Use this skill when designing event sourcing infrastructure or weighing storage options. It does not implement a store for you: PostgreSQL requires manual implementation, while Kafka is not ideal for per-stream queries.
What it helps with
- choose a technology for an event store
- design aggregate event streams
- define ordering and concurrency control
- deduplicate repeated event writes
- plan for event schema evolution
Example prompts for the agent
- Compare EventStoreDB and PostgreSQL for our event store, including their limitations.
- Suggest an event stream schema for order aggregates and explain how to handle optimistic concurrency.
- Show how to version events and deduplicate writes using the examples in `references/details.md`.
How to install event-store-design
1Plugin marketplace
/plugin marketplace add wshobson/agents/plugin install backend-development@claude-code-workflowsThis installs the whole backend-development plugin with all its skills
2Skills CLI (Vercel)
npx skills add wshobson/agents --skill event-store-design -a claude-code3Manually: put the files in place
~/.claude/skills/event-store-design/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/event-store-design/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill event-store-design -a codex2Manually: put the files in place
.agents/skills/event-store-design/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill event-store-design -a cursor2Manually: put the files in place
.cursor/skills/event-store-design/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshobson/agents event-store-design2Manually: put the files in place
.github/skills/event-store-design/SKILL.mdPlatform CLI
gemini skills install https://github.com/wshobson/agents --path plugins/backend-development/skills/event-store-designManually: put the files in place
.devin/skills/event-store-design/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set213
The whole set →Similar
Questions about event-store-design
How do I install event-store-design in Claude Code?
Run npx skills add wshobson/agents --skill event-store-design -a claude-code. You can also add the marketplace with /plugin marketplace add wshobson/agents, then install /plugin install backend-development@claude-code-workflows.
What does event-store-design do?
It guides event store design for event-sourced systems, covering storage requirements and comparing technologies such as EventStoreDB, PostgreSQL, and Kafka.
Which storage technologies does the skill compare?
It compares EventStoreDB, PostgreSQL, Kafka, DynamoDB, and Marten, describing a suitable use case and a limitation for each.
Source text
SKILL.md · MIT
---
name: event-store-design
description: Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
---
# Event Store Design
Comprehensive guide to designing event stores for event-sourced applications.
## When to Use This Skill
- Designing event sourcing infrastructure
- Choosing between event store technologies
- Implementing custom event stores
- Optimizing event storage and retrieval
- Setting up event store schemas
- Planning for event store scaling
## Core Concepts
### 1. Event Store Architecture
```
┌─────────────────────────────────────────────────────┐
│ 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 → ... │
└─────────────────────────────────────────────────────┘
```
### 2. Event Store Requirements
| 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 Comparison
| 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 |
## Templates and detailed worked examples
Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates.
## Best Practices
### Do's
- **Use stream IDs that include aggregate type** - `Order-{uuid}`
- **Include correlation/causation IDs** - For tracing
- **Version events from day one** - Plan for schema evolution
- **Implement idempotency** - Use event IDs for deduplication
- **Index appropriately** - For your query patterns
### Don'ts
- **Don't update or delete events** - They're immutable facts
- **Don't store large payloads** - Keep events small
- **Don't skip optimistic concurrency** - Prevents data corruption
- **Don't ignore backpressure** - Handle slow consumers
© Seth Hobson · MIT · wshobson/agents