Ai Sdk skill for Claude
The ai sdk skills by vercel: Answer questions about the AI SDK and help build AI-powered features.
When Claude uses it
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".
Ai Sdk SKILL.md
A preview of the skill file from vercel/ai.
What the AI SDK Is
The 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.
- Repository: https://github.com/vercel/ai
- Documentation: https://ai-sdk.dev/docs
Critical: Do Not Trust Your Own Memory
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 useChat are among the most frequently changed APIs, so be especially careful with client code.
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.
Use the Bundled, Version-Matched Docs
The 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.
- Ensure
aiis installed. Checknode_modules/ai/or locate the workspace package in a monorepo that depends onai(e.g.apps/<name>/node_modules/ai/). Ifaiis not installed anywhere in the project, install only theaipackage into the target package using the project's package manager (e.g.pnpm add ai --filter <pkg>ornpm install ai). Install provider packages (e.g.@ai-sdk/openai) and framework packages (e.g.@ai-sdk/react) later, when the task requires them. - Read and grep the bundled docs at
node_modules/ai/docs/(or<package>/node_modules/ai/docs/) and the source atnode_modules/ai/src/. - Provider and framework packages bundle their own docs at
node_modules/@ai-sdk/<name>/docs/(or<package>/node_modules/@ai-sdk/<name>/docs/). - If something isn't in the bundled docs, search https://ai-sdk.dev/docs. You can append
.mdto any docs page URL to get its markdown, and search viahttps://ai-sdk.dev/api/search-docs?q=your_query. - If you cannot find support for an answer in the docs or source, say so explicitly — do not guess.
AI Gateway: The Fastest Way to Start
How to install the ai sdk skills
Claude Code
Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):
npx degit vercel/ai/skills/use-ai-sdk#main ~/.claude/skills/use-ai-sdkCodex
npx degit vercel/ai/skills/use-ai-sdk#main ~/.codex/skills/use-ai-sdkClaude.ai and Claude Desktop
Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.
Frequently asked questions
+What is the ai sdk skills?
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".
+How do I install the vercel ai sdk skills?
Copy the skill folder into ~/.claude/skills/use-ai-sdk, for example with "npx degit vercel/ai/skills/use-ai-sdk#main ~/.claude/skills/use-ai-sdk". Claude Code loads it automatically and uses it when a task matches.
+Does Ai Sdk work with ChatGPT or Codex?
Yes. Ai Sdk uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/use-ai-sdk. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.
+Is Ai Sdk free?
Ai Sdk is published on GitHub by vercel. The repository does not declare a license, so check with the author before reusing it.