본문으로 건너뛰기
cccskills
무료GitHub에 공개

cqrs-event-sourcing-architect

CQRS pattern, event stores, projections, eventual consistency. Activate on: CQRS, event sourcing, event store, read model, projection, aggregate, domain event, command handler. NOT for: message broker setup (use event-driven-architecture-expert), database optimization (use data-warehouse-optimizer).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구PostgreSQL

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

CQRS & Event Sourcing Architect

Design systems that separate read/write models and derive state from immutable event logs using EventStoreDB, Marten, or custom stores.

Activation Triggers

Activate on: "CQRS", "event sourcing", "event store", "read model", "projection", "aggregate", "domain event", "command handler", "EventStoreDB", "Marten"

NOT for: Message broker infrastructure → event-driven-architecture-expert | Database query optimization → data-warehouse-optimizer | API design → api-architect

Quick Start

  1. Model aggregates — identify consistency boundaries in your domain
  2. Define domain events — past-tense facts: OrderPlaced, ItemShipped
  3. Implement command handlers — validate, then emit events
  4. Build event store — append-only log (EventStoreDB, PostgreSQL, DynamoDB)
  5. Create projections — materialize read models from event streams

Core Capabilities

DomainTechnologies
Event StoresEventStoreDB 24.x, Marten 7.x, custom PostgreSQL
FrameworksNestJS CQRS, Axon (JVM), Eventuous, Commanded (Elixir)
ProjectionsIn-memory, PostgreSQL views, Elasticsearch, Redis
SerializationJSON with versioned schemas, Protobuf
TestingGiven-When-Then event test pattern

Architecture Patterns

CQRS Separation

Command Side                    Query Side
─────────────                   ──────────
POST /orders                    GET /orders/:id
     ↓                               ↑
Command Handler                 Read Model (Postgres/ES)
     ↓                               ↑
Aggregate.apply(event)          Projection Handler
     ↓                               ↑
Event Store (append)  ──────→  Event Subscription

Aggregate with Event Replay

class OrderAggregate {
  private status: 'draft' | 'placed' | 'shipped' = 'draft';
  private items: OrderItem[] = [];
  private uncommitted: DomainEvent[] = [];

  place(command: PlaceOrderCommand): void {
    if (this.status !== 'draft') throw new Error('Order already placed');
    this.apply(new OrderPlaced({ orderId: command.orderId, items: command.items }));
  }

  private apply(event: DomainEvent): void {
    this.when(event);           // mutate state
    this.uncommitted.push(event); // track for persistence
  }

  private when(event: DomainEvent): void {
    if (event instanceof OrderPlaced) {
      this.status = 'placed';
      this.items = event.items;
    }
  }

  static rehydrate(events: DomainEvent[]): OrderAggregate {
    const agg = new OrderAggregate();
    events.forEach(e => agg.when(e));
    return agg;
  }
}

Projection Rebuild Strategy

1. Stop projection subscription
2. Drop/truncate read model table
3. Replay all events from position 0
4. Resume subscription at current position

Key: projections are disposable — the event log is the source of truth

Anti-Patterns

  1. CRUD in disguise — if you just save/load entities without events, you have CRUD with extra steps
  2. Anemic events — events like OrderUpdated are useless; capture what changed specifically
  3. Querying the event store — never query raw events for read use cases; build a projection
  4. Deleting events — event stores are append-only; use compensating events for corrections
  5. Ignoring eventual consistency — read models lag behind writes; design UIs to handle this gracefully

Quality Checklist

  • Aggregates enforce invariants before emitting events
  • Events are immutable, past-tense, and contain all needed data
  • Event store is append-only with optimistic concurrency
  • Projections can be rebuilt from scratch without data loss
  • Event versioning strategy defined (upcasting or schema registry)
  • Given-When-Then tests cover all aggregate state transitions
  • Snapshot strategy defined for aggregates with long event streams (>1000 events)
  • Eventual consistency communicated clearly in API contracts
  • Idempotent projection handlers (replaying events produces same read model)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Use for insight, reframing, contradiction, impasse, and anomaly-driven problem solving when execution effort no longer helps. NOT for routine optimization, error correction, or well-specified tasks with known solution paths.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

Apply cognitive task analysis to expert work that depends on perceptual cues, branching judgment, and recurring monitoring loops. Use when decomposing expert capability into agent structure, simulation design, or validation interviews. NOT for ordinary step-by-step SOP capture or simple pipelines with no tacit cue layer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 19일 업데이트

curiositech의 스킬 모두 보기

이 스킬의 문제 신고