Agent skill · Security

ai-sdk-core

Build backend AI with Vercel AI SDK v6 stable. Covers Output API (replaces generateObject/streamObject), speech synthesis, transcription, embeddings, MCP tools with security guidance. Includes v4→v5 migration and 15 error solutions with workarounds. Use when: implementing AI SDK v5/v6, migrating versions, troubleshooting AI_APICallError, Workers startup issues, Output API errors, Gemini caching issues, Anthropic tool errors, MCP tools, or stream resumption failures.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill ai-sdk-core-brendadeeznuts1111-tier-1380-omega --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 36 KB
Bundled scripts: none
Path: skills/ai-llm/ai-sdk-core-brendadeeznuts1111-tier-1380-omega/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Guides backend AI development with Vercel AI SDK v5 and v6, covering installation, Output API usage (replacing generateObject/streamObject), speech, transcription, embeddings, MCP tools with security guidance, and migration from v4 to v5 alongside error solutions.

How it works

  • Describes installation: run npm install ai @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google zod.
  • Documents the Output API: using generateText with Output.object/array/choice/text/json, and streaming via streamText with object streams and final object access.
  • Introduces v6 features: AgentLoopAgent, ToolExecution with optional human-in-the-loop approval, MCP tools (experimental_createMCPClient) with security notes, static tool generation workflow, and notes on MCP streaming limitations.
  • Shows usage for other capabilities: language model middleware, OpenTelemetry telemetry, speech synthesis (generateSpeech), transcription, image generation, embeddings, multi-modal prompts, and v5/v6 migration caveats.
  • Lists compatibility notes: workers-ai-provider version requirements, zod versions, and startup fixes for Cloudflare Workers.
  • Details v5 tool-calling changes (inputSchema, input/output renames) and v4→v5 migration steps.

When to use it

Use when implementing AI SDK v5/v6, migrating versions, troubleshooting AI_APICallError, Workers startup issues, Output API errors, Gemini caching issues, Anthropic tool errors, MCP tools, or stream resumption failures.

What it can touch

  • Tool definitions and execution flows via ToolLoopAgent, agent class, and tool abstractions.
  • MCP client via experimental_createMCPClient and tools().
  • Generation APIs: generateText, streamText, generateSpeech, transcribe, generateImage, embed, embedMany.
  • Telemetry via experimental_telemetry.
  • Environment and runtime with npm packages and Zod schemas.

Caveats

  • MCP tools carry significant production risks; security guidance emphasizes static, versioned tool definitions rather than dynamic tools.
  • Dynamic MCP tools may not stream correctly; use generateText() for MCP tooling.
  • Breaking changes from v4 to v5 include parameter and naming changes (maxTokens to maxOutputTokens, parameters to inputSchema, etc.).
  • Output API replaces legacy generateObject/streamObject and introduces new Output APIs.
  • Some sections reference external docs and security considerations; follow those sources for deeper guidance.
From the SKILL.md

# AI SDK Core Backend AI with Vercel AI SDK v5 and v6. **Installation:** ```bash npm install ai @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google zod ``` --- ## AI SDK 6 (Stable - January 2026) **Status:** Stable **Latest:** ai@6.0.26 (Jan 2026) ### BREAKING: Output API Replaces generateObject/streamObject ⚠️ **CRITICAL**: `generateObject()` and `streamObject()` are **DEPRECATED** and will be removed in a future version. Use the new Output API instead. **Before (v5 - DEPRECATED):** ```typescript // ❌ DEPRECATED - will be removed import { generateObject } from 'ai'; const result = await generateObject({ model: openai('gpt-5'), schema: z.object({ name: z.string(), age: z.number() }), prompt: 'Generate a person', }); ``` **After (v6 - USE THIS):** ```typescript // ✅ NEW OUTPUT API import { generateText, Output } from 'ai'; const result = await generateText({ model: openai('gpt-5'), output: Output.object({ schema: z.object({ name: z.string(), age: z.number() }) }), prompt: 'Generate a person', }); // Access the typed object console.log(result.object); // { name: "Alice", age: 30 } ``` ### Output Types ```typescript import { generateText, Output } from 'ai'; // Object with Zod schema outp

What's inside
Steps it walks through
  1. AI SDK 6 (Stable - January 2026)
  2. BREAKING: Output API Replaces generateObject/streamObject
  3. Output Types
  4. Streaming with Output API
  5. v6 New Features
  6. Latest AI Models (2025-2026)
  7. OpenAI
  8. Anthropic
  9. Google
  10. Core Functions
  11. Text Generation
  12. Structured Output (v6 Output API)
  13. Multi-Modal Capabilities
  14. v5 Stream Response Methods
Ships with 1 file
  • metadata.json
Commands it runs
npm install ai @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google zod
npm install ai@^5.0.0 workers-ai-provider@^2.0.0 zod@^3.25.0
npm install ai@^4.0.0 workers-ai-provider@^2.0.0
npx ai migrate
npm view ai version
npm view ai dist-tags
More from claude-skill-registry
All skills →
About this skill
What does the ai-sdk-core skill do?

Build backend AI with Vercel AI SDK v6 stable. Covers Output API (replaces generateObject/streamObject), speech synthesis, transcription, embeddings, MCP tools with security guidance. Includes v4→v5 migration and 15 error solutions with workarounds. Use when: implementing AI SDK v5/v6, migrating versions, troubleshooting AI_APICallError, Workers startup issues, Output API errors, Gemini caching issues, Anthropic tool errors, MCP tools, or stream resumption failures.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill ai-sdk-core-brendadeeznuts1111-tier-1380-omega --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going