# Design Reliable Event-Sourced Systems

Complex domains need traceable state changes, resilient workflows, and query models built for their access patterns. This skill guides practical event sourcing and CQRS decisions.

## Install

```bash
npx skillstore add sickn33/event-sourcing-architect
```

## Metadata

- Status: approved
- Slug: sickn33-event-sourcing-architect
- Skillstore revision: r2
- Version status: missing
- Tree hash: 222d9afb344acb09361f1c2680a12189cacb5eb23a3e4788b2038470b7913aa6
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/event-sourcing-architect
- 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
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-event-sourcing-architect
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-event-sourcing-architect/manifest

## Capabilities

- Identifies aggregate boundaries, command flows, event streams, and immutable domain events.
- Designs CQRS read models and projections around specific query requirements.
- Structures sagas and process managers with retries, compensation, and correlation identifiers.
- Plans snapshotting strategies for long-lived aggregates and high-volume event streams.
- Defines event versioning, schema evolution, and projection rebuild approaches.
- Addresses eventual consistency, idempotent handlers, audit trails, and temporal queries.

## Use Cases

- Model an Auditable Domain: Define aggregates, commands, and events for systems that require complete state histories and temporal queries.
- Build CQRS Read Models: Plan projections, replay behavior, and idempotent handlers for application-specific query needs.
- Coordinate Distributed Workflows: Design sagas with durable state, retries, timeouts, and compensating actions across services.

## Prompt Templates

### Map an Event-Sourced Aggregate

```
Map an event-sourced aggregate for [domain]. Identify commands, immutable events, aggregate boundaries, and one read model. Explain each choice.
```

### Design a CQRS Architecture

```
Design a CQRS architecture for [system]. Define write flows, event streams, projections, consistency expectations, idempotency controls, and failure handling.
```

### Plan a Distributed Saga

```
Design a saga for [workflow] across [services]. Include steps, correlation identifiers, retries, timeouts, compensating actions, and observable failure states.
```

### Review an Evolving Event System

```
Review this architecture: [details]. Propose event versioning, upcasting, snapshotting, projection rebuilds, temporal queries, disaster recovery, and a staged validation plan.
```

## Limitations

- Event sourcing adds unnecessary complexity when standard CRUD satisfies the domain.
- The guidance does not replace environment-specific testing, operational validation, or expert review.
- Teams must be able to operate event stores, projections, and replay procedures.
- The approach cannot provide immediate consistency across every distributed workflow.

## Best Practices

- Model events as immutable business facts with stable identifiers and clear ownership.
- Make handlers idempotent and propagate correlation identifiers through every workflow step.
- Test projection rebuilds, schema changes, and recovery procedures before production use.

## Anti Patterns

- Do not mutate or delete committed production events to correct business state.
- Do not introduce event sourcing when simple transactional CRUD meets the requirements.
- Do not let projections become authoritative write models or hide consistency expectations.

## Security Audit

- Audited at: 2026-07-24T00:02:53.203\+00:00
- Summary: The only static finding is a false positive caused by Markdown backticks around related skill names. The skill contains architectural guidance and no executable commands or malicious instructions.

## Stats

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