ai-sdk
Skill by LeoYeAI
Answers questions about the AI SDK and helps developers build AI-powered features. It covers generateText, streamText, ToolLoopAgent, embed, tools and React hooks such as useChat. Aimed at developers building agents, chatbots, RAG systems or text generation.
Install ai-sdk
Built from the published package, never by AI.
git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills /tmp/openclaw-master-skills && mkdir -p ~/.claude/skills && cp -r /tmp/openclaw-master-skills/skills/vercel-ai-sdk ~/.claude/skills/ai-sdkRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills /tmp/openclaw-master-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/openclaw-master-skills/skills/vercel-ai-sdk ~/.gemini/antigravity-cli/skills/ai-sdkAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The ai-sdk skill helps an AI assistant answer questions about the AI SDK and build AI-powered features. It covers functions such as generateText, streamText, ToolLoopAgent, embed and tools, along with React hooks like useChat and useCompletion. The skill is aimed at developers who build agents, chatbots, RAG systems or text generation features.
Before answering, the skill checks for bundled docs in node_modules/ai/docs and installs the ai package if they are missing. It tells the assistant not to rely on memory and to verify APIs against local docs or source, falling back to ai-sdk.dev for earlier versions. It also asks for current model IDs from the Vercel AI Gateway and recommends running a typecheck after changes.
Written from the project's SKILL.md and checked against it.
What it can do
- Answer AI SDK questionsSearches bundled docs and source for current AI SDK APIs before answering.
- Build agentsUses the ToolLoopAgent pattern and file conventions for agents and tools.
- Consume agents with useChatUses InferAgentUIMessage for type-safe tool results in chat clients.
- Choose models through AI GatewayUses the Vercel AI Gateway provider unless the user specifies another provider.
- Fetch current model IDsQueries the AI Gateway model list so code does not use outdated model names.
- Troubleshoot typecheck errorsChecks a common errors reference for renamed parameters and deprecated APIs first.
- Set up DevToolsExplains local debugging and observability setup, for development only.
What you need
- A project with a package manager such as pnpm
- curl and jq to run the model ID command
- Network access to the Vercel AI Gateway model list
Try asking
- Add a streaming chat endpoint with streamText to my project
- Build a ToolLoopAgent that calls my search tool
- Wire useChat to my agent with type-safe tool results
Good to know
- Bundled local docs are described for ai@6.0.34 and later.
- Earlier versions rely on ai-sdk.dev documentation instead.
- Provider and client packages are added only when needed.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/vercel-ai-sdk/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB -
references/ai-gateway.md2 KB -
references/common-errors.md11 KB -
references/devtools.md1 KB -
references/type-safe-agents.md5 KB
Alternatives to ai-sdk
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
ai-sdk: common questions
Which AI SDK version does this skill cover?
The source says local docs apply to ai@6.0.34 and later. For earlier versions, the skill searches ai-sdk.dev.
Does the skill trust the assistant's memory of the AI SDK?
No. The source says internal knowledge is outdated, so the assistant must verify APIs against local source, local docs or ai-sdk.dev.
Which AI provider does it use by default?
It uses the Vercel AI Gateway provider unless the user specifies a different provider.
How do I install ai-sdk?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is ai-sdk free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is ai-sdk safe to use?
It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to ai-sdk?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
