saga-orchestration
Design saga workflows for distributed services
Distributed workflows fail when steps do not coordinate or roll back cleanly. This skill provides clear saga patterns and templates to orchestrate steps and compensations for reliable multi-service transactions.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "saga-orchestration". Design an order fulfillment saga with compensations and timeouts.
Expected outcome:
- Steps: reserve inventory, process payment, create shipment, send confirmation.
- Compensations: release inventory, refund payment, cancel shipment.
- Timeout policy: fail step after 5 minutes and start compensation.
- Events: SagaStepCompleted, SagaStepFailed, SagaCompensationCompleted.
Using "saga-orchestration". Compare orchestration and choreography for payment processing.
Expected outcome:
- Orchestration: central orchestrator sends commands, receives responses.
- Choreography: services emit events, others subscribe and react.
- Orchestration benefits: explicit flow, easier debugging, clear ownership.
- Choreography benefits: loose coupling, no single point of failure.
Using "saga-orchestration". How do I handle a saga step that never completes?
Expected outcome:
- Implement per-step timeouts in the orchestrator.
- On timeout, mark step as failed and trigger compensation.
- Use scheduled tasks to check step status periodically.
- Log timeout events for monitoring and alerting.
Security Audit
SafePure documentation skill containing code templates for saga pattern implementation. Contains no executable code, filesystem access, network calls, or command execution. All static findings are false positives triggered by documentation text containing technical terminology that scanners incorrectly flag as cryptographic terms, C2 indicators, or shell commands.
Risk Factors
🌐 Network access (3)
Quality Score
What You Can Build
Order fulfillment flow
Design a multi service order workflow with compensation steps and failure handling.
Long running approvals
Model approval workflows with timeouts and rollback behavior.
Saga pattern review
Align teams on orchestration versus choreography tradeoffs.
Try These Prompts
Design a saga orchestration for checkout with inventory, payment, and shipping steps. Include compensations and state transitions.
Extend a saga orchestrator with per step timeouts and failure handling. Describe how timeouts trigger compensation.
Provide a choreography based saga for order processing and list event names and handlers.
Draft a saga plan for a multi stage onboarding flow with retries, compensations, and audit logging guidance.
Best Practices
- Make steps idempotent for safe retries
- Design compensations for every irreversible action
- Use correlation IDs for cross service tracing
Avoid
- Assume steps complete instantly
- Skip compensation testing
- Tightly couple services with direct calls
Frequently Asked Questions
Is this compatible with Claude, Codex, and Claude Code?
What are the limits of this skill?
How do I integrate with my message bus?
Does this skill access my data or secrets?
What should I check if steps never complete?
How does this compare to choreography only?
Developer Details
Author
wshobsonLicense
MIT
Repository
https://github.com/wshobson/agents/tree/main/plugins/backend-development/skills/saga-orchestrationRef
main
File structure
📄 SKILL.md