.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/ai/use-ai-sdk
home/skills/vercel/ai/use-ai-sdk
vercel avatar

use-ai-sdk

byvercel· 96 skills

Installs

44k

Stars

26k

Forks

4.9k

Category

Machine Learning & AI

View on GitHub

TL;DR

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 to install use-ai-sdk?

vercel/ai/use-ai-sdk
$npx -y skills add vercel/ai --skill use-ai-sdk

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/vercel/ai" --skill "vercel/ai/use-ai-sdk"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/vercel/ai" that are relevant to the current task. Run `npx skills add "https://github.com/vercel/ai"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1## What the AI SDK Is
2 
3The 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.
4 
5- Repository: https://github.com/vercel/ai
6- Documentation: https://ai-sdk.dev/docs
7 
8## Critical: Do Not Trust Your Own Memory
9 
10Whatever 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.
11 
12**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.
13 
14## Use the Bundled, Version-Matched Docs
15 
16The `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.
17 
181. Ensure `ai` is installed. If `node_modules/ai/` 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/openai`) and framework packages (e.g. `@ai-sdk/react`) later, when the task requires them.
192. Read and grep the bundled docs at `node_modules/ai/docs/` and the source at `node_modules/ai/src/`.
203. Provider and framework packages bundle their own docs at `node_modules/@ai-sdk/<name>/docs/`.
214. If something isn't in the bundled docs, search https://ai-sdk.dev/docs. You can append `.md` to any docs page URL to get its markdown, and search via `https://ai-sdk.dev/api/search-docs?q=your_query`.
225. If you cannot find support for an answer in the docs or source, say so explicitly — do not guess.
23 
24## AI Gateway: The Fastest Way to Start
25 
26The 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.
27 
28To set it up:
29 
301. Authenticate with OIDC (for Vercel deployments) or get an AI Gateway API key.
312. Provide it to your app via the `AI_GATEWAY_API_KEY` environment variable.
323. Reference models with `provider/model` strings.
33 
34For exact setup, authentication, and usage, read the bundled guide and the AI Gateway docs.
35 
36### Choosing a Model
37 
38Never 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:
39 
40```bash
41# All available models
42curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '.data[].id'
43 
44# Filter by provider (e.g. anthropic, openai, google)
45curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '[.data[] | select(.id | startswith("anthropic/")) | .id] | reverse | .[]'
46```
47 
48When multiple versions of a model exist, prefer the one with the highest version number.
49 
50## Building and Consuming Agents
51 
52Use 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.
53 
54Look up the current agent, tool, and type-safety APIs in the bundled docs (`node_modules/ai/docs/`, especially the agents section) or at https://ai-sdk.dev/docs.
55 
56## DevTools
57 
58AI 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.
59 
60For setup instructions, read the bundled DevTools documentation.
61 
62## Keep the SDK Current
63 
64Outdated installs are the most common source of errors. Compare the installed version against the latest:
65 
66- **Installed:** the `version` field in `node_modules/ai/package.json`.
67- **Latest:** run `npm view ai version`.
68 
69If 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://ai-sdk.dev/docs/migration-guides.
70 
71## After Making Changes
72 
73Run 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.

Preview

vercel/aivercel/ai

$ npx -y skills add vercel/ai --skill use-ai-sdk

▸ installing to .claude/skills…

✓ use-ai-sdk ready

Repovercel/ai
TypeSkills
CategoryMachine Learning & AI
ForDeveloper
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. microsoft avatarazure-aiUse for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR.SkillsJul 2026485k1.3k
  2. lllllllama avatarai-research-exploreRigor Explore compatible skill slug for meaningful and potentially novel deep learning research candidates.SkillsJul 2026176k512
  3. lllllllama avatarai-research-reproductionRigor Reproduce compatible skill slug for README-first deep learning repository reproduction.SkillsJul 2026176k512
  4. lllllllama avatarexplore-codeRigor Improve implementation leaf skill for auditable candidate implementation in deep learning research repositories.SkillsJul 2026176k512
  5. lllllllama avatarrun-trainRigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup…SkillsJul 2026176k512
  6. lllllllama avatarexplore-runRigor Improve / Rigor Explore run leaf skill for bounded exploratory evidence in deep learning research repositories.SkillsJul 2026176k512