event-driven-architecture
建構事件驅動微服務
以事件驅動模式建置分散式系統需要理解訊息傳遞模式、Saga 協調與代理整合。本技能提供可直接使用的 Kafka、Dapr、Redis 與 pub/sub 架構模式。
Die Skill-ZIP herunterladen
In Claude hochladen
Gehe zu Einstellungen → Fähigkeiten → Skills → Skill hochladen
Einschalten und loslegen
Teste es
Verwendung von "event-driven-architecture". Create an event schema for order placed with order_id, customer_id, and items
Erwartetes Ergebnis:
- DomainEvent: order.placed with aggregate_id=order_id
- Event data includes: order_id, customer_id, items list, total_amount
- Correlation tracking via correlation_id for distributed tracing
- Priority level: normal (can be set to high for time-sensitive orders)
Verwendung von "event-driven-architecture". Set up a saga for order processing with inventory reservation and payment
Erwartetes Ergebnis:
- Saga: order-processing with compensation rollback on failure
- Step 1: Reserve inventory (compensate: release inventory)
- Step 2: Process payment (compensate: refund payment)
- Step 3: Ship order (compensate: cancel shipment)
- Retry policy: 3 attempts with exponential backoff
Verwendung von "event-driven-architecture". Configure Dapr pub/sub for publishing events to multiple subscribers
Erwartetes Ergebnis:
- DaprClient connected to localhost:3500 sidecar
- Publish event to pubsub component with topic name
- Supports metadata for custom routing and filtering
- Works with Kafka, Redis, RabbitMQ backends
Sicherheitsaudit
SicherDocumentation-only skill containing Python code patterns for event-driven architecture. No executable code, no network calls to external endpoints, no file system access beyond configuration, no credential handling. Purely instructional content aligned with stated purpose. All 109 static findings are false positives - the scanner misinterpreted code examples, documentation placeholders, and metadata as security issues.
Risikofaktoren
🌐 Netzwerkzugriff (4)
📁 Dateisystemzugriff (1)
⚙️ Externe Befehle (17)
🔑 Umgebungsvariablen (6)
Qualitätsbewertung
Was du bauen kannst
實作事件溯源
建立稽核軌跡並從不可變事件串流恢復系統狀態
設計分散式交易
使用 saga 模式與補償協調多服務操作
使用 Dapr 部署
設定 Dapr 元件以支援狀態、pub/sub 與服務呼叫
Probiere diese Prompts
Create a custom DomainEvent for user registration with event_type, aggregate_id, and event_data fields
Set up a KafkaBroker connecting to bootstrap-servers:9092 and create a topic for order events
Create a Saga with three steps: reserve inventory, process payment, and ship order, with compensation actions
Implement a CommandBus with CreateTaskCommand and a QueryBus with GetTaskQuery for task management
Bewährte Verfahren
- 使用明確的事件版本控制以支援結構演進
- 設計具冪等性的事件處理器以處理重複處理
- 善用代理層級功能,例如 Kafka 消費者群組以進行擴展
Vermeiden
- 避免在事件處理器中採用同步請求-回應模式
- 不要將事件生產者直接耦合到特定消費者
- 避免在事件負載中儲存敏感資料而未加密
Häufig gestellte Fragen
哪些 AI 工具有支援此技能?
支援哪些訊息代理?
此技能會佈建基礎設施嗎?
使用此技能我的資料安全嗎?
為什麼要使用事件驅動而非 REST APIs?
這與 RPC 框架相比如何?
Entwicklerdetails
Autor
Azeem-2Lizenz
MIT
Repository
https://github.com/Azeem-2/HackthonII/tree/master/.claude/skills/event-driven-architectureRef
master
Dateistruktur
📄 SKILL.md