What the ai-sdk skill does
Its central instruction is "do not trust your own memory": AI SDK APIs are renamed and removed between versions, and model IDs change often. So Claude:
- Checks that
aiis installed, and if not, installs only that package. - Reads and searches the docs and source shipped in
node_modules/ai/docs/andnode_modules/ai/src/, plus the docs inside any@ai-sdk/*provider packages. - Falls back to ai-sdk.dev, and says so plainly if it cannot find support for an answer.
Models. The skill recommends Vercel's AI Gateway as the fastest start: one AI_GATEWAY_API_KEY and provider/model strings. It tells Claude to fetch the current model list from the Gateway instead of using model IDs from memory, and to prefer the highest version.
Agents. It says to use the SDK's own agent abstraction, such as ToolLoopAgent, rather than hand-written tool loops, and to infer the UI message type from the agent for type-safe useChat.
When it triggers
When you ask about functions like generateText, streamText, embed or tools, want to build agents, chatbots or RAG, ask about providers, streaming or structured output, or use React hooks like useChat.
Good to know
In our test plain Claude also checked the installed version and wrote current code; the skill's visible effect was routing the model through the AI Gateway. If you want a provider key such as Anthropic's instead, say so. The skill comes from the vercel/ai repository under the Apache 2.0 license. More coding skills.

