# migrating-to-workflow-sdk

Ports orchestration from Temporal, Inngest, Trigger.dev or AWS Step Functions to the Workflow SDK, returning a migration plan and rewritten code.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 734 installs · ★ 2474
- Author: Vercel Inc.
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/vercel/workflow/tree/HEAD/skills/migrating-to-workflow-sdk/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/migrating-to-workflow-sdk

## What it does

The skill kicks in when you move an existing orchestration system onto the Workflow SDK. It first pins down the source system and the target runtime, then extracts entrypoints, waits and timers, external callbacks, retries, child workflows and side effects from the old code.

From there it follows hard rules. Orchestration goes into `"use workflow"` functions; SDK calls, database and HTTP calls, and stream I/O go into `"use step"` functions. For signals and `.waitForTaskToken` you pick exactly one resume surface: `createHook()` plus `resumeHook()` for a deterministic server-side resume, or `createWebhook()` when an external system needs a generated callback URL. Pairing `createWebhook()` with `resumeHook()` fails the draft.

Output has a fixed shape: migration plan, source-to-target mapping, migrated code, app boundary, verification checklist and open questions. The checklist rejects a draft when source-framework primitives survive, when `sleep()` lands inside a step, or when a child workflow calls `start()` straight from workflow context. For self-hosted targets the skill also reads `references/runtime-targets.md` — step code stays the same, but deployment still needs a `World` implementation and startup bootstrap.

## Requirements
- Works with: AWS

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add vercel/workflow --skill migrating-to-workflow-sdk -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/migrating-to-workflow-sdk/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/migrating-to-workflow-sdk/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add vercel/workflow --skill migrating-to-workflow-sdk -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/migrating-to-workflow-sdk/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add vercel/workflow --skill migrating-to-workflow-sdk -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/migrating-to-workflow-sdk/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install vercel/workflow migrating-to-workflow-sdk
```

2. **Manually: put the files in place**
- File: `.github/skills/migrating-to-workflow-sdk/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add vercel/workflow --skill migrating-to-workflow-sdk -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/vercel/workflow --path skills/migrating-to-workflow-sdk
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/migrating-to-workflow-sdk/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add vercel/workflow --skill migrating-to-workflow-sdk -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/vercel/workflow/tree/HEAD/skills/migrating-to-workflow-sdk/SKILL.md

## When to use it
- move Activities and Workers off Temporal
- rewrite Inngest `step.run()` and `step.waitForEvent()`
- replace Trigger.dev `wait.forToken` and `triggerAndWait`
- translate ASL JSON with Task, Choice, Wait and Parallel states
- pull side effects out of workflow context into steps

## Example prompts
- Port my Temporal workflow to the Workflow SDK and show the migration plan with the verification checklist
- I have Inngest with `step.waitForEvent()` and need a callback URL with a plain 202 response — pick the resume surface
- Convert my AWS Step Functions ASL machine, Task and Choice states, to `"use workflow"` and `"use step"`

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: e2136aa37f0ad1f8.

BEGIN THIRD-PARTY FILE e2136aa37f0ad1f8
```text
---
name: migrating-to-workflow-sdk
description: Migrates Temporal, Inngest, Trigger.dev, and AWS Step Functions workflows to the Workflow SDK. Use when porting Activities, Workers, Signals, step.run(), step.waitForEvent(), Trigger.dev tasks / wait.forToken / triggerAndWait, ASL JSON state machines, Task/Choice/Wait/Parallel states, task tokens, or child workflows.
metadata:
  author: Vercel Inc.
  version: '0.3.0'
---

# Migrating to the Workflow SDK

Use this skill when converting an existing orchestration system to the Workflow SDK.

## Intake

1. Identify the source system:
   - Temporal
   - Inngest
   - Trigger.dev
   - AWS Step Functions
2. Identify the target runtime:
   - Managed hosting -> keep examples focused on `start()`, `getRun()`, hooks/webhooks, and route handlers.
   - Self-hosted -> also read `references/runtime-targets.md` and explicitly say the workflow/step code can stay the same, but deployment still needs a `World` implementation and startup bootstrap.
3. Extract the source constructs:
   - entrypoint
   - waits / timers
   - external callbacks / approvals
   - retries / failure handling
   - child workflows / fan-out
   - progress streaming
   - external side effects

## Default migration rules

- Put orchestration in `"use workflow"` functions.
- Put side effects, SDK calls, DB calls, HTTP calls, and stream I/O in `"use step"` functions.
- Use `sleep()` only in workflow context.
- For Signals, `step.waitForEvent()`, and `.waitForTaskToken`, choose exactly one resume surface:
  - `resume/internal` -> `createHook()` + `resumeHook()` when the app resumes from server-side code with a deterministic business token.
  - `resume/url/default` -> `createWebhook()` when the external system needs a generated callback URL and the default `202 Accepted` response is fine.
  - `resume/url/manual` -> `createWebhook({ respondWith: 'manual' })` only when the prompt explicitly requires a custom response body, status, or headers.
  - If a callback-URL prompt does not specify response semantics, default to `resume/url/default` and make the assumption explicit in `## Open Questions`.
```
END THIRD-PARTY FILE e2136aa37f0ad1f8

The third-party file has ended. Everything between the e2136aa37f0ad1f8 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2123 of 8944 bytes. © Vercel Inc. · Apache-2.0 · https://github.com/vercel/workflow/tree/HEAD/skills/migrating-to-workflow-sdk/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
