---
title: "イベントストアを設計する（エージェント用スキル） | Orchestor"
description: "イベントソーシングを使うシステムのイベントストアを設計・実装します。基盤の構築、イベントストア技術の選定、イベント永続化パターンの実装に使います。wshobson/agents が公開している「イベントストアを設計する」の使い方を確認できます。"
canonical_url: "https://www.orchestor.io/ja/skills/wshobson/agents/event-store-design"
markdown_url: "https://www.orchestor.io/ja/skills/wshobson/agents/event-store-design.md"
---

[c96b5f6](https://github.com/wshobson/agents/commit/c96b5f6552dba32e4492307493ee613581430715)[原文を開く](https://github.com/wshobson/agents/blob/c96b5f6552dba32e4492307493ee613581430715/plugins/backend-development/skills/event-store-design/SKILL.md)

wshobson2026/11/24

原文 (選択中)

未翻訳

プレビュー (選択中)

80 行（空行を除く 62 行） · 4.05 KB原文

```yaml
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 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

## Structured data

```json
[
  [
    {
      "@context": "https://schema.org",
      "@type": "Organization",
      "name": "Orchestor",
      "url": "https://www.orchestor.io",
      "sameAs": [
        "https://orchestor.io",
        "https://www.orchestor.io",
        "https://docs.orchestor.io"
      ],
      "@id": "https://www.orchestor.io/#organization",
      "alternateName": [
        "オーケスター"
      ],
      "logo": "https://www.orchestor.io/images/common/ogp/orchestor-ogp.png",
      "parentOrganization": {
        "@type": "Organization",
        "name": "ドットメディア株式会社",
        "url": "https://www.dotmedia.co.jp"
      }
    },
    {
      "@context": "https://schema.org",
      "@type": "WebSite",
      "url": "https://www.orchestor.io",
      "name": "Orchestor",
      "description": "Orchestor で画像・動画・音声を作り、参照素材を Remix できます。",
      "@id": "https://www.orchestor.io/#website",
      "alternateName": [
        "オーケスター"
      ],
      "inLanguage": "ja",
      "publisher": {
        "@id": "https://www.orchestor.io/#organization"
      }
    }
  ],
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "@id": "https://www.orchestor.io/skills/wshobson/agents/event-store-design#breadcrumb",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Orchestor",
        "item": "https://www.orchestor.io/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "スキル",
        "item": "https://www.orchestor.io/skills"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "イベントストアを設計する",
        "item": "https://www.orchestor.io/skills/wshobson/agents/event-store-design"
      }
    ]
  }
]
```

---

[Documentation index](https://www.orchestor.io/llms.txt)
