saga-orchestration

Coordinate distributed transactions across microservices with compensation logic and failure recovery.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Jhabbig/Habbig --skill saga-orchestration-jhabbig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: saga-orchestration
Source: https://github.com/Jhabbig/Habbig/tree/main/.claude/plugins/wshobson/backend-development/skills/saga-orchestration
Command: npx skills add https://github.com/Jhabbig/Habbig --skill saga-orchestration-jhabbig

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement reliable distributed transactions when a workflow spans multiple services and two-phase commit is not available. It prevents partial failures from leaving your system in an inconsistent state by coordinating forward actions and compensating rollbacks.

Core Features & Use Cases

  • Saga Design: Define ordered steps for orchestration or choreography across services.
  • Compensation Logic: Build reversible actions that undo completed work when a later step fails.
  • Timeout and Recovery Handling: Configure per-step deadlines, retry failed compensations, and recover from stuck saga states.
  • Use Case: Use this Skill to model an order fulfillment flow that reserves inventory, charges payment, creates shipping, and then rolls everything back safely if any step fails.

Quick Start

Ask the assistant to design a saga orchestration for your multi-service workflow with step ordering, compensation actions, timeouts, and failure recovery.

Frequently Asked Questions about saga-orchestration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle distributed transactions across microservices without two-phase commit?

Saga orchestration coordinates distributed transactions by defining ordered forward actions across services and triggering reverse-order compensation rollbacks if a step fails. It ensures system consistency without two-phase commit by persisting saga state and managing per-step timeouts for recovery.

How do I design compensation logic for a failed multi-step workflow?

Design compensation logic by building reversible actions that undo completed work in reverse order. The saga pattern requires defining explicit compensation paths alongside forward actions, ensuring that completed steps are safely rolled back when a later step fails.

What is the best way to recover stuck saga states and handle failed compensations?

Recover stuck saga states and handle failed compensations by configuring per-step timeouts, retrying failed actions, and routing unrecoverable events to a dead-letter queue. Saga state persistence and correlation IDs track workflow progress to identify and safely recover stuck distributed transactions.

Do I need idempotent step handlers for orchestration and choreography workflows?

Yes, idempotent step handlers are required for orchestration and choreography workflows. Because saga recovery relies on retrying failed forward actions and compensations, idempotent handlers ensure that duplicated retries do not cause inconsistent state or duplicate side effects across distributed microservices.

When should I use saga orchestration instead of event-driven choreography?

Use saga orchestration instead of event-driven choreography when a distributed workflow requires explicit centralized coordination of step ordering, per-step timeouts, and direct management of compensation paths. Orchestration provides clearer state persistence and failure recovery boundaries compared to decentralized event-driven choreography.