migrating-workflow-v4-to-v5

migrating-workflow-v4-to-v5 is a skill for Claude Code, Codex from vercel/workflow. It costs 161 tokens per session (4,596 once invoked), scanned A, original, Apache-2.0.

A migration guide for upgrading an application from Vercel Workflow SDK 4.x to version 5. It focuses on changed runtime entry points, the World interface used for custom runtime behavior, and build integrations.

In plain words
What is it for?
Use it when upgrading workflow packages to v5 or fixing code that still uses removed v4 APIs such as runStep, private imports, or older World stream and step methods.
Why use it?
It identifies removed or changed APIs and limits edits to the parts that actually need updating. Most workflow and step code can remain unchanged because the main programming model is preserved.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one.

Good fit Use it when upgrading workflow packages to v5 or fixing code that still uses removed v4 APIs such as runStep, private imports, or older World stream and step methods.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vercel/workflow/migrating-workflow-v4-to-v5
About the project

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.

vercel/workflow · 2,378 stars · on GitHub · workflow-sdk.dev

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.

Any agent
npx skills add vercel/workflow --skill migrating-workflow-v4-to-v5
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-workflow-v4-to-v5

README.md
[![agentmods](https://agentmods.dev/badge/skills/vercel/workflow/migrating-workflow-v4-to-v5.svg)](https://agentmods.dev/skills/vercel/workflow/migrating-workflow-v4-to-v5)
Your own site
<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>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,596 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
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]
How audits are shown
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.1 $0.00161 $0.04596
Opus 5 $0.00081 $0.02298
Sonnet 5 $0.00032 $0.00919
Haiku 4.5 $0.00016 $0.00460

Measured 8d ago against content hash 60a4f8ec5cae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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.

skills/migrating-workflow-v4-to-v5/SKILL.md · 287 lines

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:

  1. Runtime entrypoints (workflow/api, workflow/runtime) — two exports removed.
  2. The World interface — only relevant if the app implements a custom World or calls getWorld() directly.
  3. Build integrations@workflow/nest subpaths, 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:

  1. Which packages are installed. Read package.json for workflow and every @workflow/* dependency.
  2. 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.
  3. Whether the app implements a custom World. Grep for implements World, : World, createLocalWorld, createVercelWorld, startWorkflowWorld.
  4. Which framework integration is in use. @workflow/next, @workflow/nest, @workflow/nitro, @workflow/sveltekit, @workflow/vite, @workflow/nuxt, @workflow/astro, or the CLI.
  5. Whether hook.getConflict() is used. Grep for getConflict.
  6. Whether the app calls the compiler directly. Grep for mode: 'client', transformSync, swc-plugin-workflow. Only custom build integrations do this.
  7. Whether experimental_setAttributes is used. Grep for experimental_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

Read the full file on GitHub · 287 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. 8d ago First seen · 287 lines · 161 tokens per session scan A 60a4f8ec5cae

Subscribe to this mod's changes

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.

Related

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.…

triggerdotdev/trigger.dev · 115 tokens

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…

triggerdotdev/trigger.dev · 148 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-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

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

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…

triggerdotdev/trigger.dev · 68 tokens