effect-workflow

Build restart-safe durable workflows with Effect's unstable workflow module.

22|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-workflow
Source: https://github.com/mpsuesser/pi-effect-harness/tree/main/harnesses/effect/skills/effect-workflow
Command: npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design durable, restart-safe workflows in TypeScript so side effects run reliably, results persist across replays, and long-running steps can wait for external signals.

Core Features & Use Cases

  • Durable workflow execution: Define workflows with typed payloads and deterministic idempotency so repeated executions resume instead of duplicating work.
  • Atomic side effects via activities: Model external calls as activities whose results are persisted, making replay safe and predictable.
  • Saga-style compensation: Add rollback logic using Workflow.withCompensation to implement compensation for distributed failures.
  • External event & timers: Use DurableDeferred to wait for durable signals and DurableClock for restart-safe sleep.
  • Cluster-friendly execution: Integrate with ClusterWorkflowEngine.layer for distributed durability.

Quick Start

Ask the assistant to implement a durable order-processing workflow that validates input, reserves inventory with compensation, waits for a payment confirmation signal, sleeps before shipping, and then executes shipping as an activity using Effect’s unstable workflow APIs.

Frequently Asked Questions about effect-workflow

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

FAQPage Schema
How do I build durable workflows in TypeScript that survive process restarts?

Durable workflows in TypeScript survive process restarts by persisting side effects and execution state, ensuring repeated executions resume instead of duplicating work. You define typed payloads and model external calls as persisted activities for deterministic idempotency.

What is saga compensation and how does it handle distributed failures?

Saga compensation handles distributed failures by adding rollback logic to workflows, ensuring that partially completed operations are safely reversed. You define rollback activities using `Workflow.withCompensation` to manage distributed transaction failures effectively.

How do I wait for external signals in a long-running workflow without blocking execution?

Waiting for external signals in long-running workflows requires durable deferreds that pause execution safely until a signal arrives. Using `DurableDeferred`, your workflow can wait for external events while maintaining restart safety and persisted state.

Can I run Effect workflows in a distributed cluster environment?

Effect workflows can run in a distributed cluster environment using the `ClusterWorkflowEngine.layer`. This integration provides distributed durability, ensuring your saga-style orchestration and persisted side effects coordinate reliably across multiple cluster nodes.

How do I implement restart-safe timers and sleep delays in a durable saga?

Restart-safe timers and sleep delays in durable sagas require a durable clock that persists time-based waits across process restarts. Using `DurableClock`, your workflow can sleep for specified durations while maintaining deterministic idempotency and reliable execution state.