From ai-sdk
Expert on Vercel's AI SDK for building AI-powered applications. Use when user wants to integrate LLMs, stream text, generate structured data, use tools, or build agents. Triggers on mentions of ai-sdk, vercel ai, generateText, streamText, useChat, tool calling.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-sdk:ai-sdkThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Expert at building AI-powered applications with Vercel's AI SDK.
Expert at building AI-powered applications with Vercel's AI SDK.
AI SDK is the TypeScript toolkit for building AI applications:
npm install ai @ai-sdk/openai
import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
const { text } = await generateText({
model: openai('gpt-4o'),
prompt: 'What is the weather in San Francisco?',
});
generateText - Non-interactive text generationstreamText - Real-time streaming for chatgenerateObject - Typed structured data with Zod schemasstreamObject - Stream structured objectsimport { useChat } from '@ai-sdk/react';
function Chat() {
const { messages, input, handleInputChange, handleSubmit } = useChat();
// Real-time streaming chat UI
}
const result = await generateText({
model: openai('gpt-4o'),
tools: {
weather: tool({
parameters: z.object({ city: z.string() }),
execute: async ({ city }) => getWeather(city),
}),
},
prompt: 'What is the weather in Tokyo?',
});
For detailed information, see the reference documentation:
'use client';
import { useChat } from '@ai-sdk/react';
export default function Chat() {
const { messages, input, handleSubmit, handleInputChange } = useChat();
return (
<div>
{messages.map(m => <div key={m.id}>{m.content}</div>)}
<form onSubmit={handleSubmit}>
<input value={input} onChange={handleInputChange} />
</form>
</div>
);
}
import { anthropic } from '@ai-sdk/anthropic';
const { text } = await generateText({
model: anthropic('claude-3-5-sonnet-20241022'),
prompt: 'Hello!',
});
When user runs sync: fetch latest from upstream sources, update docs/ files.
When user runs diff: compare current vs upstream, report changes.
npx claudepluginhub zot24/skills --plugin ai-sdkProvides expert guidance on Vercel AI SDK for building AI features like chat interfaces, text generation, structured output, tool calling, agents, streaming, embeddings, reranking, image generation, and LLM providers.
Helps build AI-powered apps with the Vercel AI SDK: core generation APIs, UI hooks for chat/streaming, tool calling, and structured data generation in Next.js and React.
Delivers production-ready backend AI using Vercel AI SDK v5 for text generation, structured output, tools, agents with multi-provider support (OpenAI, Anthropic, Google). Resolves errors like AI_APICallError and streaming issues.