saga-orchestration

Agent workflows

wshobson/agentsskills.sh ↗

Installs

9,285

deduplicated, at the last sync

Since we started

+1.2%

40 readings, about 2 hours apart. Not a live curve.

Our category

Agent workflows

ours

Last read

Sep 3, 2026

from the directory

Our brief

ours

This skill implements saga patterns for managing distributed transactions and long-running business processes across microservices. It helps coordinate workflows where atomicity is required, such as order fulfillment or booking systems, by defining ordered steps, actions, and compensating logic for partial failures. It provides abstract base classes to handle state transitions and compensation ordering in complex systems.

What it produces
  • Saga definition with ordered steps, action commands, and compensation commands
  • Orchestrator or choreography implementation
  • Compensation logic for each participant service
  • Step timeout configuration with per-step deadlines
  • Monitoring setup: state machine metrics, stuck saga detection, DLQ recovery
What it needs
  • Service boundaries and ownership (which service owns which step)
  • Transaction requirements (which steps must be atomic, which can be eventual)
  • Failure modes for each step (transient vs. permanent, retry policy)
  • SLA requirements per step
  • Existing event/messaging infrastructure (Kafka, RabbitMQ, SQS, etc.)
Paid services

not detected

The evidence provides no information regarding required paid services.

Registration

not detected

The evidence provides no information regarding required registration.

Limits and human review

The skill cannot decide on the specific service boundaries, transaction requirements, failure modes, or SLA needs for a user's unique system. Furthermore, it requires external event/messaging infrastructure like Kafka or RabbitMQ to function correctly.

Evidenceplugins/backend-development/skills/saga-orchestration/references/advanced-patterns.md:1-91plugins/backend-development/skills/saga-orchestration/references/details.md:1-69plugins/backend-development/skills/saga-orchestration/SKILL.md:1-118
plugins/backend-development/skills/saga-orchestration/references/advanced-patterns.md1–91 · excerpt truncated
# Saga Orchestration — Advanced Patterns

Complex implementations extracted from core skill for deeper reference.

---

## Full Saga Orchestrator Base Class

The abstract base handles all state transitions, compensation ordering, and event publishing. Subclass this for every saga type in your system.

```python
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Dict, Any, Optional
from datetime import datetime, timedelta
import uuid


class SagaState(Enum):
    STARTED = "started"
    PENDING = "pending"
    COMPENSATING = "compensating"
    COMPLETED = "completed"
    FAILED = "failed"


@dataclass
class SagaStep:
    name: str
    action: str
    compensation: str
    status: str = "pending"
    result: Optional[Dict] = None
    error: Optional[str] = None
    executed_at: Optional[datetime] = None
    compensated_at: Optional[datetime] = None
    timeout_at: Optional[datetime] = None


@dataclass
class Saga:
    saga_id: str
    saga_type: str
    state: SagaState
    data: Dict[str, Any]
    steps: List[SagaStep]
    current_step: int = 0
    created_at: datetime = field(default_factory=datetime.utcnow)
  
plugins/backend-development/skills/saga-orchestration/references/details.md1–69 · excerpt truncated
# saga-orchestration — detailed sections

## Templates

### Template 1: Order Fulfillment Saga (Orchestration)

Concrete subclass of the base orchestrator. Defines four steps spanning inventory, payment, shipping, and notification. See `references/advanced-patterns.md` for the full abstract `SagaOrchestrator` base class.

```python
from saga_orchestrator import SagaOrchestrator, SagaStep
from typing import Dict, List


class OrderFulfillmentSaga(SagaOrchestrator):
    """Orchestrates order fulfillment across four participant services."""

    @property
    def saga_type(self) -> str:
        return "OrderFulfillment"

    def define_steps(self, data: Dict) -> List[SagaStep]:
        return [
            SagaStep(
                name="reserve_inventory",
                action="InventoryService.ReserveItems",
                compensation="InventoryService.ReleaseReservation"
            ),
            SagaStep(
                name="process_payment",
                action="PaymentService.ProcessPayment",
                compensation="PaymentService.RefundPayment"
            ),
            SagaStep(
                name="create_shipment",
                action="ShippingService.Cr
plugins/backend-development/skills/saga-orchestration/SKILL.md1–118
---
name: saga-orchestration
description: Implement saga patterns for distributed transactions and cross-aggregate workflows. Use this skill when implementing distributed transactions across microservices where 2PC is unavailable, designing compensating actions for failed order workflows that span inventory, payment, and shipping services, building event-driven saga coordinators for travel booking systems that must roll back hotel, flight, and car rental reservations atomically, or debugging stuck saga states in production where compensation steps never complete.
---

# Saga Orchestration

Patterns for managing distributed transactions and long-running business processes without two-phase commit.

## Inputs and Outputs

**What you provide:**
- Service boundaries and ownership (which service owns which step)
- Transaction requirements (which steps must be atomic, which can be eventual)
- Failure modes for each step (transient vs. permanent, retry policy)
- SLA requirements per step (informs timeout configuration)
- Existing event/messaging infrastructure (Kafka, RabbitMQ, SQS, etc.)

**What this skill produces:**
- Saga definition with ordered steps, action commands, and compensatio

Read 3 of 3 text files in the skill.

Checked September 2026 · GemmaWritten from the skill's published files. Check the source before relying on access or cost details.

Installfrom the directory

npx skills add https://github.com/wshobson/agents

Installing happens there, not here. We are an index with an opinion, not a mirror.

What is inside itfrom the directory

references/advanced-patterns.md
references/details.md
SKILL.md

3 files — names only. The directory does not report sizes.

What the auditors foundfrom the directory

A skill is instructions your agent will follow and scripts it may run, so who checked it matters as much as how many people installed it.

Gen Agent Trust HubNo security issues detected. This skill provides architectural documentation and code templates for implementing Saga patterns in distributed systems.May 29, 2026 · SAFEpass
SocketNo alertsMay 29, 2026pass
SnykRisk: MEDIUM · 1 issueMay 29, 2026 · MEDIUMwarn
Runlayer1 file scanned · No issuesMar 7, 2026 · NONEpass
ZeroLeaksScore: 93/100 · 2 sections analyzedApr 16, 2026 · NONEpass

Installs, reading by readingours

9.2k
9.3k
Aug 30, 202640 readings over 5 days, drawn as the last reading of each day.Sep 3, 2026

Axis starts at 9.2k, not zero — the range is 9.2k to 9.3k.

Asked out loudspoken, not typed

The same skill in the words people use speaking to an assistant rather than typing into a box. Each one carries the situation it came from, and each answer says only what the skill's own files support.

designing a workflowHow do I handle failures in my distributed transactions?

You can use saga patterns to manage these, which allows you to define compensating actions for partial failures when two-phase commit isn't available. The system handles rolling back data across multiple services.

setting up a new serviceDo I need to worry about the messaging infrastructure?

You must provide details on your existing event or messaging infrastructure, such as Kafka or RabbitMQ. This is necessary for the skill to function correctly.

checking pricingIs this free to use?

The evidence does not contain any information about whether using this skill requires payment or a paid plan.

Filed alongside itours