AI SDK Documentation

This skill should be used when working with Vercel AI SDK, AI Gateway, streamText, generateText, generateObject, streamObject, tool calling, or AI SDK providers. Also relevant for "ai-sdk", "@ai-sdk/*" packages, or questions about AI SDK patterns, configuration, and best practices.

16 stars

Best use case

AI SDK Documentation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

This skill should be used when working with Vercel AI SDK, AI Gateway, streamText, generateText, generateObject, streamObject, tool calling, or AI SDK providers. Also relevant for "ai-sdk", "@ai-sdk/*" packages, or questions about AI SDK patterns, configuration, and best practices.

Teams using AI SDK Documentation should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ai-sdk-documentation/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/ai-sdk-documentation/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ai-sdk-documentation/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How AI SDK Documentation Compares

Feature / AgentAI SDK DocumentationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

This skill should be used when working with Vercel AI SDK, AI Gateway, streamText, generateText, generateObject, streamObject, tool calling, or AI SDK providers. Also relevant for "ai-sdk", "@ai-sdk/*" packages, or questions about AI SDK patterns, configuration, and best practices.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# AI SDK Documentation Skill

This skill provides tools for accessing Vercel AI SDK documentation and AI Gateway model information. Use the bundled scripts to discover available documentation pages and fetch their full content.

## Overview

The Vercel AI SDK documentation lives at `ai-sdk.dev` and covers:
- **Core SDK** (`ai` package) - generating text, streaming, tool calling, embeddings
- **UI integrations** - React hooks, streaming UI components
- **RSC** - React Server Components integration
- **Providers** - Configuration for OpenAI, Anthropic, Google, and 30+ other providers
- **AI Gateway** - Vercel's multi-provider routing service

The documentation is large (600+ pages) and frequently updated. Rather than relying on stale knowledge, always use the scripts to fetch current documentation.

## Scripts

All scripts are located in `${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/`.

### list-docs.sh

Discover available documentation pages.

**Usage:**
```bash
# List all pages grouped by category
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/list-docs.sh

# List pages in a specific category
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/list-docs.sh docs
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/list-docs.sh cookbook
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/list-docs.sh providers
```

**Categories:**
- `docs` - Core documentation (concepts, guides, API reference)
- `cookbook` - Code examples by framework (Next.js, Node.js, etc.)
- `providers` - Provider-specific setup and configuration
- `elements` - UI component library documentation
- `tools-registry` - Third-party tool integrations

**When to use:** Run this first to discover what pages exist. Do not assume documentation structure.

### fetch-doc.sh

Fetch the full markdown content of a specific documentation page.

**Usage:**
```bash
# Fetch a documentation page
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/fetch-doc.sh /docs/ai-sdk-core/generating-text

# Fetch a cookbook example
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/fetch-doc.sh /cookbook/next/generating-structured-data

# Fetch provider documentation
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/fetch-doc.sh /providers/ai-sdk-providers/openai
```

**Input:** A documentation path (e.g., `/docs/ai-sdk-core/tools-and-tool-calling`)

**Output:** Full markdown content of the page

**When to use:** After identifying relevant pages with `list-docs.sh`, fetch the ones that look most relevant to the task.

### query-models.sh

Query the AI Gateway models API for available models and their capabilities.

**Usage:**
```bash
# List all models with their provider
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/query-models.sh list

# List all providers
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/query-models.sh providers

# List all capability tags
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/query-models.sh tags

# List models from a specific provider
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/query-models.sh --provider anthropic

# List models with a specific capability
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/query-models.sh --tag vision
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/query-models.sh --tag tool-use

# Get full details for a specific model
${CLAUDE_PLUGIN_ROOT}/skills/ai-sdk-docs/scripts/query-models.sh --details openai/gpt-4o
```

**Model details include:** context window, max tokens, pricing, capability tags (vision, tool-use, reasoning, etc.)

**When to use:** When needing to know what models are available, compare model capabilities, or check pricing/context limits.

## Workflow Guidelines

### Finding Documentation

1. **Start with discovery**: Run `list-docs.sh` to see available pages
2. **Identify relevant pages**: Look for pages whose paths match the topic
3. **Fetch content**: Use `fetch-doc.sh` to get full content of relevant pages
4. **Read multiple pages if needed**: Topics often span multiple pages (e.g., a concept page + API reference page)

## Important Notes

- **Always fetch current docs**: Do not rely on potentially outdated knowledge. Use the scripts to get current documentation.
- If a page doesn't appear in `list-docs.sh` output, it doesn't exist.
- **Some pages may not have .md versions**: The script will indicate when this happens.
- **Documentation is comprehensive**: The AI SDK docs include guides, API references, examples, and troubleshooting. Check multiple sections for complete information.

## AI Gateway

The AI Gateway is Vercel's unified API for accessing multiple AI providers. Key points:

- Single API endpoint, multiple providers
- Use `query-models.sh` to see all available models
- Models are identified as `provider/model-name` (e.g., `anthropic/claude-sonnet-4`)
- Provider-specific documentation is under `/providers/`

Related Skills

code-documentation-code-explain

16
from diegosouzapw/awesome-omni-skill

You are a code education expert specializing in explaining complex code through clear narratives, visual diagrams, and step-by-step breakdowns. Transform difficult concepts into understandable expl...

api-reference-documentation

16
from diegosouzapw/awesome-omni-skill

Creates professional API documentation using OpenAPI specifications with endpoints, authentication, and interactive examples. Use when documenting REST APIs, creating SDK references, or building developer portals.

api-documentation

16
from diegosouzapw/awesome-omni-skill

API documentation standards and patterns

api-documentation-writer

16
from diegosouzapw/awesome-omni-skill

Expert guide for writing comprehensive API documentation including OpenAPI specs, endpoint references, authentication guides, and code examples. Use when documenting APIs, creating developer portals, or improving API discoverability.

api-documentation-question

16
from diegosouzapw/awesome-omni-skill

Answer API and technical documentation questions. Use when a customer asks about API usage, code implementation, or integration details.

api-documentation-generator

16
from diegosouzapw/awesome-omni-skill

Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

analyze-rust-optimizations

16
from diegosouzapw/awesome-omni-skill

This skill performs thorough analysis of Rust libraries to find optimization opportunities. It should be used when reviewing Rust code for performance improvements, memory efficiency, or when profiling indicates bottlenecks. Focuses on runtime performance and memory usage through dynamic profiling tools and static code analysis.

analyze-project-architecture

16
from diegosouzapw/awesome-omni-skill

LLM-based architectural analysis that transforms raw project data into meaningful structure

analyze-pr-performance

16
from diegosouzapw/awesome-omni-skill

Analyze code review pipeline performance for a specific PR. Use when investigating slow PRs, identifying bottlenecks, or debugging performance issues in code reviews.

analyze

16
from diegosouzapw/awesome-omni-skill

Deep analysis and investigation

analyze-m1-module-for-migration

16
from diegosouzapw/awesome-omni-skill

Systematically analyze a Magento 1 module to determine its purpose, usage, and migration requirements for Magento 2. Use when you need to decide whether to migrate a M1 module, find alternatives, or skip it.