用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill event-driven命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | event-driven |
| description | | Use when this capability is needed. |
Full Reference: See advanced.md for Saga implementations (Node.js, Java), Outbox pattern implementations, Event Sourcing, CQRS, and idempotency patterns.
Deep Knowledge: Use
mcp__documentation__fetch_docswith technology:event-drivenfor comprehensive documentation.
| Pattern | Purpose | Complexity |
|---|---|---|
| Pub/Sub | Decouple producers from consumers | Low |
| Event Sourcing | Store state as event sequence | High |
| CQRS | Separate read/write models | Medium-High |
| Saga | Distributed transactions | High |
| Outbox | Reliable event publishing | Medium |
Manages distributed transactions across services without 2PC.
┌─────────┐ event ┌─────────┐ event ┌─────────┐
│Order Svc│────────────▶│Payment │────────────▶│Inventory│
└─────────┘ │ Svc │ │ Svc │
▲ └─────────┘ └─────────┘
│ compensate │ compensate │
└───────────────────────┴───────────────────────┘
┌─────────────┐
│ Saga │
│Orchestrator │
└─────────────┘
/ | \
▼ ▼ ▼
┌───────┐ ┌───────┐ ┌───────┐
│Order │ │Payment│ │Invent.│
└───────┘ └───────┘ └───────┘
Ensures reliable event publishing with database transactions.
┌────────────────────────────────────────────┐
│ Database Transaction │
│ ┌──────────────┐ ┌──────────────────┐ │
│ │ Business │ │ Outbox Table │ │
│ │ Table │ │ (messages) │ │
│ └──────────────┘ └──────────────────┘ │
└────────────────────────────────────────────┘
│
Polling Relay / CDC
│
┌─────────────────┐
│ Message Broker │
└─────────────────┘
CREATE TABLE outbox (
id UUID PRIMARY KEY,
aggregate_type VARCHAR(255) NOT NULL,
aggregate_id VARCHAR(255) NOT NULL,
event_type VARCHAR(255) NOT NULL,
payload JSONB NOT NULL,
status VARCHAR(50) DEFAULT 'PENDING',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Commands Queries
│ │
▼ ▼
┌───────────────┐ ┌───────────────┐
│ Command Model │ │ Query Model │
│ (Write) │ │ (Read) │
└───────────────┘ └───────────────┘
│ ▲
▼ │
┌───────────────┐ Events ┌───────────────┐
│ Write Store │───────────────▶│ Read Store │
└───────────────┘ └───────────────┘
| Anti-Pattern | Why It's Bad | Solution |
|---|---|---|
| Event Soup | Too many fine-grained events | Design coarse-grained domain events |
| Missing Idempotency | Duplicate processing | Add idempotency keys |
| No Compensation Logic | Failed saga can't rollback | Implement compensating transactions |
| No Dead Letter Queue | Failed events lost | Configure DLQ for error handling |
| Weak Event Ordering | Race conditions | Use partitioning or ordered queues |
| Issue | Diagnostic | Solution |
|---|---|---|
| Lost events | Check message broker | Implement Outbox pattern |
| Duplicate processing | Logs show multiple executions | Add idempotency checks |
| Saga stuck | Compensation not triggered | Add timeout handling |
| Growing DLQ | Many failed messages | Analyze failures, fix consumers |
| Slow event processing | High message lag | Scale consumers, optimize handlers |
Available topics: patterns, saga, outbox, cqrs
Source: claude-dev-suite/claude-dev-suite — distributed by TomeVault.