saga-orchestration

saga-orchestration is a skill for Claude Code, Codex from wshobson/agents. It costs 91 tokens per session (1,198 once invoked), scanned A, original, MIT.

A guide to saga patterns, which coordinate a long transaction across several services by running steps and undoing completed steps when something fails. It covers orchestrated and event-based workflows.

In plain words
What is it for?
Use it for order flows spanning inventory, payments, and shipping; long-running workflows; retries; timeouts; compensation actions; and recovery monitoring.
Why use it?
It helps manage partial failures when several services must work together but cannot share one all-or-nothing database transaction.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the backend-development plugin — 9 skills, 1 command, 5 agents shipped together

Good fit Use it for order flows spanning inventory, payments, and shipping; long-running workflows; retries; timeouts; compensation actions; and recovery monitoring.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wshobson/agents/saga-orchestration
About the project

Agentic Plugin Marketplace is a collection of reusable plugins, agents, skills, commands, and rules for coding-agent tools including Claude Code, Codex CLI, Cursor, OpenCode, Antigravity CLI, and GitHub Copilot. It is for developers assembling agentic workflows across multiple harnesses from shared Markdown sources, and the catalogue entries are examples or subsets of those workflow components.

wshobson/agents · 39,505 stars · on GitHub · sethhobson.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wshobson/agents --skill saga-orchestration
Clone the repo
git clone --depth 1 https://github.com/wshobson/agents

Made for: Claude Code, Codex.

Or install backend-development, the plugin that ships this one along with the rest of its 9 skills, 1 command, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for saga-orchestration

README.md
[![agentmods](https://agentmods.dev/badge/skills/wshobson/agents/saga-orchestration/github.svg)](https://agentmods.dev/skills/wshobson/agents/saga-orchestration)
Your own site
<a href="https://agentmods.dev/skills/wshobson/agents/saga-orchestration"><img src="https://agentmods.dev/badge/skills/wshobson/agents/saga-orchestration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for saga-orchestration

Your own site · 80×15
<a href="https://agentmods.dev/skills/wshobson/agents/saga-orchestration"><img src="https://agentmods.dev/badge/skills/wshobson/agents/saga-orchestration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,198 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 29 May 2026
  • Snyk warn 29 May 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00091 $0.01198
Opus 5 $0.00046 $0.00599
Sonnet 5 $0.00018 $0.00240
Haiku 4.5 $0.00009 $0.00120

Measured 5d ago against content hash 95372f5b8235, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

saga-orchestration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/backend-development/skills/saga-orchestration/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 compensation commands
  • Orchestrator or choreography implementation for your chosen pattern
  • Compensation logic for each participant service (idempotent, always-succeeds)
  • Step timeout configuration with per-step deadlines
  • Monitoring setup: state machine metrics, stuck saga detection, DLQ recovery

When to Use This Skill

  • Coordinating multi-service transactions without distributed locks
  • Implementing compensating transactions for partial failures
  • Managing long-running business workflows (minutes to hours)
  • Handling failures in distributed systems where atomicity is required
  • Building order fulfillment, approval, or booking processes
  • Replacing fragile two-phase commit with async compensation

Detailed section: Core Concepts

Moved to references/details.md.

Detailed section: Templates

Moved to references/details.md.

Best Practices

Do's

  • Make every step idempotent — Commands may be replayed on broker reconnect
  • Design compensations carefully — They are the most critical code path
  • Use correlation IDs — The saga_id must flow through every event and log
  • Implement per-step timeouts — Never wait indefinitely for a participant reply
  • Log state transitionssaga_id, step_name, old_state → new_state on every change
  • Test compensation paths explicitly — Inject failures at each step index in integration tests

Read the full file on GitHub · 118 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 118 lines · 91 tokens per session scan A 95372f5b8235

Subscribe to this mod's changes

saga-orchestration is a skill published in the GitHub repository wshobson/agents (39,505 stars, last pushed yesterday), licensed MIT. It adds 91 tokens to every session and 1,198 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.