revfactory/claude-code-harness/event-sourcing-design

Claude Code and agent skill by revfactory/claude-code-harness

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

이벤트 소싱 + CQRS 패턴 설계 가이드. EventStore, Aggregate, Projection, Saga, Snapshot 구현 시 사용한다.

Install

npx vskill@latest install revfactory/claude-code-harness/event-sourcing-design

SKILL.md

The same SKILL.md was published earlier as revfactory/claude-code-harness/event-sourcing-design.

Event Sourcing CQRS Design Skill

이벤트 소싱 핵심 원칙

  1. 이벤트 = 사실(fact): 과거에 발생한 것, 불변
  2. 상태 = fold(events): 이벤트를 순서대로 적용한 결과
  3. 추가 전용(append-only): 이벤트 스트림에 추가만 가능
  4. 시간 여행: 과거 시점의 상태를 재구성 가능

Aggregate 패턴

javascript
class BankAccount extends AggregateRoot {
constructor(id) {
super(id);
this.balance = 0;
this.status = 'active';
}
// 커맨드 메서드: 비즈니스 규칙 검증 → 이벤트 생성
deposit(amount) {
if (amount <= 0) throw new Error('Amount must be positive');
if (this.status === 'frozen') throw new Error('Account is frozen');
this.apply(new MoneyDeposited(this.id, amount, this.balance + amount));
}
// 이벤트 핸들러: 상태 변경만 (부수효과 없음)
onMoneyDeposited(event) {
this.balance = event.balance;
}
}

CQRS 분리

Write Side (Command) Read Side (Query)
───────────────── ─────────────────
CommandHandler Projection
→ Aggregate.method() → 이벤트 구독
→ EventStore.append() → ReadModel 갱신
→ Query API 제공

Saga 상태 머신

TransferSaga:
INITIATED → DEBITED → COMPLETED
↓ (실패)
COMPENSATING → FAILED

구현 순서

  1. EventStore (핵심 인프라)
  2. AggregateRoot (기반 클래스)
  3. EventBus (이벤트 전파)
  4. CommandBus (커맨드 디스패치)
  5. Repository (Aggregate 로딩/저장)
  6. BankAccount Aggregate (도메인)
  7. Projection (읽기 모델)
  8. Saga (이체 프로세스)
  9. SnapshotStore (최적화)
  10. 통합 테스트

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/revfactory/claude-code-harness/event-sourcing-design/badge)](https://verified-skill.com/skills/revfactory/claude-code-harness/event-sourcing-design)

Something wrong with this skill or its page? Tell us.