Agent skill
research-ai-sdk
Research Vercel AI SDK patterns, streaming, and multi-provider integration using Exa code search and Ref documentation
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/research-ai-sdk
SKILL.md
Research Vercel AI SDK Patterns
Use this skill when you need to:
- Learn AI SDK streaming patterns
- Understand multi-provider integration (Anthropic, OpenAI, Google, etc.)
- Research tool calling and function execution
- Find structured output patterns
- Learn RAG (Retrieval Augmented Generation) patterns
Process
-
Identify AI Use Case
- Text generation, streaming, or structured output?
- Tool calling or function execution?
- Multi-modal (text, images, audio)?
- Which provider (Anthropic, OpenAI, Google, etc.)?
-
Search Documentation (Ref)
Query patterns: - "Vercel AI SDK [feature]" - "AI SDK streaming response" - "AI SDK tools function calling" - "AI SDK structured output Zod" -
Find Implementation Examples (Exa)
Query patterns: - "Vercel AI SDK streaming React component example" - "AI SDK tool calling Next.js server action" - "AI SDK Anthropic Claude function execution" - "AI SDK structured output Zod schema validation" -
Consider Project Stack
- Integration with Next.js Server Components/Actions
- Type safety with TypeScript and Zod
- Provider selection based on use case
Common Research Topics
Streaming
// Documentation
Query: "Vercel AI SDK streaming response useChat"
// Code examples
Query: "AI SDK streamText Next.js route handler streaming response"
Tool Calling
// Documentation
Query: "AI SDK tools function calling schema"
// Code examples
Query: "AI SDK tool execution Zod schema Next.js example"
Multi-Provider
// Documentation
Query: "AI SDK provider abstraction Anthropic OpenAI"
// Code examples
Query: "AI SDK switch providers Claude GPT-4 configuration example"
Structured Output
// Documentation
Query: "AI SDK structured output generateObject Zod"
// Code examples
Query: "AI SDK generateObject Zod schema typed response example"
RAG Patterns
// Documentation
Query: "AI SDK embeddings vector search RAG"
// Code examples
Query: "AI SDK RAG pattern document retrieval context injection example"
Provider-Specific Research
Anthropic (Claude)
Query: "AI SDK Anthropic Claude tool use streaming example"
Query: "AI SDK Claude 3.5 Sonnet function calling"
OpenAI (GPT)
Query: "AI SDK OpenAI GPT-4 function calling example"
Query: "AI SDK OpenAI streaming response Next.js"
Google (Gemini)
Query: "AI SDK Google Gemini multi-modal example"
Query: "AI SDK Gemini function calling tools"
React Integration
useChat Hook
// Documentation
Query: "AI SDK useChat hook React"
// Code examples
Query: "AI SDK useChat streaming messages Next.js example"
useCompletion Hook
// Documentation
Query: "AI SDK useCompletion hook"
// Code examples
Query: "AI SDK useCompletion text generation form example"
Server Actions
// Documentation
Query: "AI SDK Next.js server actions generateText"
// Code examples
Query: "AI SDK server action form submission AI response example"
Advanced Patterns
Context Management
Query: "AI SDK conversation history context management example"
Error Handling
Query: "AI SDK error handling retry fallback provider example"
Streaming with Tools
Query: "AI SDK streaming tool calls partial results example"
Multi-step Agents
Query: "AI SDK agent pattern multiple tool calls reasoning example"
Output Format
Provide:
- Feature explanation - How the AI SDK feature works
- Code examples - Real implementations from Exa
- Provider comparison - When to use which provider
- Type safety - Zod schemas and TypeScript integration
- Best practices - Error handling, rate limiting, costs
- Integration guide - How to implement in this project
Project Context
Your project uses:
- Vercel AI SDK 5.0.51
- Multiple providers: Anthropic, OpenAI, Google, Groq, Mistral, XAI
- Next.js 15 Server Components and Actions
- TypeScript with Zod validation
- React 19 with streaming
Common Use Cases
Chat Interface
Research: "AI SDK useChat streaming Next.js chat interface"
Document Analysis
Research: "AI SDK document analysis tool calling structured output"
Content Generation
Research: "AI SDK generateText streaming content generation"
Code Generation
Research: "AI SDK code generation Anthropic Claude structured output"
When to Use
- Implementing AI features
- Choosing AI providers
- Setting up streaming responses
- Creating tool/function calling
- Optimizing AI performance
- Debugging AI integrations
- Learning new AI SDK features
Related Skills
- research-nextjs (for Next.js integration)
- research-react (for React hooks)
- research-typescript (for type safety)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?