$npx -y skills add vercel/workflow --skill workflow-initInstall and configure Vercel Workflow SDK before it exists in node_modules. Use when the user asks to "install workflow", "set up workflow", "add durable workflows", "configure workflow sdk", or "init workflow" for Next.js, Express, Hono, Fastify, NestJS, Nitro, Nuxt, Astro, Svel
| 1 | # workflow-init |
| 2 | |
| 3 | Initial setup of Vercel Workflow SDK **before** `workflow` is installed. Fetch the official getting-started guide for the user's framework. |
| 4 | |
| 5 | ## Decision Flow |
| 6 | |
| 7 | ### 0) Sanity check |
| 8 | Read `package.json`. If `workflow` is already a dependency, tell the user to use `/workflow` instead (it reads versioned docs from `node_modules/workflow/docs/`). Only continue if workflow is missing. |
| 9 | |
| 10 | ### 1) Determine the framework |
| 11 | **Non-interactive:** If the user named a framework in their prompt, use it directly. |
| 12 | |
| 13 | **Auto-detect:** Inspect `package.json` deps and config files. Use the first match: |
| 14 | |
| 15 | 1. **Next.js** - `next` dep or `next.config.*` |
| 16 | 2. **Nuxt** - `nuxt` dep or `nuxt.config.*` |
| 17 | 3. **SvelteKit** - `@sveltejs/kit` dep or `svelte.config.*` |
| 18 | 4. **Astro** - `astro` dep or `astro.config.*` |
| 19 | 5. **NestJS** - `@nestjs/core` dep or `nest-cli.json` |
| 20 | 6. **Nitro** - `nitro` dep or `nitro.config.*` |
| 21 | 7. **Express** - `express` dep |
| 22 | 8. **Fastify** - `fastify` dep |
| 23 | 9. **Hono** - `hono` dep |
| 24 | 10. **Vite** - `vite` dep (and not matched above) |
| 25 | |
| 26 | If no match or multiple matches, ask the user to pick. |
| 27 | |
| 28 | ### 2) Fetch and follow the getting-started guide |
| 29 | Fetch **exactly one** of these URLs and follow the guide step-by-step: |
| 30 | |
| 31 | | Framework | URL | |
| 32 | |-----------|-----| |
| 33 | | Next.js | https://workflow-sdk.dev/docs/getting-started/next | |
| 34 | | Express | https://workflow-sdk.dev/docs/getting-started/express | |
| 35 | | Hono | https://workflow-sdk.dev/docs/getting-started/hono | |
| 36 | | Fastify | https://workflow-sdk.dev/docs/getting-started/fastify | |
| 37 | | NestJS | https://workflow-sdk.dev/docs/getting-started/nestjs | |
| 38 | | Nitro | https://workflow-sdk.dev/docs/getting-started/nitro | |
| 39 | | Nuxt | https://workflow-sdk.dev/docs/getting-started/nuxt | |
| 40 | | Astro | https://workflow-sdk.dev/docs/getting-started/astro | |
| 41 | | SvelteKit | https://workflow-sdk.dev/docs/getting-started/sveltekit | |
| 42 | | Vite | https://workflow-sdk.dev/docs/getting-started/vite | |
| 43 | |
| 44 | Each guide covers: install deps, configure framework, create first workflow, create route handler, run + verify. |
| 45 | |
| 46 | ### 3) Verify setup |
| 47 | - Start the dev server per the guide. |
| 48 | - Trigger the example endpoint with the provided `curl`. |
| 49 | - Confirm logs show the workflow and steps executing. |
| 50 | - Optional: `npx workflow web` or `npx workflow inspect runs`. |
| 51 | |
| 52 | ### 4) No framework yet? |
| 53 | If no framework exists, ask what the user wants: |
| 54 | - **Web app**: Next.js / Nuxt / SvelteKit / Astro |
| 55 | - **API server**: Express / Fastify / Hono |
| 56 | - **Minimal server**: Nitro or Vite |
| 57 | |
| 58 | Then follow the "Create Your Project" section of the chosen guide. |
| 59 | |
| 60 | ## Concept questions (pre-install) |
| 61 | If the user asks conceptual questions before installing, fetch: |
| 62 | - https://workflow-sdk.dev/docs/foundations/workflows-and-steps |
| 63 | - https://workflow-sdk.dev/cookbook |
| 64 | |
| 65 | ## Handoff |
| 66 | When setup is complete, tell the user: **Use `/workflow` for ongoing development** - it reads the versioned docs bundled in `node_modules/workflow/docs/`. |