Coordinate multi-step business processes across microservices with reliable compensation handling when failures occur.
スキルZIPをダウンロード
Claudeでアップロード
設定 → 機能 → スキル → スキルをアップロードへ移動
オンにして利用開始
テストする
「saga-orchestration」を使用しています。 Create a saga orchestrator for order processing with payment and inventory steps
期待される結果:
A Python class implementing SagaOrchestrator with define_steps method returning SagaStep objects, async methods for start, handle_step_completed, and handle_step_failed with proper state transitions
「saga-orchestration」を使用しています。 Show how to handle compensation for a failed payment in an order saga
期待される結果:
Compensation logic that iterates through completed steps in reverse order, publishing compensation events like RefundPayment and ReleaseInventory to undo the effects of successful steps
セキュリティ監査
安全All 19 static findings are false positives. The pattern-matching scanner misidentified Python code templates as Ruby shell execution, markdown text as cryptographic algorithms, and service names in diagrams as C2 indicators. The skill contains legitimate saga orchestration patterns for distributed systems with no security risks.
中リスクの問題 (3)
品質スコア
作れるもの
E-commerce Order Processing
Implement multi-step order fulfillment with inventory reservation, payment processing, and shipping orchestration with automatic rollback on failures.
Financial Transaction workflows
Create reliable financial processes with atomic compensation for multi-step transfers, refunds, and reconciliation tasks.
Cross-Service Approval Systems
Build approval workflows that coordinate across multiple services with automatic compensation if approvals are revoked or expire.
これらのプロンプトを試す
Create a Python saga orchestrator base class that manages saga state (Started, Pending, Compensating, Completed, Failed) with methods for starting a saga, handling step completion, and executing compensation in reverse order on failure.
Implement an OrderFulfillmentSaga that coordinates reserve_inventory, process_payment, create_shipment, and send_confirmation steps with appropriate compensation actions for each step.
Create an event-driven choreography saga that uses an event bus to publish and subscribe to events like OrderCreated, InventoryReserved, PaymentProcessed, and ShipmentCreated without a central orchestrator.
Extend the saga orchestrator to include timeout handling for each step. Add scheduled timeout checks that trigger compensation if a step does not complete within the configured time window.
ベストプラクティス
- Always design compensation actions before implementing forward actions - compensation must be reliable
- Use idempotency keys for all commands to safely handle duplicate messages without side effects
- Store correlation IDs across all events and logs to trace saga execution across service boundaries
回避
- Do not assume saga steps complete instantly - always implement async handling and state persistence
- Do not skip compensation testing - simulate failure at every step and verify rollback works
- Do not couple services directly - use async event messaging to maintain loose coupling