
Event Store Design
FreeDesign and implement robust event stores for your applications.
Free · Opens the source repo
What Event Store Design does
Event Store Design is a comprehensive guide aimed at developers and architects who are building event-sourced systems. This skill provides detailed instructions on designing event stores, selecting the right technologies, and implementing effective event persistence patterns. It is particularly useful for those looking to establish a solid event sourcing infrastructure or optimize existing systems.
The skill covers essential concepts such as event store architecture, which emphasizes the importance of an append-only, ordered, and versioned approach to event storage. Each event is treated as an immutable fact, which allows for reliable event sourcing and easy tracking of changes over time. The guide also outlines the requirements for a successful event store, ensuring that users understand the critical characteristics needed for effective event management.
In addition to architectural guidance, the skill includes a comparison of various event store technologies, such as EventStoreDB, PostgreSQL, Kafka, DynamoDB, and Marten. This comparison helps users make informed decisions based on their specific needs and existing technology stacks. Furthermore, the skill provides best practices to follow and common pitfalls to avoid, ensuring that users can implement event stores that are both efficient and scalable.
For practical implementation, the skill offers a library of templates and detailed worked examples found in the accompanying references/details.md file. This resource is invaluable for developers who need concrete templates to kickstart their event store projects, making the transition from theory to practice seamless.
When to use it
Use this skill when you need to design event sourcing infrastructure or choose appropriate event store technologies for your application.
When not to use it
This skill may not be suitable if you are not working with event-sourced systems or if you require a general-purpose database solution.
What you can build with it
Designing a New Event-Sourced System
When starting a new project that requires event sourcing, this skill provides the foundational knowledge and templates needed to design a robust event store.
Choosing an Event Store Technology
If you're evaluating different technologies for your event store, this skill offers a detailed comparison to help you select the most suitable option.
Optimizing Existing Event Storage
For teams looking to improve their current event storage solutions, this skill outlines best practices and common pitfalls to avoid.
How to install Event Store Design
View source1. Install with the skills CLI
npx skills add wshobson/agents/event-store-design --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by wshobsonEvent 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
Frequently asked questions about Event Store Design
Similar skills
ClickHouse Logs Queries
Efficiently manage Supabase logs with ClickHouse SQL.
EF Core D2 Database Diagram Generator
Visualize your EF Core models as D2 diagrams effortlessly.
Safe SQL Execution
Ensure secure SQL execution in Supabase applications.
Oracle to PostgreSQL Migration
Identify migration risks between Oracle and PostgreSQL.
SSMA Console
Streamline Oracle to SQL Server migrations with ease.
SQL Performance Optimization
Enhance SQL query efficiency across all databases.
