Workflow is a TypeScript SDK for building applications and AI agents whose work can continue reliably across steps and be observed while running. It is for developers creating durable workflows and orchestration logic for applications or agents. The catalogue add-ons provide workflows, rules, instructions, settings, commands, and agents for using the SDK.
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.
npx skills add vercel/workflow --skill migrating-to-workflow-sdkgit clone --depth 1 https://github.com/vercel/workflowWrote 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.
[](https://agentmods.dev/skills/vercel/workflow/migrating-to-workflow-sdk)<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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00107 | $0.02406 |
| Opus 5.5 | $0.00043 | $0.00962 |
| Sonnet 5.5 | $0.00021 | $0.00481 |
| Haiku 4.5 | $0.00011 | $0.00241 |
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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 185 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
- Identify the source system:
- Temporal
- Inngest -> if you can run commands in the project, run
npx workflow migrate inngest --report inngest-migration.mdfirst (seereferences/inngest.md->## Start with the codemod), then migrate only what it markedTODO(workflow-migrate)and the app-boundary calls its report lists - Trigger.dev
- AWS Step Functions
- Identify the target runtime:
- Managed hosting -> keep examples focused on
start(),getRun(), hooks/webhooks, and route handlers. - Self-hosted -> also read
references/runtime-targets.mdand explicitly say the workflow/step code can stay the same, but deployment still needs aWorldimplementation and startup bootstrap.
- Managed hosting -> keep examples focused on
- 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 default202 Acceptedresponse 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/defaultand make the assumption explicit in## Open Questions.
- Never pair
createWebhook()withresumeHook(), and never passtoken:tocreateWebhook(). - Call
start()directly in the workflow for child runs, keep the returnedRun, andawait run.returnValuefor the result. CallgetRun()only inside a"use step"function. - When
step.run()-style closures become"use step"functions, pass every variable the closure read from the enclosing function as an argument. A closure that assigns to such a variable must return the new value instead. - For duplicate-start protection (Inngest
idempotency, Trigger.devidempotencyKey, Temporal workflow IDs), usestart(wf, args, { hook: { token } }). - Use
getStepMetadata().stepIdas 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:
- If the prompt explicitly asks for framework-agnostic app-boundary code, use plain
Request/Responseeven when a framework like Hono is named. - Otherwise, if the target framework is named, shape app-boundary examples to that framework.
- Otherwise, keep examples framework-agnostic with
Request/Response. Do not default to Next.js-only route signatures unless Next.js is explicitly named.
- If the prompt explicitly asks for framework-agnostic app-boundary code, use plain
What ships with it
15 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- evals/aws-task-token-parallel.md 1.3 KB
- evals/callback-url-default-response.md 835 B
- evals/inngest-step-run-captures.md 1.6 KB
- evals/inngest-timeout-streaming.md 1.1 KB
- evals/non-vercel-runtime-branch.md 1.4 KB
- evals/README.md 2.6 KB
- evals/temporal-signal-child-run.md 1.2 KB
- references/aws-step-functions.md 9.3 KB
- references/inngest.md 11 KB
- references/resume-routing.md 5.1 KB
- references/retries.md 4.9 KB
- references/runtime-targets.md 4.0 KB
- references/shared-patterns.md 16 KB
- references/temporal.md 4.5 KB
- references/trigger-dev.md 5.0 KB
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.
- 3d ago Changed adbb21dd3e1e
- 19d ago Changed · +7 lines · +26 tokens per session 752d2eb19f4c
- 3mo ago First seen · 178 lines · 81 tokens per session scan A c0cf6ea1e173
migrating-to-workflow-sdk is a skill published in the GitHub repository vercel/workflow (2,556 stars, last pushed yesterday), licensed Apache-2.0. It adds 107 tokens to every session and 2,406 once invoked, about $0.0004 per session on Opus 5.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.
migrating-to-workflow-sdk compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| migrating-to-workflow-sdkvercel/workflow | Skill | 2.6k | yesterday | Apache-2.0 | A | 107 | Claude Code, Codex |
| trigger-convextriggerdotdev/trigger.dev | Skill | 17k | yesterday | Apache-2.0 | A | 93 | Claude Code, Codex |
| trigger-authoring-taskstriggerdotdev/trigger.dev | Skill | 17k | yesterday | Apache-2.0 | A | 115 | Claude Code, Codex |
| trigger-realtime-and-frontendtriggerdotdev/trigger.dev | Skill | 17k | yesterday | Apache-2.0 | A | 148 | Claude Code, Codex |
| cloud-native-serverless-orchestrationj4flmao/agent-skills | Skill | 48 | 19d ago | MIT | A | 92 | Claude Code, Codex |
| trigger-getting-startedtriggerdotdev/trigger.dev | Skill | 17k | yesterday | Apache-2.0 | A | 142 | Claude Code, Codex |
| trigger-authoring-chat-agenttriggerdotdev/trigger.dev | Skill | 17k | yesterday | Apache-2.0 | A | 133 | Claude Code, Codex |