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-workflow-v4-to-v5git 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-workflow-v4-to-v5)<a href="https://agentmods.dev/skills/vercel/workflow/migrating-workflow-v4-to-v5"><img src="https://agentmods.dev/badge/skills/vercel/workflow/migrating-workflow-v4-to-v5.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 214 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
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.00161 | $0.04596 |
| Opus 5 | $0.00081 | $0.02298 |
| Sonnet 5 | $0.00032 | $0.00919 |
| Haiku 4.5 | $0.00016 | $0.00460 |
Grade A, and why
migrating-workflow-v4-to-v5 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 8d 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 — 287 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrating Workflow SDK 4.x to 5.0
Workflow SDK 5.0 keeps the programming model from 4.x. "use workflow" / "use step", start(), getRun(), hooks, webhooks, streams, sleep(), retries, and the event log are unchanged, so most application code compiles as-is.
The breaking changes are concentrated in three places:
- Runtime entrypoints (
workflow/api,workflow/runtime) — two exports removed. - The
Worldinterface — only relevant if the app implements a custom World or callsgetWorld()directly. - Build integrations —
@workflow/nestsubpaths, and private compiler subpaths that were never public.
Do not rewrite workflow or step bodies. If you find yourself restructuring business logic, you have gone outside this migration.
Intake
Before editing, establish:
- Which packages are installed. Read
package.jsonforworkflowand every@workflow/*dependency. - Whether the app touches the runtime. Grep for
getWorld,createWorld,getWorldHandlers,writeToStream,readFromStream,closeStream,listStreamsByRunId,getStreamChunks,world.steps,listByCorrelationId,runStep,stepEntrypoint,internal/private,core/private. - Whether the app implements a custom World. Grep for
implements World,: World,createLocalWorld,createVercelWorld,startWorkflowWorld. - Which framework integration is in use.
@workflow/next,@workflow/nest,@workflow/nitro,@workflow/sveltekit,@workflow/vite,@workflow/nuxt,@workflow/astro, or the CLI. - Whether
hook.getConflict()is used. Grep forgetConflict. - Whether the app calls the compiler directly. Grep for
mode: 'client',transformSync,swc-plugin-workflow. Only custom build integrations do this. - Whether
experimental_setAttributesis used. Grep forexperimental_setAttributes.
Report anything in 2–7 that the app does not use as "not applicable" rather than silently skipping it.
Step 1 — bump the dependencies
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.
- 8d ago First seen · 287 lines · 161 tokens per session scan A 60a4f8ec5cae
migrating-workflow-v4-to-v5 is a skill published in the GitHub repository vercel/workflow (2,378 stars, last pushed 2d ago), licensed Apache-2.0. It adds 161 tokens to every session and 4,596 once invoked, about $0.0008 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.
Other skills, from other repositories
trigger-authoring-tasks
Covers writing backend Trigger.dev tasks with @trigger.dev/sdk: defining task() and schemaTask(), the run function and its ctx, retries, waits, queues and concurrency, idempotency keys, run metadata, logging, triggering other tasks (and the Result shape), scheduled/cron tasks, and the essentials of trigger.config.ts.…
trigger-realtime-and-frontend
Trigger.dev client/frontend surface: subscribe to runs in realtime (runs.subscribeToRun and the @trigger.dev/react-hooks hook useRealtimeRun), consume metadata and AI/text streams in React (useRealtimeStream), trigger tasks from the browser (useTaskTrigger, useRealtimeTaskTrigger), and mint scoped frontend credentials…
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.…
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…
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…
trigger-cost-savings
Analyze Trigger.dev tasks, schedules, and runs for cost optimization opportunities. Use when asked to reduce spend, optimize costs, audit usage, right-size machines, or review task efficiency. Combines static source analysis with live run analysis via the Trigger.dev MCP tools (listruns, getrundetails…