cloudflare-workflows

Orchestrate durable multi-step workflows on Cloudflare Workers with retries and state persistence.

961|99|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-workflows
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-workflows
Source: https://github.com/jezweb/claude-skills/tree/main/skills/cloudflare-workflows
Command: npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-workflows

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires wrangler, @cloudflare/workers-types, typescript, and includes references (resource) components.

What problem does it solve?

This Skill eliminates the complexity of building reliable long-running processes, handling retries, state persistence, and external events so you can focus on business logic.

Core Features & Use Cases

  • Automatic Retries: Failed steps automatically retry with configurable exponential backoff.
  • State Persistence: Workflow state automatically persists between steps and survives failures.
  • Event-Driven Workflows: Wait for external events like webhooks, approvals, or user actions.
  • Use Case: Imagine you need to process payments with automatic retry logic, wait for confirmation webhooks, and handle timeouts gracefully.

Quick Start

Create a workflow that fetches data from an API, waits 1 hour, then continues processing.

Frequently Asked Questions about cloudflare-workflows

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

FAQPage Schema
How do I build long-running workflows that survive failures in Cloudflare Workers?

Long-running workflows in Cloudflare Workers use durable execution to persist state between steps, automatically retry failed operations with exponential backoff, and continue processing after interruptions. This Skill provides step.do, step.sleep, and event-driven waits to orchestrate multi-step tasks lasting hours to days without losing progress.

Can I wait for external events like webhooks in a Cloudflare Workers workflow?

Yes. Event-driven workflows let you pause execution and wait for external events—webhooks, approvals, user actions—using step.waitForEvent. The workflow persists its state until the event arrives, then resumes automatically, eliminating polling loops and timeout complexity.

What's the best way to handle retries and timeouts in multi-step task orchestration?

Durable workflows apply automatic retries with configurable exponential backoff to failed steps while preserving state between attempts. You can schedule delays with step.sleep and step.sleepUntil, set timeouts, and raise NonRetryableError to stop retrying—all without manual retry logic in your code.

How do I deploy and test workflows with wrangler and TypeScript?

Use wrangler to deploy workflows written in TypeScript with @cloudflare/workers-types and WorkflowEntrypoint integration. Wrangler handles local testing and deployment patterns; ensure all step returns are JSON-serializable to satisfy durable execution constraints.

Does this work for cross-API coordination and payment processing?

Yes. This Skill handles cross-API coordination by orchestrating multiple dependent API calls with retries and state persistence. Common use cases include payment processing with automatic retry logic, waiting for confirmation webhooks, and gracefully handling timeouts across distributed systems.

What are the limitations of durable workflows in Cloudflare Workers?

Step return values must be JSON-serializable; complex objects require custom serialization. Workflows run within Cloudflare Workers' resource constraints and timeout windows. NonRetryableError prevents retries for specific failures, but you must explicitly handle edge cases in business logic.