ai-sdk
Answer questions about the AI SDK and help build AI-powered features.
Skill by wenerme
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/wenerme-ai-sdk
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, cloud, ml, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
ai-sdk- Description
- 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".
- License
- MIT
- Instructions
- 75 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
## 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.
1. Ensure `ai` is installed. Check `node_modules/ai/` or locate the workspace package in a monorepo that depends on `ai` (e.g. `apps/<name>/node_modules/ai/`). If `ai` is not installed anywhere in the project, install **only** the `ai` package into the target package using the project's package manager (e.g. `pnpm add ai --filter <pkg>` or `npm install ai`). Install provider packages (e.g. `@ai-sdk/openai`) and framework packages (e.g. `@ai-sdk/react`) later, when the task requires them.
2. Read and grep the bundled docs at `node_modules/ai/docs/` (or `<package>/node_modules/ai/docs/`) and the source at `node_modules/ai/src/`.
3. Provider and framework packages bundle their own docs at `node_modules/@ai-sdk/<name>/docs/` (or `<package>/node_modules/@ai-sdk/<name>/docs/`).
4. 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`.
5. 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
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.
To set it up:
1. Authenticate with OIDC (for Vercel deployments) or get an AI Gateway API key.
2. Provide it to your app via the `AI_GATEWAY_API_KEY` environment variable.
3. Reference models with `provider/model` strings.
For exact setup, authentication, and usage, read the bundled guide and the AI Gateway docs.
### Choosing a Model
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 `head`) so you can find the newest models:
```bash
# All available models
curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '.data[].id'
# Filter by provider (e.g. anthropic, openai, google)
curl -s https://ai-gateway.vercel.sh/v1/models | jq -r '[.data[] | select(.id | startswith("anthropic/")) | .id] | reverse | .[]'
```
When multiple versions of a model exist, prefer the one with the highest version number.
## Building and Consuming Agents
Use 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.
Look 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.
## DevTools
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.
For setup instructions, read the bundled DevTools documentation.
## Keep the SDK Current
Outdated installs are the most common source of errors. Compare the installed version against the latest:
- **Installed:** the `version` field in `node_modules/ai/package.json`.
- **Latest:** run `npm view ai version`.
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 https://ai-sdk.dev/docs/migration-guides.
## After Making Changes
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.From wenerme/ai, MIT.
More from wenerme/ai
- 0.633score
anthropic-api
wenerme
Use when working with the Anthropic REST API: Messages API, Batches API, Token Counting, Models API, Files API, Skills API, Admin API, rate limits, errors…
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
bun-docs
wenerme
Use when working with the Bun JavaScript runtime, package manager, bundler, or test runner: HTTP server, file I/O, SQLite, S3, Redis, shell scripting, FFI…
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
biome-docs
wenerme
Biome documentation — fast web toolchain for JavaScript, TypeScript, JSX, JSON, CSS, and GraphQL.
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
argocd-docs
wenerme
Use when installing, configuring, operating, securing, upgrading, troubleshooting, extending, or developing Argo CD and its Application, ApplicationSet, RBAC…
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
anthropic-docs
wenerme
Use when learning about Claude models, capabilities, pricing, prompt engineering, extended thinking, effort levels, vision, PDF support, streaming, structured…
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
ant-design-docs
wenerme
Use when working with Ant Design React (`antd`) official docs in Chinese: getting started, ConfigProvider, theme tokens, CSS-in-JS, SSR, compatibility, i18n…
SkillAFreshness: A★ 9Claude Code +9 - 0.543score
aliyun-cli-docs
wenerme
Use when working with Alibaba Cloud CLI (`aliyun`): installing/updating, plugin commands, `aliyun configure` credentials/profiles, environment variables…
SkillCFreshness: C★ 9Claude Code +9 - 0.543score
anthropic-agent-sdk
wenerme
Use when building AI agents with the Anthropic Agent SDK (Claude Code SDK): TypeScript or Python agent setup, streaming, permissions, hooks, sessions…
SkillCFreshness: C★ 9Claude Code +9 - 0.543score
argocd-cli-guide
wenerme
Use when managing, inspecting, syncing, or troubleshooting Kubernetes applications via the argocd CLI, including checking app health, running diffs, syncing…
SkillCFreshness: C★ 9Claude Code +9 - 0.543score
alpine-aports-docs
wenerme
USE THIS SKILL WHEN maintaining Alpine Linux packages (aports): writing APKBUILDs, abuild workflow, apk package management, APKINDEX format, commit/coding…
SkillCFreshness: C★ 9Claude Code +9 - 0.542score
biome-lint
wenerme
Use when fixing Biome linter errors, TypeScript/tsgo type-check errors, or running lint/typecheck workflows
SkillCFreshness: C★ 9Claude Code +9 - 0.538score
anthropic-sdk-typescript
wenerme
Use when writing TypeScript code with the Anthropic SDK: creating messages, streaming responses, batch processing, token counting, file uploads, model…
SkillCFreshness: C★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Sep 23, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/wenerme/ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.629score
ai-sdk
vercelOfficial
Answer questions about the AI SDK and help build AI-powered features.
SkillAFreshness: A★ 27.5KClaude Code +9 - 0.393score
ai-sdk
pedronauck
Answer questions about the AI SDK and help build AI-powered features.
SkillBFreshness: B★ 641Claude Code +9 - 0.336score
ai-sdk
dushyantkhosla
Answer questions about the AI SDK and help build AI-powered features.
SkillAFreshness: AClaude Code +9 - 0.336score
ai-sdk
MohMaya
Answer questions about the AI SDK and help build AI-powered features.
SkillAFreshness: AClaude Code +9 - 0.315score
ai-sdk
ibdafna
Answer questions about the AI SDK and help build AI-powered features.
SkillBFreshness: BClaude Code +9 - 0.296score
ai-sdk
frontal-labs
Answer questions about the AI SDK and help build AI-powered features.
SkillCFreshness: C★ 1Claude Code +9 - 0.294score
ai-sdk
mandor1428
Answer questions about the AI SDK and help build AI-powered features.
SkillDFreshness: D★ 27Claude Code +9 - 0.285score
ai-sdk
relvorlabs
Answer questions about the AI SDK and help build AI-powered features.
SkillCFreshness: CClaude Code +9 - 0.285score
ai-sdk
taowang1993
Answer questions about the AI SDK and help build AI-powered features.
SkillCFreshness: CClaude Code +9 - 0.266score
ai-sdk
SrulyRosenblat
Answer questions about the AI SDK and help build AI-powered features.
SkillDFreshness: D★ 2Claude Code +9 - 0.246score
ai-sdk
dopiotrek
Answer questions about the AI SDK and help build AI-powered features.
SkillDFreshness: DClaude Code +9 - 0.246score
ai-sdk
luke-h1
Answer questions about the AI SDK and help build AI-powered features.
SkillDFreshness: DClaude Code +9
More from wenerme
- 0.633score
ant-design-docs
wenerme
Use when working with Ant Design React (`antd`) official docs in Chinese: getting started, ConfigProvider, theme tokens, CSS-in-JS, SSR, compatibility, i18n…
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
biome-docs
wenerme
Biome documentation — fast web toolchain for JavaScript, TypeScript, JSX, JSON, CSS, and GraphQL.
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
anthropic-api
wenerme
Use when working with the Anthropic REST API: Messages API, Batches API, Token Counting, Models API, Files API, Skills API, Admin API, rate limits, errors…
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
anthropic-docs
wenerme
Use when learning about Claude models, capabilities, pricing, prompt engineering, extended thinking, effort levels, vision, PDF support, streaming, structured…
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
argocd-docs
wenerme
Use when installing, configuring, operating, securing, upgrading, troubleshooting, extending, or developing Argo CD and its Application, ApplicationSet, RBAC…
SkillAFreshness: A★ 9Claude Code +9 - 0.633score
bun-docs
wenerme
Use when working with the Bun JavaScript runtime, package manager, bundler, or test runner: HTTP server, file I/O, SQLite, S3, Redis, shell scripting, FFI…
SkillAFreshness: A★ 9Claude Code +9
Cite this page
ai-sdk skill. Agent Mart. https://agentmart.dev/skills/wenerme-ai-sdk (last updated 2026-10-24)