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 agentmods add skills/vercel/workflow/migrating-to-workflow-sdknpx 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.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00081 | $0.02062 |
| Opus 5 | $0.00041 | $0.01031 |
| Sonnet 5 | $0.00016 | $0.00412 |
| Haiku 4.5 | $0.00008 | $0.00206 |
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.
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
- Identify the source system:
- Temporal
- Inngest
- 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(). - Wrap
start()andgetRun()inside"use step"functions for child runs. - 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
14 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-timeout-streaming.md 1.1 KB
- evals/non-vercel-runtime-branch.md 1.1 KB
- evals/README.md 2.3 KB
- evals/temporal-signal-child-run.md 1.2 KB
- references/aws-step-functions.md 8.0 KB
- references/inngest.md 2.3 KB
- references/resume-routing.md 4.6 KB
- references/retries.md 4.4 KB
- references/runtime-targets.md 3.8 KB
- references/shared-patterns.md 9.9 KB
- references/temporal.md 2.8 KB
- references/trigger-dev.md 3.8 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.
- 4d 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,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.
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…
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-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…
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…
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.
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…