Skip to content
Skillpedia
APIs & servers (backend)41k · #4805

event-store-design

Helps your agent design and create places to store events in systems that record everything that happens. It's important for systems needing a complete history.

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.

Example of what to ask your AI

“How can I design an event store to log user actions in an application?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/wshobson/agents/blob/main/plugins/backend-development/skills/event-store-design/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/backend-development/skills/event-store-design/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
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.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add wshobson/agents --skill event-store-design

Or download just the file:

curl -L https://raw.githubusercontent.com/wshobson/agents/main/plugins/backend-development/skills/event-store-design/SKILL.md -o SKILL.md
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
#4805
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills