[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-vercel-ai-sdk":3,"mdc--pmvc1m-key":46,"related-repo-vercel-ai-sdk":653,"related-org-vercel-ai-sdk":742},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":41,"sourceUrl":44,"mdContent":45},"ai-sdk","build AI features with Vercel AI SDK","Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: \"AI SDK\", \"Vercel AI SDK\", \"generateText\", \"streamText\", \"add AI to my app\", \"build an agent\", \"tool calling\", \"structured output\", \"useChat\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"vercel","Vercel","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fvercel.png",[12,14,17,20],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"LLM","llm",{"name":18,"slug":19,"type":13},"Agents","agents",{"name":21,"slug":4,"type":13},"AI SDK",25670,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai","2026-04-06T18:55:48.739463",null,4816,[28,29,30,31,32,33,34,16,35,36,37,38,39,8,40],"anthropic","artificial-intelligence","gemini","generative-ai","generative-ui","javascript","language-model","nextjs","openai","react","svelte","typescript","vue",{"repoUrl":23,"stars":22,"forks":26,"topics":42,"description":43},[28,29,30,31,32,33,34,16,35,36,37,38,39,8,40],"The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents ","https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai\u002Ftree\u002FHEAD\u002Fskills\u002Fuse-ai-sdk","---\nname: ai-sdk\ndescription: 'Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: \"AI SDK\", \"Vercel AI SDK\", \"generateText\", \"streamText\", \"add AI to my app\", \"build an agent\", \"tool calling\", \"structured output\", \"useChat\".'\n---\n\n## What the AI SDK Is\n\nThe AI SDK by Vercel (the `ai` package on npm) is a TypeScript toolkit for building AI applications. It provides a unified API across model providers for text generation, structured output, tool calling, agents, embeddings, and framework UI integrations.\n\n- Repository: https:\u002F\u002Fgithub.com\u002Fvercel\u002Fai\n- Documentation: https:\u002F\u002Fai-sdk.dev\u002Fdocs\n\n## Critical: Do Not Trust Your Own Memory\n\nWhatever you remember about the AI SDK is likely outdated. The SDK changes frequently across versions - APIs are renamed, removed, and added. Your training data almost certainly contains obsolete APIs, deprecated patterns, and model IDs that no longer exist. UI hooks like `useChat` are among the most frequently changed APIs, so be especially careful with client code.\n\n**Never write AI SDK code from memory.** Always verify every API, option, and pattern against the documentation and source code for the version that is actually installed in the project.\n\n## Use the Bundled, Version-Matched Docs\n\nThe `ai` package ships its full documentation and source code inside `node_modules`. These always match the installed version, so trust them over anything you remember.\n\n1. Ensure `ai` is installed. If `node_modules\u002Fai\u002F` does not exist, install **only** the `ai` package using the project's package manager (e.g. `pnpm add ai`). Install provider packages (e.g. `@ai-sdk\u002Fopenai`) and framework packages (e.g. `@ai-sdk\u002Freact`) later, when the task requires them.\n2. Read and grep the bundled docs at `node_modules\u002Fai\u002Fdocs\u002F` and the source at `node_modules\u002Fai\u002Fsrc\u002F`.\n3. Provider and framework packages bundle their own docs at `node_modules\u002F@ai-sdk\u002F\u003Cname>\u002Fdocs\u002F`.\n4. If something isn't in the bundled docs, search https:\u002F\u002Fai-sdk.dev\u002Fdocs. You can append `.md` to any docs page URL to get its markdown, and search via `https:\u002F\u002Fai-sdk.dev\u002Fapi\u002Fsearch-docs?q=your_query`.\n5. If you cannot find support for an answer in the docs or source, say so explicitly — do not guess.\n\n## AI Gateway: The Fastest Way to Start\n\nThe Vercel AI Gateway is the fastest way to get started with the AI SDK. It provides access to models from OpenAI, Anthropic, Google, and other providers through a single API, without installing provider packages or managing multiple API keys.\n\nTo set it up:\n\n1. Authenticate with OIDC (for Vercel deployments) or get an AI Gateway API key.\n2. Provide it to your app via the `AI_GATEWAY_API_KEY` environment variable.\n3. Reference models with `provider\u002Fmodel` strings.\n\nFor exact setup, authentication, and usage, read the bundled guide and the AI Gateway docs.\n\n### Choosing a Model\n\nNever use model IDs from memory — models are released and retired frequently. Fetch the current list before writing code that references a model. Do not truncate the list (e.g. with `head`) so you can find the newest models:\n\n```bash\n# All available models\ncurl -s https:\u002F\u002Fai-gateway.vercel.sh\u002Fv1\u002Fmodels | jq -r '.data[].id'\n\n# Filter by provider (e.g. anthropic, openai, google)\ncurl -s https:\u002F\u002Fai-gateway.vercel.sh\u002Fv1\u002Fmodels | jq -r '[.data[] | select(.id | startswith(\"anthropic\u002F\")) | .id] | reverse | .[]'\n```\n\nWhen multiple versions of a model exist, prefer the one with the highest version number.\n\n## Building and Consuming Agents\n\nUse the SDK's built-in agent abstraction (such as `ToolLoopAgent`) rather than hand-rolling tool-calling loops. For end-to-end type safety, infer the UI message type from your agent definition when consuming it on the client (e.g. with `useChat`). Consuming an agent is framework-specific: check `package.json` to detect the stack, then follow the matching quickstart.\n\nLook up the current agent, tool, and type-safety APIs in the bundled docs (`node_modules\u002Fai\u002Fdocs\u002F`, especially the agents section) or at https:\u002F\u002Fai-sdk.dev\u002Fdocs.\n\n## DevTools\n\nAI SDK DevTools captures your AI SDK calls - requests, responses, tool calls, token usage, and multi-step runs - so you can inspect exactly what your agents do. Use it while developing to debug generations. It is a separate package and is intended for local development only.\n\nFor setup instructions, read the bundled DevTools documentation.\n\n## Keep the SDK Current\n\nOutdated installs are the most common source of errors. Compare the installed version against the latest:\n\n- **Installed:** the `version` field in `node_modules\u002Fai\u002Fpackage.json`.\n- **Latest:** run `npm view ai version`.\n\nIf the installed version is a major version (or more) behind the latest, tell the user they are on an old release, and recommend upgrading before continuing. Migration guides are at https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fmigration-guides.\n\n## After Making Changes\n\nRun the project's type checker. Be minimal — only set options that differ from the defaults, checking docs or source for the defaults rather than over-specifying. Most type errors come from remembered, now-changed APIs; re-check the current docs and source when they occur.\n",{"data":47,"body":48},{"name":4,"description":6},{"type":49,"children":50},"root",[51,60,75,103,109,122,133,139,159,286,292,297,302,336,341,348,361,496,501,507,535,553,559,564,569,575,580,624,636,642,647],{"type":52,"tag":53,"props":54,"children":56},"element","h2",{"id":55},"what-the-ai-sdk-is",[57],{"type":58,"value":59},"text","What the AI SDK Is",{"type":52,"tag":61,"props":62,"children":63},"p",{},[64,66,73],{"type":58,"value":65},"The AI SDK by Vercel (the ",{"type":52,"tag":67,"props":68,"children":70},"code",{"className":69},[],[71],{"type":58,"value":72},"ai",{"type":58,"value":74}," package on npm) is a TypeScript toolkit for building AI applications. It provides a unified API across model providers for text generation, structured output, tool calling, agents, embeddings, and framework UI integrations.",{"type":52,"tag":76,"props":77,"children":78},"ul",{},[79,92],{"type":52,"tag":80,"props":81,"children":82},"li",{},[83,85],{"type":58,"value":84},"Repository: ",{"type":52,"tag":86,"props":87,"children":90},"a",{"href":23,"rel":88},[89],"nofollow",[91],{"type":58,"value":23},{"type":52,"tag":80,"props":93,"children":94},{},[95,97],{"type":58,"value":96},"Documentation: ",{"type":52,"tag":86,"props":98,"children":101},{"href":99,"rel":100},"https:\u002F\u002Fai-sdk.dev\u002Fdocs",[89],[102],{"type":58,"value":99},{"type":52,"tag":53,"props":104,"children":106},{"id":105},"critical-do-not-trust-your-own-memory",[107],{"type":58,"value":108},"Critical: Do Not Trust Your Own Memory",{"type":52,"tag":61,"props":110,"children":111},{},[112,114,120],{"type":58,"value":113},"Whatever you remember about the AI SDK is likely outdated. The SDK changes frequently across versions - APIs are renamed, removed, and added. Your training data almost certainly contains obsolete APIs, deprecated patterns, and model IDs that no longer exist. UI hooks like ",{"type":52,"tag":67,"props":115,"children":117},{"className":116},[],[118],{"type":58,"value":119},"useChat",{"type":58,"value":121}," are among the most frequently changed APIs, so be especially careful with client code.",{"type":52,"tag":61,"props":123,"children":124},{},[125,131],{"type":52,"tag":126,"props":127,"children":128},"strong",{},[129],{"type":58,"value":130},"Never write AI SDK code from memory.",{"type":58,"value":132}," Always verify every API, option, and pattern against the documentation and source code for the version that is actually installed in the project.",{"type":52,"tag":53,"props":134,"children":136},{"id":135},"use-the-bundled-version-matched-docs",[137],{"type":58,"value":138},"Use the Bundled, Version-Matched Docs",{"type":52,"tag":61,"props":140,"children":141},{},[142,144,149,151,157],{"type":58,"value":143},"The ",{"type":52,"tag":67,"props":145,"children":147},{"className":146},[],[148],{"type":58,"value":72},{"type":58,"value":150}," package ships its full documentation and source code inside ",{"type":52,"tag":67,"props":152,"children":154},{"className":153},[],[155],{"type":58,"value":156},"node_modules",{"type":58,"value":158},". These always match the installed version, so trust them over anything you remember.",{"type":52,"tag":160,"props":161,"children":162},"ol",{},[163,221,242,254,281],{"type":52,"tag":80,"props":164,"children":165},{},[166,168,173,175,181,183,188,190,195,197,203,205,211,213,219],{"type":58,"value":167},"Ensure ",{"type":52,"tag":67,"props":169,"children":171},{"className":170},[],[172],{"type":58,"value":72},{"type":58,"value":174}," is installed. If ",{"type":52,"tag":67,"props":176,"children":178},{"className":177},[],[179],{"type":58,"value":180},"node_modules\u002Fai\u002F",{"type":58,"value":182}," does not exist, install ",{"type":52,"tag":126,"props":184,"children":185},{},[186],{"type":58,"value":187},"only",{"type":58,"value":189}," the ",{"type":52,"tag":67,"props":191,"children":193},{"className":192},[],[194],{"type":58,"value":72},{"type":58,"value":196}," package using the project's package manager (e.g. ",{"type":52,"tag":67,"props":198,"children":200},{"className":199},[],[201],{"type":58,"value":202},"pnpm add ai",{"type":58,"value":204},"). Install provider packages (e.g. ",{"type":52,"tag":67,"props":206,"children":208},{"className":207},[],[209],{"type":58,"value":210},"@ai-sdk\u002Fopenai",{"type":58,"value":212},") and framework packages (e.g. ",{"type":52,"tag":67,"props":214,"children":216},{"className":215},[],[217],{"type":58,"value":218},"@ai-sdk\u002Freact",{"type":58,"value":220},") later, when the task requires them.",{"type":52,"tag":80,"props":222,"children":223},{},[224,226,232,234,240],{"type":58,"value":225},"Read and grep the bundled docs at ",{"type":52,"tag":67,"props":227,"children":229},{"className":228},[],[230],{"type":58,"value":231},"node_modules\u002Fai\u002Fdocs\u002F",{"type":58,"value":233}," and the source at ",{"type":52,"tag":67,"props":235,"children":237},{"className":236},[],[238],{"type":58,"value":239},"node_modules\u002Fai\u002Fsrc\u002F",{"type":58,"value":241},".",{"type":52,"tag":80,"props":243,"children":244},{},[245,247,253],{"type":58,"value":246},"Provider and framework packages bundle their own docs at ",{"type":52,"tag":67,"props":248,"children":250},{"className":249},[],[251],{"type":58,"value":252},"node_modules\u002F@ai-sdk\u002F\u003Cname>\u002Fdocs\u002F",{"type":58,"value":241},{"type":52,"tag":80,"props":255,"children":256},{},[257,259,264,266,272,274,280],{"type":58,"value":258},"If something isn't in the bundled docs, search ",{"type":52,"tag":86,"props":260,"children":262},{"href":99,"rel":261},[89],[263],{"type":58,"value":99},{"type":58,"value":265},". You can append ",{"type":52,"tag":67,"props":267,"children":269},{"className":268},[],[270],{"type":58,"value":271},".md",{"type":58,"value":273}," to any docs page URL to get its markdown, and search via ",{"type":52,"tag":67,"props":275,"children":277},{"className":276},[],[278],{"type":58,"value":279},"https:\u002F\u002Fai-sdk.dev\u002Fapi\u002Fsearch-docs?q=your_query",{"type":58,"value":241},{"type":52,"tag":80,"props":282,"children":283},{},[284],{"type":58,"value":285},"If you cannot find support for an answer in the docs or source, say so explicitly — do not guess.",{"type":52,"tag":53,"props":287,"children":289},{"id":288},"ai-gateway-the-fastest-way-to-start",[290],{"type":58,"value":291},"AI Gateway: The Fastest Way to Start",{"type":52,"tag":61,"props":293,"children":294},{},[295],{"type":58,"value":296},"The Vercel AI Gateway is the fastest way to get started with the AI SDK. It provides access to models from OpenAI, Anthropic, Google, and other providers through a single API, without installing provider packages or managing multiple API keys.",{"type":52,"tag":61,"props":298,"children":299},{},[300],{"type":58,"value":301},"To set it up:",{"type":52,"tag":160,"props":303,"children":304},{},[305,310,323],{"type":52,"tag":80,"props":306,"children":307},{},[308],{"type":58,"value":309},"Authenticate with OIDC (for Vercel deployments) or get an AI Gateway API key.",{"type":52,"tag":80,"props":311,"children":312},{},[313,315,321],{"type":58,"value":314},"Provide it to your app via the ",{"type":52,"tag":67,"props":316,"children":318},{"className":317},[],[319],{"type":58,"value":320},"AI_GATEWAY_API_KEY",{"type":58,"value":322}," environment variable.",{"type":52,"tag":80,"props":324,"children":325},{},[326,328,334],{"type":58,"value":327},"Reference models with ",{"type":52,"tag":67,"props":329,"children":331},{"className":330},[],[332],{"type":58,"value":333},"provider\u002Fmodel",{"type":58,"value":335}," strings.",{"type":52,"tag":61,"props":337,"children":338},{},[339],{"type":58,"value":340},"For exact setup, authentication, and usage, read the bundled guide and the AI Gateway docs.",{"type":52,"tag":342,"props":343,"children":345},"h3",{"id":344},"choosing-a-model",[346],{"type":58,"value":347},"Choosing a Model",{"type":52,"tag":61,"props":349,"children":350},{},[351,353,359],{"type":58,"value":352},"Never use model IDs from memory — models are released and retired frequently. Fetch the current list before writing code that references a model. Do not truncate the list (e.g. with ",{"type":52,"tag":67,"props":354,"children":356},{"className":355},[],[357],{"type":58,"value":358},"head",{"type":58,"value":360},") so you can find the newest models:",{"type":52,"tag":362,"props":363,"children":368},"pre",{"className":364,"code":365,"language":366,"meta":367,"style":367},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# All available models\ncurl -s https:\u002F\u002Fai-gateway.vercel.sh\u002Fv1\u002Fmodels | jq -r '.data[].id'\n\n# Filter by provider (e.g. anthropic, openai, google)\ncurl -s https:\u002F\u002Fai-gateway.vercel.sh\u002Fv1\u002Fmodels | jq -r '[.data[] | select(.id | startswith(\"anthropic\u002F\")) | .id] | reverse | .[]'\n","bash","",[369],{"type":52,"tag":67,"props":370,"children":371},{"__ignoreMap":367},[372,384,436,446,455],{"type":52,"tag":373,"props":374,"children":377},"span",{"class":375,"line":376},"line",1,[378],{"type":52,"tag":373,"props":379,"children":381},{"style":380},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[382],{"type":58,"value":383},"# All available models\n",{"type":52,"tag":373,"props":385,"children":387},{"class":375,"line":386},2,[388,394,400,405,411,416,421,426,431],{"type":52,"tag":373,"props":389,"children":391},{"style":390},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[392],{"type":58,"value":393},"curl",{"type":52,"tag":373,"props":395,"children":397},{"style":396},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[398],{"type":58,"value":399}," -s",{"type":52,"tag":373,"props":401,"children":402},{"style":396},[403],{"type":58,"value":404}," https:\u002F\u002Fai-gateway.vercel.sh\u002Fv1\u002Fmodels",{"type":52,"tag":373,"props":406,"children":408},{"style":407},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[409],{"type":58,"value":410}," |",{"type":52,"tag":373,"props":412,"children":413},{"style":390},[414],{"type":58,"value":415}," jq",{"type":52,"tag":373,"props":417,"children":418},{"style":396},[419],{"type":58,"value":420}," -r",{"type":52,"tag":373,"props":422,"children":423},{"style":407},[424],{"type":58,"value":425}," '",{"type":52,"tag":373,"props":427,"children":428},{"style":396},[429],{"type":58,"value":430},".data[].id",{"type":52,"tag":373,"props":432,"children":433},{"style":407},[434],{"type":58,"value":435},"'\n",{"type":52,"tag":373,"props":437,"children":439},{"class":375,"line":438},3,[440],{"type":52,"tag":373,"props":441,"children":443},{"emptyLinePlaceholder":442},true,[444],{"type":58,"value":445},"\n",{"type":52,"tag":373,"props":447,"children":449},{"class":375,"line":448},4,[450],{"type":52,"tag":373,"props":451,"children":452},{"style":380},[453],{"type":58,"value":454},"# Filter by provider (e.g. anthropic, openai, google)\n",{"type":52,"tag":373,"props":456,"children":458},{"class":375,"line":457},5,[459,463,467,471,475,479,483,487,492],{"type":52,"tag":373,"props":460,"children":461},{"style":390},[462],{"type":58,"value":393},{"type":52,"tag":373,"props":464,"children":465},{"style":396},[466],{"type":58,"value":399},{"type":52,"tag":373,"props":468,"children":469},{"style":396},[470],{"type":58,"value":404},{"type":52,"tag":373,"props":472,"children":473},{"style":407},[474],{"type":58,"value":410},{"type":52,"tag":373,"props":476,"children":477},{"style":390},[478],{"type":58,"value":415},{"type":52,"tag":373,"props":480,"children":481},{"style":396},[482],{"type":58,"value":420},{"type":52,"tag":373,"props":484,"children":485},{"style":407},[486],{"type":58,"value":425},{"type":52,"tag":373,"props":488,"children":489},{"style":396},[490],{"type":58,"value":491},"[.data[] | select(.id | startswith(\"anthropic\u002F\")) | .id] | reverse | .[]",{"type":52,"tag":373,"props":493,"children":494},{"style":407},[495],{"type":58,"value":435},{"type":52,"tag":61,"props":497,"children":498},{},[499],{"type":58,"value":500},"When multiple versions of a model exist, prefer the one with the highest version number.",{"type":52,"tag":53,"props":502,"children":504},{"id":503},"building-and-consuming-agents",[505],{"type":58,"value":506},"Building and Consuming Agents",{"type":52,"tag":61,"props":508,"children":509},{},[510,512,518,520,525,527,533],{"type":58,"value":511},"Use the SDK's built-in agent abstraction (such as ",{"type":52,"tag":67,"props":513,"children":515},{"className":514},[],[516],{"type":58,"value":517},"ToolLoopAgent",{"type":58,"value":519},") rather than hand-rolling tool-calling loops. For end-to-end type safety, infer the UI message type from your agent definition when consuming it on the client (e.g. with ",{"type":52,"tag":67,"props":521,"children":523},{"className":522},[],[524],{"type":58,"value":119},{"type":58,"value":526},"). Consuming an agent is framework-specific: check ",{"type":52,"tag":67,"props":528,"children":530},{"className":529},[],[531],{"type":58,"value":532},"package.json",{"type":58,"value":534}," to detect the stack, then follow the matching quickstart.",{"type":52,"tag":61,"props":536,"children":537},{},[538,540,545,547,552],{"type":58,"value":539},"Look up the current agent, tool, and type-safety APIs in the bundled docs (",{"type":52,"tag":67,"props":541,"children":543},{"className":542},[],[544],{"type":58,"value":231},{"type":58,"value":546},", especially the agents section) or at ",{"type":52,"tag":86,"props":548,"children":550},{"href":99,"rel":549},[89],[551],{"type":58,"value":99},{"type":58,"value":241},{"type":52,"tag":53,"props":554,"children":556},{"id":555},"devtools",[557],{"type":58,"value":558},"DevTools",{"type":52,"tag":61,"props":560,"children":561},{},[562],{"type":58,"value":563},"AI SDK DevTools captures your AI SDK calls - requests, responses, tool calls, token usage, and multi-step runs - so you can inspect exactly what your agents do. Use it while developing to debug generations. It is a separate package and is intended for local development only.",{"type":52,"tag":61,"props":565,"children":566},{},[567],{"type":58,"value":568},"For setup instructions, read the bundled DevTools documentation.",{"type":52,"tag":53,"props":570,"children":572},{"id":571},"keep-the-sdk-current",[573],{"type":58,"value":574},"Keep the SDK Current",{"type":52,"tag":61,"props":576,"children":577},{},[578],{"type":58,"value":579},"Outdated installs are the most common source of errors. Compare the installed version against the latest:",{"type":52,"tag":76,"props":581,"children":582},{},[583,607],{"type":52,"tag":80,"props":584,"children":585},{},[586,591,592,598,600,606],{"type":52,"tag":126,"props":587,"children":588},{},[589],{"type":58,"value":590},"Installed:",{"type":58,"value":189},{"type":52,"tag":67,"props":593,"children":595},{"className":594},[],[596],{"type":58,"value":597},"version",{"type":58,"value":599}," field in ",{"type":52,"tag":67,"props":601,"children":603},{"className":602},[],[604],{"type":58,"value":605},"node_modules\u002Fai\u002Fpackage.json",{"type":58,"value":241},{"type":52,"tag":80,"props":608,"children":609},{},[610,615,617,623],{"type":52,"tag":126,"props":611,"children":612},{},[613],{"type":58,"value":614},"Latest:",{"type":58,"value":616}," run ",{"type":52,"tag":67,"props":618,"children":620},{"className":619},[],[621],{"type":58,"value":622},"npm view ai version",{"type":58,"value":241},{"type":52,"tag":61,"props":625,"children":626},{},[627,629,635],{"type":58,"value":628},"If the installed version is a major version (or more) behind the latest, tell the user they are on an old release, and recommend upgrading before continuing. Migration guides are at ",{"type":52,"tag":86,"props":630,"children":633},{"href":631,"rel":632},"https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fmigration-guides",[89],[634],{"type":58,"value":631},{"type":58,"value":241},{"type":52,"tag":53,"props":637,"children":639},{"id":638},"after-making-changes",[640],{"type":58,"value":641},"After Making Changes",{"type":52,"tag":61,"props":643,"children":644},{},[645],{"type":58,"value":646},"Run the project's type checker. Be minimal — only set options that differ from the defaults, checking docs or source for the defaults rather than over-specifying. Most type errors come from remembered, now-changed APIs; re-check the current docs and source when they occur.",{"type":52,"tag":648,"props":649,"children":650},"style",{},[651],{"type":58,"value":652},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":654,"total":741},[655,667,683,695,714,721,731],{"slug":656,"name":656,"fn":657,"description":658,"org":659,"tags":660,"stars":22,"repoUrl":23,"updatedAt":666},"add-function-examples","add AI function examples for testing","Guide for adding new AI function examples, for testing specific features against the actual provider APIs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[661,662,665],{"name":21,"slug":4,"type":13},{"name":663,"slug":664,"type":13},"Testing","testing",{"name":9,"slug":8,"type":13},"2026-04-06T18:55:51.318866",{"slug":668,"name":668,"fn":669,"description":670,"org":671,"tags":672,"stars":22,"repoUrl":23,"updatedAt":682},"add-harness-package","add AI SDK harness packages","Guide for adding new AI SDK harness packages. Use when creating a new @ai-sdk\u002Fharness-\u003Cname> package that adapts a coding-agent runtime to HarnessV1.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[673,674,675,678,681],{"name":18,"slug":19,"type":13},{"name":21,"slug":4,"type":13},{"name":676,"slug":677,"type":13},"Harness","harness",{"name":679,"slug":680,"type":13},"SDK","sdk",{"name":9,"slug":8,"type":13},"2026-06-18T08:29:19.858737",{"slug":684,"name":684,"fn":685,"description":686,"org":687,"tags":688,"stars":22,"repoUrl":23,"updatedAt":694},"add-provider-package","add new provider packages to AI SDK","Guide for adding new AI provider packages to the AI SDK. Use when creating a new @ai-sdk\u002F\u003Cprovider> package to integrate an AI service into the SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[689,690,693],{"name":21,"slug":4,"type":13},{"name":691,"slug":692,"type":13},"API Development","api-development",{"name":9,"slug":8,"type":13},"2026-04-06T18:55:47.45549",{"slug":696,"name":696,"fn":697,"description":698,"org":699,"tags":700,"stars":22,"repoUrl":23,"updatedAt":713},"adr-skill","create and maintain architecture decision records","Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept\u002Freject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses Socratic questioning to capture intent before drafting, and validates output against an agent-readiness checklist.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[701,704,707,710],{"name":702,"slug":703,"type":13},"ADR","adr",{"name":705,"slug":706,"type":13},"Architecture","architecture",{"name":708,"slug":709,"type":13},"Documentation","documentation",{"name":711,"slug":712,"type":13},"Engineering","engineering","2026-04-06T18:55:50.043694",{"slug":4,"name":4,"fn":5,"description":6,"org":715,"tags":716,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[717,718,719,720],{"name":18,"slug":19,"type":13},{"name":21,"slug":4,"type":13},{"name":15,"slug":16,"type":13},{"name":9,"slug":8,"type":13},{"slug":722,"name":722,"fn":723,"description":724,"org":725,"tags":726,"stars":22,"repoUrl":23,"updatedAt":730},"capture-api-response-test-fixture","capture API response test fixtures","Capture API response test fixture.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[727,728,729],{"name":691,"slug":692,"type":13},{"name":663,"slug":664,"type":13},{"name":9,"slug":8,"type":13},"2026-04-06T18:55:56.374433",{"slug":732,"name":732,"fn":733,"description":734,"org":735,"tags":736,"stars":22,"repoUrl":23,"updatedAt":740},"develop-ai-functions-example","develop AI SDK function examples","Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples\u002Fai-functions\u002Fsrc to validate provider support, demonstrate features, or create test fixtures.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[737,738,739],{"name":21,"slug":4,"type":13},{"name":663,"slug":664,"type":13},{"name":9,"slug":8,"type":13},"2026-04-06T18:55:55.088956",12,{"items":743,"total":871},[744,766,780,799,810,825,831,839,845,852,859,865],{"slug":745,"name":745,"fn":746,"description":747,"org":748,"tags":749,"stars":763,"repoUrl":764,"updatedAt":765},"next-cache-components-adoption","enable and migrate to Next.js Cache Components","Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the `cacheComponents` flag, work through a flood of blocking-prerender \u002F instant validation errors, run the `cache-components-instant-false` codemod, or decide between opting routes out with `export const instant = false` and fixing them in place.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[750,753,756,759,762],{"name":751,"slug":752,"type":13},"Caching","caching",{"name":754,"slug":755,"type":13},"Frontend","frontend",{"name":757,"slug":758,"type":13},"Migration","migration",{"name":760,"slug":761,"type":13},"Next.js","next-js",{"name":9,"slug":8,"type":13},141208,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fnext.js","2026-07-24T05:38:30.118542",{"slug":767,"name":767,"fn":768,"description":769,"org":770,"tags":771,"stars":763,"repoUrl":764,"updatedAt":779},"next-cache-components-optimizer","optimize Next.js cache components","Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components \u002F PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next\u002Fplaywright instant() e2e and work it to green, one verified route at a time; the shipped test then guards against regression. Use when asked to make a route's navigation instant (its static shell commits immediately), fix a route whose static shell isn't prerendered\u002Fserved\u002Fprefetched, grow a route's static shell or fix its slow first paint, diagnose which Suspense boundary keeps a route out of its static shell, or write the instant() e2e guard for one. Requires Next.js 16.3+ with cacheComponents; directs an upgrade if older.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[772,773,774,775,778],{"name":751,"slug":752,"type":13},{"name":754,"slug":755,"type":13},{"name":760,"slug":761,"type":13},{"name":776,"slug":777,"type":13},"Performance","performance",{"name":9,"slug":8,"type":13},"2026-07-30T05:31:10.674078",{"slug":781,"name":781,"fn":782,"description":783,"org":784,"tags":785,"stars":763,"repoUrl":764,"updatedAt":798},"next-dev-loop","verify Next.js runtime behavior","Verify Next.js runtime behavior after editing app code. Use this skill to confirm a change actually works in a running app — not just that it compiles or type-checks. Combines \u002F_next\u002Fmcp (Next.js's view) with agent-browser (the browser's view). Requires a running `next dev`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[786,789,790,793,794,795],{"name":787,"slug":788,"type":13},"Debugging","debugging",{"name":754,"slug":755,"type":13},{"name":791,"slug":792,"type":13},"Local Development","local-development",{"name":760,"slug":761,"type":13},{"name":9,"slug":8,"type":13},{"name":796,"slug":797,"type":13},"Web Development","web-development","2026-05-22T06:45:28.627735",{"slug":800,"name":800,"fn":801,"description":802,"org":803,"tags":804,"stars":763,"repoUrl":764,"updatedAt":809},"next-partial-prefetching-adoption","adopt Partial Prefetching in Next.js apps","Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the `partialPrefetching` flag, opt routes in with `export const prefetch = 'partial'`, audit `\u003CLink prefetch={true}>` calls, or resolve the link-prefetch-partial and instant-shell-url-data insights.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[805,806,807,808],{"name":754,"slug":755,"type":13},{"name":760,"slug":761,"type":13},{"name":776,"slug":777,"type":13},{"name":9,"slug":8,"type":13},"2026-07-30T05:31:11.591864",{"slug":811,"name":811,"fn":812,"description":813,"org":814,"tags":815,"stars":822,"repoUrl":823,"updatedAt":824},"turborepo","manage monorepos with Turborepo","Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines,\ndependsOn, caching, remote cache, the \"turbo\" CLI, --filter, --affected, CI optimization, environment\nvariables, internal packages, monorepo structure\u002Fbest practices, and boundaries.\n\nUse when user: configures tasks\u002Fworkflows\u002Fpipelines, creates packages, sets up\nmonorepo, shares code between apps, runs changed\u002Faffected packages, debugs cache,\nor has apps\u002Fpackages directories.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[816,819,820],{"name":817,"slug":818,"type":13},"CI\u002FCD","ci-cd",{"name":776,"slug":777,"type":13},{"name":821,"slug":811,"type":13},"Turborepo",30809,"https:\u002F\u002Fgithub.com\u002Fvercel\u002Fturborepo","2026-07-30T05:32:14.920116",{"slug":656,"name":656,"fn":657,"description":658,"org":826,"tags":827,"stars":22,"repoUrl":23,"updatedAt":666},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[828,829,830],{"name":21,"slug":4,"type":13},{"name":663,"slug":664,"type":13},{"name":9,"slug":8,"type":13},{"slug":668,"name":668,"fn":669,"description":670,"org":832,"tags":833,"stars":22,"repoUrl":23,"updatedAt":682},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[834,835,836,837,838],{"name":18,"slug":19,"type":13},{"name":21,"slug":4,"type":13},{"name":676,"slug":677,"type":13},{"name":679,"slug":680,"type":13},{"name":9,"slug":8,"type":13},{"slug":684,"name":684,"fn":685,"description":686,"org":840,"tags":841,"stars":22,"repoUrl":23,"updatedAt":694},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[842,843,844],{"name":21,"slug":4,"type":13},{"name":691,"slug":692,"type":13},{"name":9,"slug":8,"type":13},{"slug":696,"name":696,"fn":697,"description":698,"org":846,"tags":847,"stars":22,"repoUrl":23,"updatedAt":713},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[848,849,850,851],{"name":702,"slug":703,"type":13},{"name":705,"slug":706,"type":13},{"name":708,"slug":709,"type":13},{"name":711,"slug":712,"type":13},{"slug":4,"name":4,"fn":5,"description":6,"org":853,"tags":854,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[855,856,857,858],{"name":18,"slug":19,"type":13},{"name":21,"slug":4,"type":13},{"name":15,"slug":16,"type":13},{"name":9,"slug":8,"type":13},{"slug":722,"name":722,"fn":723,"description":724,"org":860,"tags":861,"stars":22,"repoUrl":23,"updatedAt":730},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[862,863,864],{"name":691,"slug":692,"type":13},{"name":663,"slug":664,"type":13},{"name":9,"slug":8,"type":13},{"slug":732,"name":732,"fn":733,"description":734,"org":866,"tags":867,"stars":22,"repoUrl":23,"updatedAt":740},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[868,869,870],{"name":21,"slug":4,"type":13},{"name":663,"slug":664,"type":13},{"name":9,"slug":8,"type":13},68]