Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

vercel-ai-sdk

БесплатноБез исполняемых скриптовНе проверен

Guide for Vercel AI SDK v5 implementation patterns including generateText, streamText, useChat hook, tool calling, embeddings, and MCP integration. Use when…

wsimmondsот wsimmonds★ 116 звёзд на GitHub42 установки в других каталогах

Об этом скилле

Vercel AI SDK v5 Implementation Guide

When to Use This Skill

Use this skill when:

  • Implementing AI chat interfaces with useChat hook
  • Creating API routes that generate or stream AI responses
  • Adding tool calling / function calling capabilities
  • Generating text embeddings for semantic search or RAG
  • Migrating from AI SDK v4 to v5
  • Integrating Model Context Protocol (MCP) servers
  • Working with streaming responses or message persistence

Structured Implementation Workflow

Understand the task requirements - Identify what AI functionality is needed (chat, generation, tools, embeddings) - Determine if client-side (useChat) or server-side (API route) implementation - Check if streaming or non-streaming response is required - Verify model provider (OpenAI, Anthropic, etc.) Verify current API patterns if uncertain - Use WebFetch to check https://ai-sdk.dev/docs/ if API patterns are unclear - Confirm model specification format for the provider - Verify function signatures for complex features Implement using correct v5 patterns - Use string-based model specification ('provider/model-id') - For chat: use sendMessage (not append), parts-based messages - For tools: MUST import and use tool() helper from 'ai', MUST use inputSchema (NOT parameters), MUST use zod - For streaming: use toUIMessageStreamResponse() or toTextStreamResponse() - For embeddings: use provider.textEmbeddingModel() Ensure TypeScript types are correct - Check for proper imports from 'ai' package - Verify message types (UIMessage for useChat) - Ensure tool parameter types are inferred correctly - Add explicit types for async functions Install any missing dependencies with the CORRECT package manager - **CRITICAL: Detect which package manager the project uses FIRST** * Check for lockfiles: pnpm-lock.yaml → use pnpm, package-lock.json → use npm, yarn.lock → use yarn, bun.lockb → use bun * If pnpm-lock.yaml exists, you MUST use pnpm (NOT npm!) - Check if all imported packages are installed - If build fails with "Module not found", identify the package name from the error - Add the package to package.json dependencies - Install using the CORRECT package manager: * If pnpm-lock.yaml exists: `pnpm install [package]` or `pnpm add [package]` * If package-lock.json exists: `npm install [package]` * If yarn.lock exists: `yarn add [package]` * If bun.lockb exists: `bun install [package]` or `bun add [package]` - Re-run build to verify installation succeeded **NEVER use the wrong package manager!** - Using npm when the project uses pnpm creates package-lock.json alongside pnpm-lock.yaml - This causes dependency version mismatches and breaks the build - ALWAYS check for existing lockfiles and use the matching package manager
  NEVER accept "Module not found" errors as environment issues
  YOU must install the required packages with the CORRECT package manager

  Common packages needed:
  - ai (core AI SDK)
  - @ai-sdk/openai (OpenAI provider)
  - @ai-sdk/anthropic (Anthropic provider)
  - @modelcontextprotocol/sdk (MCP integration)
  - zod (for tool schemas)
</critical>
Run build and fix ALL errors until it passes - Run: npm run build (or bun run build) - If build fails, read the FULL error message carefully - Common fixes: * "Module not found" → Install the package (go back to step 5) * Type errors → Fix TypeScript types * Config errors → Check next.config.js/ts * Framework errors → Research the error, try different approaches - Apply fix and re-run build - REPEAT until build passes NEVER stop at "build fails but code is correct" NEVER blame "environment" or "framework bugs" without debugging KEEP ITERATING until the build PASSES If you encounter a framework error, research it, try workarounds, debug it DO NOT give up until you have a passing build Run tests and debug ALL failures until they pass - Run: npm run test (or bun run
Полный SKILL.md на GitHub

Установить vercel-ai-sdk в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Glob
Grep
Bash
WebFetch

FAQ

Что делает скилл vercel-ai-sdk?

Guide for Vercel AI SDK v5 implementation patterns including generateText, streamText, useChat hook, tool calling, embeddings, and MCP integration. Use when implementing AI chat interfaces, streaming responses, tool/function calling, text embeddings, or working with convertToModelMessages and toUIMessageStreamResponse. Activates for AI SDK integration, useChat hook usage, message streaming, or tool calling tasks.

Как установить скилл vercel-ai-sdk?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл vercel-ai-sdk запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить vercel-ai-sdk с