golem-add-transactions-ts

Coordinate multi-step TypeScript transactions with saga compensation and rollback logic.

1|Updated Oct 9, 2025
One-click install
npx skills add https://github.com/justcoon/golem-shopping-ts --skill golem-add-transactions-ts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-add-transactions-ts
Source: https://github.com/justcoon/golem-shopping-ts/tree/main/.agents/skills/golem-add-transactions-ts
Command: npx skills add https://github.com/justcoon/golem-shopping-ts --skill golem-add-transactions-ts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @golemcloud/golem-ts-sdk, and includes scripts (resource) components.

What problem does it solve?

This Skill enables the implementation of multi-step transactions in TypeScript applications using the saga pattern, ensuring reliable execution and compensation for complex workflows.

Core Features & Use Cases

  • Defining Atomic Operations: Create asynchronous execute and compensate functions for each step.
  • Transaction Management: Perform fallible and infallible multi-step transactions that handle failures automatically.
  • Use Case: Use this Skill to coordinate online order processing where each step (inventory reservation, payment) can be rolled back if subsequent steps fail.

Quick Start

Describe how to set up saga transactions in a TypeScript environment, including defining operations, and executing transactions with error handling.

Frequently Asked Questions about golem-add-transactions-ts

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

FAQPage Schema
How do I implement saga pattern transactions with rollback logic in TypeScript?

Saga pattern transactions in TypeScript are implemented by defining asynchronous execute and compensate functions for each step, allowing automatic rollback if subsequent steps fail. This Skill manages multi-step transaction coordination with undo logic for distributed systems.

How does compensation logic work in distributed systems error handling?

Compensation logic in distributed systems works by executing undo functions for completed steps when a subsequent step fails. This saga pattern approach ensures reliable multi-step transaction coordination by automatically rolling back operations like inventory reservations or payments.

How do I manage multi-step transactions for order processing in TypeScript?

Multi-step transactions for order processing in TypeScript are managed by coordinating sequential operations such as inventory reservation and payment, with automatic rollback triggered if any step fails. This Skill supports both fallible and infallible execution modes for robust workflow management.

Do I need @golemcloud/golem-ts-sdk to use saga transactions in TypeScript?

Yes, the @golemcloud/golem-ts-sdk dependency is required to use these saga transactions in TypeScript, as it provides the core transaction functions needed for executing and compensating multi-step operations in distributed systems and microservices architectures.

What is the difference between fallible and infallible transaction execution modes?

Fallible and infallible transaction execution modes distinguish how multi-step transactions handle failures in distributed systems. Fallible execution anticipates potential errors and triggers compensation logic, while infallible execution assumes operations complete successfully without requiring rollback.

When should I use saga pattern transactions instead of standard transactions in microservices?

Saga pattern transactions should be used instead of standard transactions in microservices when workflows involve multiple distributed steps requiring individual rollback capabilities. This approach handles complex processes like order fulfillment where compensating failed operations ensures data consistency.