# AI SDK

> AI SDK is an open-source agent skill for ai models and llm tooling. Guides an agent through building with the Vercel AI SDK using version-matched docs. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ScaleDockHQ/better-supabase/tree/main/.agents/skills/ai-sdk
- **Repository:** https://github.com/scaledockhq/better-supabase
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** ai-sdk
- **Collection:** https://github.com/ScaleDockHQ/better-supabase
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-12-02

## About

This skill points the agent at the Vercel AI SDK, a TypeScript toolkit for text generation, structured output, tool calling, agents, embeddings and framework UI hooks. Rather than relying on memorized APIs, it has the agent first confirm the installed version of the ai package, then read the bundled docs and source inside node_modules, falling back to the online documentation when needed.

It also covers setup choices: routing models through the Vercel AI Gateway with a single API key and provider/model strings, looking up the current model list before writing code, preferring the built-in agent abstraction over hand-written tool loops, and using the DevTools package for local debugging. It ends with a reminder to run the project's type checker after changes and to flag when the installed version is a major release behind.

The skill expects a TypeScript project with a package.json and network access for the model list and the docs site. The repository version adds notes for a specific monorepo, such as its wrapper conventions and metering rules.

## When your agent uses it

> 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".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/ai-sdk)
- [License: MIT](https://github.com/ScaleDockHQ/better-supabase/tree/HEAD/.agents/skills/ai-sdk)

## Features

- **Version-matched documentation lookup:** Directs the agent to the docs and source bundled with the installed ai package rather than training memory.
- **Gateway model setup:** Explains connecting to the Vercel AI Gateway with an API key and provider/model strings.
- **Current model discovery:** Shows how to query the gateway's live model list before choosing a model ID.
- **Agent building guidance:** Recommends the SDK's agent abstraction and inferred UI message types for client code.
- **Version currency check:** Compares the installed ai version against the latest release and flags major upgrades.
- **DevTools debugging:** Points to the local-only DevTools package for inspecting requests, tool calls and token usage.

## Good for

- Add a streaming chat feature to a Next.js app using useChat
- Build a tool-calling agent with the AI SDK
- Set up text generation through the Vercel AI Gateway
- Check whether my installed ai package is out of date
- Debug multi-step generations with DevTools

## Install

### Claude Code

This skill ships in the `better-supabase` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase
```

Or copy only this skill to `~/.claude/skills/ai-sdk`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ai-sdk &&
cp -R "$tmp/.agents/skills/ai-sdk" ~/.claude/skills/ai-sdk &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/ai-sdk` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ai-sdk` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ai-sdk &&
cp -R "$tmp/.agents/skills/ai-sdk" ~/.agents/skills/ai-sdk &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/ai-sdk` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ai-sdk` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ai-sdk &&
cp -R "$tmp/.agents/skills/ai-sdk" ~/.cursor/skills/ai-sdk &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ai-sdk` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/ai-sdk
```

Or copy the folder to `~/.gemini/skills/ai-sdk` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ai-sdk`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ai-sdk &&
cp -R "$tmp/.agents/skills/ai-sdk" ~/.copilot/skills/ai-sdk &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/ai-sdk` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git
```

Then copy `better-supabase/.agents/skills/ai-sdk` into your agent's skills folder as `ai-sdk`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to be installed?

It expects the ai package in the project; if it is missing, the agent is told to install only that package into the target workspace, adding provider and framework packages later as needed.

### Which providers does AI SDK cover?

It mentions OpenAI, Anthropic, Google and others, reached through the AI Gateway with provider/model strings.

### When does AI SDK trigger?

It triggers on questions about AI SDK functions such as generateText, streamText and useChat, and on requests to add AI features or build agents.

### Does AI SDK change my code automatically?

It instructs the agent on how to write and check code, including running the project's type checker after changes, but the content does not describe automatic edits beyond that.

### How do I install AI SDK in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ai-sdk to use it in all your projects, or to .claude/skills/ai-sdk in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

### Does AI SDK run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use AI SDK?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to AI SDK?

The closest alternatives to AI SDK are AI gateway, Developing genkit js, Gemini API dev, Openai docs and Gemini API.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [AI gateway](https://ai-powered.com/skills/ai-gateway-scaledockhq): AI gateway is an open-source agent skill for ai models and llm tooling.
- [Developing genkit js](https://ai-powered.com/skills/developing-genkit-js): Developing genkit js is an open-source agent skill for developer tools.
- [Gemini API dev](https://ai-powered.com/skills/gemini-api-dev): Gemini API dev is an open-source agent skill for design and media.
- [Openai docs](https://ai-powered.com/skills/openai-docs-openai): Openai docs is an open-source agent skill for ai models and llm tooling.
- [Gemini API](https://ai-powered.com/skills/gemini-api): Gemini API is an open-source agent skill for ai models and llm tooling.
- [Azure AI projects py](https://ai-powered.com/skills/azure-ai-projects-py): Azure AI projects py is an open-source agent skill for cloud and infrastructure.
- [Azure AI voicelive ts](https://ai-powered.com/skills/azure-ai-voicelive-ts): Azure AI voicelive ts is an open-source agent skill for cloud and infrastructure.
- [API AI augmented](https://ai-powered.com/skills/api-ai-augmented): API AI augmented is an open-source agent skill for ai models and llm tooling.

---
Source: https://ai-powered.com/skills/ai-sdk
