Skill · em Construir backend e dados

ai-sdk

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…

Procedência

Antes de instalar

1 arquivo · 5,7 KB · só texto, nenhum script

Instalar na sua CLI

O comando baixa a versão fixada (commit be877ff) direto da origem, para a pasta que a CLI lê. Precisa de curl (macOS e Linux); no Windows não há comando, porque o Rook Labs é para macOS.

Claude Code

Neste projeto: instala em .claude/skills/ai-sdk/.

d=".claude/skills/ai-sdk"
u="https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/skills/use-ai-sdk"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/LICENSE"

Global: instala em ~/.claude/skills/ai-sdk/.

d="$HOME/.claude/skills/ai-sdk"
u="https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/skills/use-ai-sdk"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/LICENSE"

Codex

Neste projeto: instala em .agents/skills/ai-sdk/.

d=".agents/skills/ai-sdk"
u="https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/skills/use-ai-sdk"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/LICENSE"

Global: instala em ~/.agents/skills/ai-sdk/.

d="$HOME/.agents/skills/ai-sdk"
u="https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/skills/use-ai-sdk"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/LICENSE"

Antigravity

Neste projeto: instala em .agents/skills/ai-sdk/.

d=".agents/skills/ai-sdk"
u="https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/skills/use-ai-sdk"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/LICENSE"

Global: instala em ~/.gemini/antigravity-cli/skills/ai-sdk/.

d="$HOME/.gemini/antigravity-cli/skills/ai-sdk"
u="https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/skills/use-ai-sdk"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/vercel/ai/be877ff2d56eb9f48cc38af49ca7165fb335b5f2/LICENSE"

Peça ao Rook

Já usa o Rook Labs? Cole no chat do Rook: instale a skill https://rooklabs.sh/marketplace/vercel.ai.ai-sdk

Prévia do SKILL.md

---
name: ai-sdk
description: '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 (O…
---

## What the AI SDK Is

The AI SDK by Vercel (the `ai` package on npm) is a TypeScript toolkit for building AI applications. It provides a unified API across model providers for text generation, structured output, tool calling, agents, embeddings, and framework UI integrations.

- Repository: https://github.com/vercel/ai
- Documentation: https://ai-sdk.dev/docs

## Critical: Do Not Trust Your Own Memory

Whatever you remember about the AI SDK is likely outdated. The SDK changes frequently across versions - APIs are renamed, removed, and added. Your training data almost certainly contains obsolete APIs, deprecated patterns, and model IDs that no longer exist. UI hooks like `useChat` are among the most frequently changed…

**Never write AI SDK code from memory.** Always verify every API, option, and pattern against the documentation and source code for the version that is actually installed in the project.

## Use the Bundled, Version-Matched Docs

The `ai` package ships its full documentation and source code inside `node_modules`. These always match the installed version, so trust them over anything you remember.

1. Ensure `ai` is installed. Check `node_modules/ai/` or locate the workspace package in a monorepo that depends on `ai` (e.g. `apps/<name>/node_modules/ai/`). If `ai` is not installed anywhere in the project, install **only** the `ai` package into the target package using the project's package manager (e.g. `pnpm add …
2. Read and grep the bundled docs at `node_modules/ai/docs/` (or `<package>/node_modules/ai/docs/`) and the source at `node_modules/ai/src/`.
3. Provider and framework packages bundle their own docs at `node_modules/@ai-sdk/<name>/docs/` (or `<package>/node_modules/@ai-sdk/<name>/docs/`).
4. If something isn't in the bundled docs, search https://ai-sdk.dev/docs. You can append `.md` to any docs page URL to get its markdown, and search via `https://ai-sdk.dev/api/search-docs?q=your_query`.
5. If you cannot find support for an answer in the docs or source, say so explicitly — do not guess.

## AI Gateway: The Fastest Way to Start
…

Ver todo o marketplace