event-store-design
What it does
This tool helps plan and create an 'event store' for systems that record everything that happens. It's useful for storing information securely and organized.
When to use it
- βWhen building the foundation for a system that logs events.
- βWhen choosing which technology to use for storing these events.
- βWhen organizing how events will be stored and retrieved.
Skill link
https://github.com/wshobson/agents/blob/main/plugins/backend-development/skills/event-store-design/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow can I design an event store to log user actions in an application?β
5 new skills a week. 1 minute to read.
How it works
It guides you in creating the event store's structure, defining how events will be added (always at the end), organized into sequences, and how to ensure there are no duplicates or losses.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
What is 'event sourcing'?
It's a way of building systems where all state changes are saved as a sequence of events. Instead of just storing the current state, you store the history of how it got there.
Why shouldn't events be updated or deleted?
Events are past facts. Changing them would be like rewriting history, which can cause inconsistencies. It's better to add new events to correct or cancel previous actions.
What are 'correlation IDs' and 'causation IDs'?
These are identifiers that help track the origin and flow of an event through different parts of the system, making debugging and understanding what happened easier.
Details
Original description by the author
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.
repo: wshobson/agents
Popularity
- GitHub stars
- 41k
- Ranking position
- #6638
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
screen-reader-testing
41kHas your agent test websites using screen readers to ensure they are accessible.
wcag-audit-patterns
41kHelps your agent audit websites for accessibility and fix issues according to WCAG guidelines.
multi-reviewer-patterns
41kEnables your agent to coordinate parallel code reviews, deduplicating findings and consolidating reports.
parallel-debugging
41kAllows the agent to debug complex issues with parallel investigations and root cause analysis.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.