Agent skill

Vercel AI SDK Expert

by sickn33 in sickn33/agentic-awesome-skills

Expert in the Vercel AI SDK. An agent skill from sickn33/agentic-awesome-skills.

MITAuto-check passedAI & LLM Engineering

Install Vercel AI SDK Expert

skills CLI
$ npx skills add sickn33/agentic-awesome-skills --skill vercel-ai-sdk-expert -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills vercel-ai-sdk-expert --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/vercel-ai-sdk-expert .claude/skills/vercel-ai-sdk-expert && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vercel-ai-sdk-expert
GitHub stars
47k
Used in
2 other repos
Token cost
~2.2k tokens
SKILL.md length
551 words
Files
1
Skills in repo
1,497
Repo updated
First seen
Licence
MIT

At a glance

Expert in the Vercel AI SDK. An agent skill from sickn33/agentic-awesome-skills.

  • Works in 2 steps: AI SDK Core (ai): Server-side functions… → AI SDK UI (@ai-sdk/react): Frontend…
  • Tasks that involve Structured output and tool calling
  • SKILL.md covers When to Use This Skill, Core Concepts, Server-Side Generation (Core… and Frontend UI Hooks, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Vercel AI SDK Expert is an agent skill from sickn33/agentic-awesome-skills. Expert in the Vercel AI SDK. Covers Core API (generateText, streamText), UI hooks (useChat, useCompletion), tool calling, and streaming UI components with React and Next.js.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Structured output and tool calling. It works with Vercel AI SDK, React, Next.js and OpenAI. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.

When your agent uses it

  • Tasks that involve Structured output and tool calling

Example prompts

  • “/vercel-ai-sdk-expert”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. AI SDK Core (ai): Server-side functions to interact with LLMs (generateText, streamText, generateObject).
  2. AI SDK UI (@ai-sdk/react): Frontend hooks to manage chat state and streaming (useChat, useCompletion).

What it can do on your machine

Read from SKILL.md and the folder at commit b84d35a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vercel AI SDK Expert loads about 2.2k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 551 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sickn33/agentic-awesome-skills at commit b84d35a, republished under its MIT licence (© sickn33). 551 words, ~2,187 tokens.

Download SKILL.mdSave it as .claude/skills/vercel-ai-sdk-expert/SKILL.md (or your agent's skills folder).
name
vercel-ai-sdk-expert
description
Expert in the Vercel AI SDK. Covers Core API (generateText, streamText), UI hooks (useChat, useCompletion), tool calling, and streaming UI components with React and Next.js.
risk
safe
source
community
date_added
2026-03-06

Vercel AI SDK Expert

You are a production-grade Vercel AI SDK expert. You help developers build AI-powered applications, chatbots, and generative UI experiences primarily using Next.js and React. You are an expert in both the ai (AI SDK Core) and @ai-sdk/react (AI SDK UI) packages. You understand streaming, language model integration, system prompts, tool calling (function calling), and structured data generation.

When to Use This Skill

  • Use when adding AI chat or text generation features to a React or Next.js app
  • Use when streaming LLM responses to a frontend UI
  • Use when implementing tool calling / function calling with an LLM
  • Use when returning structured data (JSON) from an LLM using generateObject
  • Use when building AI-powered generative UIs (streaming React components)
  • Use when migrating from direct OpenAI/Anthropic API calls to the unified AI SDK
  • Use when troubleshooting streaming issues with useChat or streamText

Core Concepts

Why Vercel AI SDK?

The Vercel AI SDK is a unified framework that abstracts away provider-specific APIs (OpenAI, Anthropic, Google Gemini, Mistral). It provides two main layers:

  1. AI SDK Core (ai): Server-side functions to interact with LLMs (generateText, streamText, generateObject).
  2. AI SDK UI (@ai-sdk/react): Frontend hooks to manage chat state and streaming (useChat, useCompletion).

Server-Side Generation (Core API)

Basic Text Generation
typescript
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";

// Returns the full string once completion is done (no streaming)
const { text, usage } = await generateText({
  model: openai("gpt-4o"),
  system: "You are a helpful assistant evaluating code.",
  prompt: "Review the following python code...",
});

console.log(text);
console.log(`Tokens used: ${usage.totalTokens}`);
Streaming Text
typescript
// app/api/chat/route.ts (Next.js App Router API Route)
import { streamText } from 'ai';
import { openai } from '@ai-sdk/openai';

// Allow streaming responses up to 30 seconds
export const maxDuration = 30;

export async function POST(req: Request) {
  const { messages } = await req.json();

  const result = streamText({
    model: openai('gpt-4o'),
    system: 'You are a friendly customer support bot.',
    messages,
  });

  // Automatically converts the stream to a readable web stream
  return result.toDataStreamResponse();
}
Structured Data (JSON) Generation
typescript
import { generateObject } from 'ai';
import { openai } from '@ai-sdk/openai';
import { z } from 'zod';

const { object } = await generateObject({
  model: openai('gpt-4o-2024-08-06'), // Use models good at structured output
  system: 'Extract information from the receipt text.',
  prompt: receiptText,
  // Pass a Zod schema to enforce output structure
  schema: z.object({
    storeName: z.string(),
    totalAmount: z.number(),
    items: z.array(z.object({
      name: z.string(),
      price: z.number(),
    })),
    date: z.string().describe("ISO 8601 date format"),
  }),
});

// `object` is automatically fully typed according to the Zod schema!
console.log(object.totalAmount); 

Frontend UI Hooks

useChat (Conversational UI)
tsx
// app/page.tsx (Next.js Client Component)
"use client";

import { useChat } from "ai/react";

export default function Chat() {
  const { messages, input, handleInputChange, handleSubmit, isLoading } = useChat({
    api: "/api/chat", // Points to the streamText route created above
    // Optional callbacks
    onFinish: (message) => console.log("Done streaming:", message),
    onError: (error) => console.error(error)
  });

  return (
    <div className="flex flex-col h-screen max-w-md mx-auto p-4">
      <div className="flex-1 overflow-y-auto mb-4">
        {messages.map((m) => (
          <div key={m.id} className={`mb-4 ${m.role === 'user' ? 'text-right' : 'text-left'}`}>
            <span className={`p-2 rounded-lg inline-block ${m.role === 'user' ? 'bg-blue-500 text-white' : 'bg-gray-200'}`}>
              {m.target || m.content}
            </span>
          </div>
        ))}
      </div>
      
      <form onSubmit={handleSubmit} className="flex gap-2">
        <input
          value={input}
          onChange={handleInputChange}
          placeholder="Say something..."
          className="flex-1 p-2 border rounded"
          disabled={isLoading}
        />
        <button type="submit" disabled={isLoading} className="bg-black text-white p-2 rounded">
          Send
        </button>
      </form>
    </div>
  );
}

Tool Calling (Function Calling)

Tools allow the LLM to interact with your code, fetching external data or performing actions before responding to the user.

Server-Side Tool Definition
typescript
// app/api/chat/route.ts
import { streamText, tool } from 'ai';
import { openai } from '@ai-sdk/openai';
import { z } from 'zod';

export async function POST(req: Request) {
  const { messages } = await req.json();

  const result = streamText({
    model: openai('gpt-4o'),
    messages,
    tools: {
      getWeather: tool({
        description: 'Get the current weather in a given location',
        parameters: z.object({
          location: z.string().describe('The city and state, e.g. San Francisco, CA'),
          unit: z.enum(['celsius', 'fahrenheit']).optional(),
        }),
        // Execute runs when the LLM decides to call this tool
        execute: async ({ location, unit = 'celsius' }) => {
          // Fetch from your actual weather API or database
          const temp = location.includes("San Francisco") ? 15 : 22;
          return `The weather in ${location} is ${temp}° ${unit}.`;
        },
      }),
    },
    // Allows the LLM to call tools automatically in a loop until it has the answer
    maxSteps: 5, 
  });

  return result.toDataStreamResponse();
}
UI for Multi-Step Tool Calls

When using maxSteps, the useChat hook will display intermediate tool calls if you handle them in the UI.

tsx
// Inside the `useChat` messages.map loop
{m.role === 'assistant' && m.toolInvocations?.map((toolInvocation) => (
  <div key={toolInvocation.toolCallId} className="text-sm text-gray-500">
    {toolInvocation.state === 'result' ? (
      <p>✅ Fetched weather for {toolInvocation.args.location}</p>
    ) : (
      <p>⏳ Fetching weather for {toolInvocation.args.location}...</p>
    )}
  </div>
))}
Show full SKILL.md (282 more words)Show less

Best Practices

  • ✅ Do: Use openai('gpt-4o') or anthropic('claude-3-5-sonnet-20240620') format (from specific provider packages like @ai-sdk/openai) instead of the older edge runtime wrappers.
  • ✅ Do: Provide a strict Zod schema and a clear system prompt when using generateObject().
  • ✅ Do: Set maxDuration = 30 (or higher if on Pro) in Next.js API routes that use streamText, as LLMs take time to stream responses and Vercel's default is 10-15s.
  • ✅ Do: Use tool() with comprehensive description tags on Zod parameters, as the LLM relies entirely on those strings to understand when and how to call the tool.
  • ✅ Do: Enable maxSteps: 5 (or similar) when providing tools, otherwise the LLM won't be able to reply to the user after seeing the tool result!
  • ❌ Don't: Forget to return result.toDataStreamResponse() in Next.js App Router API routes when using streamText; standard JSON responses will break chunking.
  • ❌ Don't: Blindly trust the output of generateObject without validation, even though Zod forces the shape — always handle failure states using try/catch.

Troubleshooting

Problem: The streaming chat cuts off abruptly after 10-15 seconds. Solution: The serverless function timed out. Add export const maxDuration = 30; (or whatever your plan limit is) to the Next.js API route file.

Problem: "Tool execution failed" or the LLM didn't return an answer after using a tool. Solution: streamText stops immediately after a tool call completes unless you provide maxSteps. Set maxSteps: 2 (or higher) to let the LLM see the tool result and construct a final text response.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/vercel-ai-sdk-expert of sickn33/agentic-awesome-skills.

Open the folder on GitHubat commit b84d35a

Used in 2 other repositories

We found 11 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 9, 2026.

Compare with similar skills

Vercel AI SDK Expert next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vercel AI SDK Expert compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vercel AI SDK Expert this skillsickn33/agentic-awesome-skills47k2 repos~2.2kAutomated safety check: PassMIT
AI SDKvercel-labs/ai-facts16820 repos~1.2kAutomated safety check: PassNone
Mem0 Provider for Vercel AI SDKmem0ai/mem067k—~2.3kAutomated safety check: PassApache-2.0
Genui Integrationopentiny/genui-sdk172—~1.3kAutomated safety check: PassMIT
AI SDKCompound-inc/rift1241 repos~568Automated safety check: PassCustom licence
LangchainOrchestra-Research/AI-Research-SKILLs13k2 repos~3.2kAutomated safety check: PassMIT

Similar skills

  • AI SDK

    vercel-labs/ai-facts

    Official

    Answer questions about the AI SDK and help build AI-powered features.

    168 GitHub starsUsed in 20 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Adds persistent memory to Vercel AI SDK apps with the Mem0 provider, using a wrapped model or standalone retrieve and store utilities.

    67k GitHub stars~2.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Genui Integration

    opentiny/genui-sdk

    genui-sdk 全方位指南:安装、配置、集成、示例。用户提到 genui-sdk、genui-sdk-server,或想构建 AI 聊天界面、动态 UI 组件、Node.js 后端 LLM 代理(OpenAI 兼容 chat/completions API)时使用。涵盖 Vue/Angular 前端(主题、物料、GenuiChat/GenuiRenderer)与 Server…

    172 GitHub stars~1.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • AI SDK

    Compound-inc/rift

    Answer questions about the AI SDK and help build AI-powered features.

    124 GitHub starsUsed in 1 repo~568 tokens
    AI & LLM EngineeringAuto-check passed
  • Langchain

    Orchestra-Research/AI-Research-SKILLs

    Framework for building LLM-powered applications with agents, chains, and RAG.

    13k GitHub starsUsed in 2 repos~3.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub stars~3.6k tokensUpdated 12 days ago
    AI & LLM EngineeringAuto-check: notes

More from sickn33/agentic-awesome-skills

All 1,497 skills in this repo
  • Liuguang Banlan UI

    sickn33/agentic-awesome-skills

    Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Find Complementary Founders

    sickn33/agentic-awesome-skills

    Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.

    47k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Whatsapp Cloud API

    sickn33/agentic-awesome-skills

    Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~4.5k tokens
    Auto-check passed
  • Cline Pilot

    sickn33/agentic-awesome-skills

    Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.

    47k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Questions about Vercel AI SDK Expert

What does Vercel AI SDK Expert do?

Expert in the Vercel AI SDK. An agent skill from sickn33/agentic-awesome-skills. Vercel AI SDK Expert is an agent skill from sickn33/agentic-awesome-skills. Expert in the Vercel AI SDK.

When should I use Vercel AI SDK Expert?

Vercel AI SDK Expert fits situations like: tasks that involve Structured output and tool calling.

How do I install Vercel AI SDK Expert in Claude Code?

Run `npx skills add sickn33/agentic-awesome-skills --skill vercel-ai-sdk-expert -a claude-code`. Or copy the skill folder (skills/vercel-ai-sdk-expert in sickn33/agentic-awesome-skills) into .claude/skills/vercel-ai-sdk-expert in your project. Claude Code loads it when a task matches its description.

How do I install Vercel AI SDK Expert in Codex?

Run `npx skills add sickn33/agentic-awesome-skills --skill vercel-ai-sdk-expert -a codex`. Or copy the skill folder (skills/vercel-ai-sdk-expert in sickn33/agentic-awesome-skills) into .agents/skills/vercel-ai-sdk-expert in your project. Codex loads it when a task matches its description.

Can I use Vercel AI SDK Expert in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill vercel-ai-sdk-expert -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vercel-ai-sdk-expert, .gemini/skills/vercel-ai-sdk-expert, .github/skills/vercel-ai-sdk-expert and .opencode/skills/vercel-ai-sdk-expert in your project.

What does Vercel AI SDK Expert need to run?

SKILL.md names no scripts, command-line tools or credentials: Vercel AI SDK Expert is instructions for the agent only. Our summary lists: Python 3.

Does Vercel AI SDK Expert access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Vercel AI SDK Expert safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vercel AI SDK Expert use?

Vercel AI SDK Expert is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vercel AI SDK Expert use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Vercel AI SDK Expert?

Skills that share tags, products or a category with Vercel AI SDK Expert: AI SDK (vercel-labs/ai-facts, 168 stars), Mem0 Provider for Vercel AI SDK (mem0ai/mem0, 67k stars), Genui Integration (opentiny/genui-sdk, 172 stars) and AI SDK (Compound-inc/rift, 124 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vercel AI SDK Expert?

sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,405 GitHub stars. The repository holds 1,497 skills in this directory. The repository was last updated on October 9, 2026.

Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.