migrating-to-workflow-sdk

migrating-to-workflow-sdk is a skill for Claude Code, Codex from vercel/workflow. It costs 81 tokens per session (2,062 once invoked), scanned A, original, Apache-2.0.

A migration guide for moving workflow code from Temporal, Inngest, Trigger.dev, or AWS Step Functions to the Workflow SDK. It covers how common workflow features map to the new system.

In plain words
What is it for?
Use it when converting workflow definitions, activities, workers, tasks, state machines, timers, approvals, or task-token flows to the Workflow SDK.
Why use it?
It helps developers replace an existing workflow system without overlooking waits, retries, callbacks, child workflows, or external actions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/vercel/workflow/migrating-to-workflow-sdk
Any agent
npx skills add vercel/workflow --skill migrating-to-workflow-sdk
Clone the repo
git clone --depth 1 https://github.com/vercel/workflow

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrating-to-workflow-sdk

README.md
[![agentmods](https://agentmods.dev/badge/skills/vercel/workflow/migrating-to-workflow-sdk.svg)](https://agentmods.dev/skills/vercel/workflow/migrating-to-workflow-sdk)
Your own site
<a href="https://agentmods.dev/skills/vercel/workflow/migrating-to-workflow-sdk"><img src="https://agentmods.dev/badge/skills/vercel/workflow/migrating-to-workflow-sdk.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,062 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00081 $0.02062
Opus 5 $0.00041 $0.01031
Sonnet 5 $0.00016 $0.00412
Haiku 4.5 $0.00008 $0.00206

Measured 4d ago against content hash c0cf6ea1e173, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrating-to-workflow-sdk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/migrating-to-workflow-sdk/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.
  • Never pair createWebhook() with resumeHook(), and never pass token: to createWebhook().
  • Wrap start() and getRun() inside "use step" functions for child runs.
  • Use getStepMetadata().stepId as the idempotency key for external writes.
  • Use getWritable() in workflow context to obtain the stream, but interact with it (write, close) only inside "use step" functions.
  • Prefer rollback stacks for multi-step compensation.
  • Choose app-boundary syntax in this order:
    1. If the prompt explicitly asks for framework-agnostic app-boundary code, use plain Request / Response even when a framework like Hono is named.
    2. Otherwise, if the target framework is named, shape app-boundary examples to that framework.
    3. Otherwise, keep examples framework-agnostic with Request / Response. Do not default to Next.js-only route signatures unless Next.js is explicitly named.

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 178 lines · 81 tokens per session scan A c0cf6ea1e173

Subscribe to this mod's changes

migrating-to-workflow-sdk is a skill published in the GitHub repository vercel/workflow (2,373 stars, last pushed today), licensed Apache-2.0. It adds 81 tokens to every session and 2,062 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

drizzle

Use this skill when writing or modifying Drizzle ORM schemas, queries, or migrations in this repo — specifically the @internal/dashboard-agent-db package (the dashboard agent's conversation datastore). Covers pg-core schema definition, the postgres-js driver, drizzle-kit migrations, and this repo's conventions: a…

triggerdotdev/trigger.dev · 0 tokens

trigger-getting-started

Bootstrap Trigger.dev into an existing project from scratch: authenticate the CLI, install @trigger.dev/sdk and @trigger.dev/build, write trigger.config.ts with the project ref and task dirs, scaffold a /trigger directory with a first task, wire tsconfig and .gitignore, set TRIGGERSECRETKEY, and run the dev server.…

triggerdotdev/trigger.dev · 142 tokens

trigger-dev-tasks

Use this skill when writing, designing, or optimizing Trigger.dev background tasks and workflows. This includes creating reliable async tasks, implementing AI workflows, setting up scheduled jobs, structuring complex task hierarchies with subtasks, configuring build extensions for tools like ffmpeg or…

triggerdotdev/trigger.dev · 73 tokens

trigger-chat-agent-advanced

Advanced and operational chat.agent capabilities for Trigger.dev, loaded on demand. Load this when working on the raw Sessions primitive (sessions / SessionHandle), a custom chat transport or the realtime wire protocol, durable sub-agents (AgentChat, chat.stream.writer), human-in-the-loop, steering, actions…

triggerdotdev/trigger.dev · 154 tokens

span-timeline-events

Use when adding, modifying, or debugging OTel span timeline events in the trace view. Covers event structure, ClickHouse storage constraints, rendering in SpanTimeline component, admin visibility, and the step-by-step process for adding new events.

triggerdotdev/trigger.dev · 52 tokens

trigger-authoring-chat-agent

Author and run a durable AI chat agent with chat.agent from @trigger.dev/sdk/ai: the per-turn run loop, why you MUST spread ...chat.toStreamTextOptions() first, returning a StreamTextResult vs calling chat.pipe(), the two server actions (chat.createStartSessionAction + auth.createPublicToken), and wiring useChat to…

triggerdotdev/trigger.dev · 129 tokens