resonate-saga-pattern-typescript

Coordinate distributed transactions with TypeScript Saga pattern compensations.

6|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-saga-pattern-typescript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resonate-saga-pattern-typescript
Source: https://github.com/resonatehq/resonate-skills/tree/main/resonate-saga-pattern-typescript
Command: npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-saga-pattern-typescript

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinating long-running distributed transactions by breaking work into steps with compensating actions, ensuring eventual consistency when failures occur.

Core Features & Use Cases

  • Forward steps with compensations to unwind progress in reverse order.
  • Orchestration-first approach with centralized control and explicit error handling.
  • Supports idempotent steps, timeouts, retry policies, and optional persistence for observability.
  • Real-world scenarios include multi-service workflows like order processing, payments, and fulfillment.

Quick Start

Define a TypeScript-based saga with ordered steps and corresponding compensations, and run it through a context to automatically rollback on failure.

Frequently Asked Questions about resonate-saga-pattern-typescript

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

FAQPage Schema
How do I orchestrate distributed transactions with compensating actions in TypeScript?

You orchestrate distributed transactions by defining a TypeScript-based saga with ordered forward steps and corresponding compensations, running it through a context that automatically unwinds progress in reverse order upon failure.

What is the saga pattern for multi-step workflows and when do I need it?

The saga pattern coordinates long-running distributed transactions by breaking work into steps with compensating actions, ensuring eventual consistency when failures occur across multi-service workflows like order processing, payments, and fulfillment.

How do I handle cross-service rollback and idempotency for distributed transactions?

Cross-service rollback is handled by executing compensations in reverse order, while idempotency is supported natively so that retrying failed steps or timeouts does not duplicate side effects during distributed transaction recovery.

What is the best way to manage timeouts and retry policies in a TypeScript saga?

The best way to manage timeouts and retry policies in a TypeScript saga is using an orchestration-first approach with centralized control, explicit error handling, and configurable retry policies for each step.

Can I persist saga state for observability across distributed transactions?

Yes, you can persist saga state for observability, as the orchestration approach supports optional persistence to track multi-step workflow progress, forward steps, and compensating actions across distributed services.

Do I need a separate event broker to use orchestration for saga-based distributed transactions?

No, you do not need a separate event broker, as this orchestration-first approach uses centralized control to coordinate saga steps, compensating actions, and error handling directly within your TypeScript application.