Distributed transaction patterns using orchestration and choreography
View on GitHubmelodic-software/claude-code-plugins
event-modeling
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/melodic-software/claude-code-plugins/blob/main/plugins/event-modeling/skills/saga-patterns/SKILL.md -a claude-code --skill saga-patternsInstallation paths:
.claude/skills/saga-patterns/# Saga Patterns Skill
## When to Use This Skill
Use this skill when:
- **Saga Patterns tasks** - Working on distributed transaction patterns using orchestration and choreography
- **Planning or design** - Need guidance on Saga Patterns approaches
- **Best practices** - Want to follow established patterns and standards
## Overview
Design distributed transaction patterns using orchestration and choreography for microservices.
## MANDATORY: Documentation-First Approach
Before designing sagas:
1. **Invoke `docs-management` skill** for saga patterns
2. **Verify patterns** via MCP servers (perplexity, context7)
3. **Base guidance on established microservices patterns**
## Saga Fundamentals
```text
Why Sagas?
PROBLEM:
Distributed transactions across services are complex.
Traditional 2PC (Two-Phase Commit) doesn't scale.
SOLUTION:
Saga = Sequence of local transactions
Each step has a compensating action
Eventual consistency instead of ACID
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Step 1 │───►│ Step 2 │───►│ Step 3 │
│ Tx + Cx │ │ Tx + Cx │ │ Tx + Cx │
└─────────┘ └─────────┘ └─────────┘
│ │ │
▼ ▼ ▼
Local Local Local
Transaction Transaction Transaction
Tx = Forward Transaction
Cx = Compensating Transaction
```
## Saga Coordination Styles
### Choreography (Event-Driven)
```text
Choreography Pattern:
Services communicate through events.
No central coordinator.
Each service knows what to do next.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Order │ │ Payment │ │ Inventory │
│ Service │ │ Service │ │ Service │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
│ OrderCreated │ │
│─────────────────►│ │
│ │ PaymentProcessed │
│ │─────────────────►│
│