PlugWiki

AI SDK skill for Claude Code: build with the Vercel AI SDK without outdated code

Vercel's skill that makes Claude write AI SDK code from the docs bundled in your installed package, for TypeScript developers building AI features.

Installs
67.8K
on skills.sh
Stars
27.7K
on GitHub
Updated
Nov 2026
last repo commit

When you ask about the AI SDK, generateText, streamText, ToolLoopAgent, useChat, tool calling or structured output, Claude loads this skill. The skill's rule is blunt: "Never write AI SDK code from memory." Claude instead reads the docs and source that ship inside your installed ai package in node_modules, so they match your version.

It also tells Claude to fetch the current model list before it names a model, to check whether your ai version is a major version behind, and to run your type checker after changes. It bundles only SKILL.md. If ai is not installed, Claude installs it with your package manager.

Good for

  • TypeScript developers adding chat, agents or tool calling to an app
  • Developers whose AI-written SDK code keeps using renamed or removed APIs
  • Teams starting on Vercel AI Gateway

Install ai-sdk

Claude Code

  1. 1

    Copy this prompt.

    Install the ai-sdk skill in Claude Code. Run this command:
    
    npx skills add https://github.com/vercel/ai --skill ai-sdk
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

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".

Sections in SKILL.md

  1. What the AI SDK Is
  2. Critical: Do Not Trust Your Own Memory
  3. Use the Bundled, Version-Matched Docs
  4. AI Gateway: The Fastest Way to Start
  5. Choosing a Model
  6. Building and Consuming Agents
  7. DevTools
  8. Keep the SDK Current
  9. After Making Changes

Key facts

Author
Vercel
Repository
vercel/ai
Installs on skills.sh
67,765 (2 Nov 2026)
GitHub stars (repo)
27,679 (2 Nov 2026)
Last commit (repo)
1 Nov 2026

What it includes

  • Verify every API against the installed version

    Claude checks each API, option and pattern against docs and source for the version in your project.

    Read · Do not trust memory

  • Read node_modules/ai/docs and node_modules/ai/src

    Claude reads and searches the docs and source that ship with the ai package, and the docs bundled with provider packages. It falls back to ai-sdk.dev docs and says so when it cannot find an answer.

    Network · Version-matched docs

  • Add only the ai package with your package manager

    If ai is not installed anywhere in the project, Claude installs it into the target package. Provider and framework packages are added later, when needed.

    Runs code · Install ai if missing

  • Fastest start: one key, provider/model strings

    The skill suggests Vercel AI Gateway, with OIDC on Vercel or an AI_GATEWAY_API_KEY environment variable.

    Read · AI Gateway

  • Fetch the live model list, never use remembered IDs

    Claude queries the AI Gateway models endpoint and picks the newest version of the model family you want.

    Try: “Add a streaming chat route using the newest Anthropic model on AI Gateway.”

    Runs code · Choosing a model

  • Use ToolLoopAgent instead of a hand-rolled loop

    Claude uses the built-in agent abstraction and infers the UI message type from the agent for useChat.

    Read · Agents

  • Inspect requests, tool calls and token usage in development

    Claude reads the bundled DevTools documentation for setup. DevTools is a separate package for inspecting requests, tool calls and token usage in local development.

    Read · DevTools

  • Compare installed and latest ai version

    Claude compares your installed version with npm view ai version and tells you if you are a major version behind.

    Runs code · Keep the SDK current

  • Run the project type checker

    Claude runs your type checker and re-checks docs when types fail.

    Runs code · After making changes

From the official docs

Permissions

Low risk

The skill is instructions, but Claude may install a package, call public URLs and run your type checker. Review the commands it proposes.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It may install the ai package

    If ai is not found, the skill installs only that package with your package manager. Check which package and folder Claude targets, especially in a monorepo.

  • An AI Gateway key is a credential

    If you choose AI Gateway, the skill has you set AI_GATEWAY_API_KEY. Keep it in an untracked env file.

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyThe skill defines no read-only switch.
Talks tonpm registry. ai-gateway.vercel.sh model list. ai-sdk.dev docs and search
Scopes
  • Claude may install the ai package into your project

  • Claude runs your type checker and npm view ai version

  • Claude reads files in node_modules/ai

Questions

What does the AI SDK skill do?

It makes Claude write code for the Vercel AI SDK by reading the docs and source bundled in your installed ai package. That avoids the renamed or removed APIs that Claude would otherwise remember from training.

How do I install it?

Use the install box at the top of this page. It works alongside the AI SDK in your project, so run it from a project that uses or will use the ai package.

Does it need an API key?

Not for the skill itself. If you pick Vercel AI Gateway, the skill says to authenticate with OIDC on Vercel or set an AI_GATEWAY_API_KEY environment variable. Provider keys depend on the providers you choose.

Will it install packages or call the internet?

Yes, in a small way. If ai is missing, it installs only that package. It also fetches the AI Gateway model list, checks the latest version on npm, and may search ai-sdk.dev docs.

Which AI SDK version does it assume?

None. It tells Claude to check the installed version in node_modules/ai/package.json and to recommend an upgrade if you are a major version or more behind, with a link to the migration guides.

Is it safe to install?

It is low risk. It bundles no scripts, but Claude may install the ai package and run your type checker and npm commands, so read what it proposes. If you use AI Gateway, keep the key in an untracked env file and do not paste it into chat.

Information

updated Nov 2, 2026

Repository
vercel/ai
Folder
skills/use-ai-sdk

vercel/aiskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 1
  1. ai-sdk SKILL.md · github.com

Updated Nov 2, 2026.