# Design Reliable Event Stores

Event-sourced systems fail when ordering, concurrency, and replay behavior are designed incompletely. This skill provides architecture guidance, technology comparisons, schemas, and implementation patterns.

## Install

```bash
npx skillstore add sickn33/event-store-design
```

## Metadata

- Status: approved
- Slug: sickn33-event-store-design
- Skillstore revision: r2
- Version status: missing
- Tree hash: 454edca314d53c8b45fb647b11568525532891678e5baec2eb178feb922bd37b
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/event-store-design
- Ref: 88a8e9a07f4c54ab105c1c41b6267c287146b07b
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 69
- Public page: https://skillstore.pages.dev/skills/sickn33-event-store-design
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-event-store-design/manifest

## Capabilities

- Compares EventStoreDB, PostgreSQL, Kafka, DynamoDB, and Marten for event storage.
- Defines append-only storage requirements, ordering models, versions, subscriptions, and idempotency.
- Provides a PostgreSQL schema for events, snapshots, indexes, and subscription checkpoints.
- Shows Python patterns for appending events, reading streams, and processing subscriptions.
- Explains event metadata, snapshot policies, replay safety, and projection rebuilding.

## Use Cases

- Plan a New Event Store: Compare storage technologies and define ordering, concurrency, subscription, and retention requirements before implementation.
- Implement PostgreSQL Persistence: Create an event schema and service design for teams that already operate PostgreSQL.
- Review Replay and Scaling Safety: Assess checkpoints, idempotency, snapshots, projections, and indexes before increasing event volume.

## Prompt Templates

### Define Basic Requirements

```
Design an event store for [application]. Ask about event volume, ordering, consistency, retention, replay, and operational constraints before recommending an approach.
```

### Compare Storage Technologies

```
Compare PostgreSQL, EventStoreDB, Kafka, and DynamoDB for [workload]. Evaluate stream reads, global ordering, subscriptions, operations, cost, and scaling.
```

### Design a Production Schema

```
Design a production event-store schema for [domain] using [database]. Include concurrency, idempotency, metadata, indexes, checkpoints, snapshots, retention, and migration strategy.
```

### Audit an Existing Event Store

```
Review this event-store design: [design]. Identify integrity, concurrency, replay, projection, security, recovery, and scaling risks. Prioritize fixes and define verification tests.
```

## Limitations

- The examples require adaptation, dependency setup, and testing before production use.
- The skill does not benchmark technologies against a specific workload or budget.
- The examples do not provide complete authentication, authorization, encryption, monitoring, or disaster recovery.
- Technology guidance cannot replace review of current vendor documentation and service constraints.

## Best Practices

- State ordering, consistency, replay, retention, and throughput requirements before selecting technology.
- Protect event integrity with immutable records, atomic version checks, idempotent writes, and tested recovery procedures.
- Validate every example against current libraries, production security controls, and realistic load tests.

## Anti Patterns

- Do not modify or delete historical events to correct domain state.
- Do not advance consumer checkpoints before handlers and projection writes succeed.
- Do not treat sample connection settings or storage code as production-ready configuration.

## Security Audit

- Audited at: 2026-07-24T00:04:57.866\+00:00
- Summary: All 31 static findings are false positives caused by Markdown formatting, database method names, schema identifiers, and documentation links. Two implementation examples contain real security-relevant weaknesses: disabled transport security and a DynamoDB write path that does not enforce its claimed concurrency condition.

## Stats

- Views: 138
- Downloads: 9
- Favorites: 0
- Popularity score: 0
