vercel-ai-sdk-expert

vercel-ai-sdk-expert is a skill for Claude Code, Codex from beel-collab/presets.dev. It costs 41 tokens per session (2,165 once invoked), scanned A, original, MIT.

A guide to the Vercel AI SDK, a toolkit for adding language-model features to React and Next.js applications. It covers text generation, streamed responses, chat interfaces, tool calls, and structured data.

In plain words
What is it for?
Use it to build AI chat, text-generation features, tool-using assistants, structured JSON responses, and interfaces that stream generated content.
Why use it?
It provides one interface for working with different AI model providers and addresses common issues when displaying model output as it arrives.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build AI chat, text-generation features, tool-using assistants, structured JSON responses, and interfaces that stream generated content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/beel-collab/presets.dev/vercel-ai-sdk-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add beel-collab/presets.dev --skill vercel-ai-sdk-expert
Clone the repo
git clone --depth 1 https://github.com/beel-collab/presets.dev

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vercel-ai-sdk-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/beel-collab/presets.dev/vercel-ai-sdk-expert.svg)](https://agentmods.dev/skills/beel-collab/presets.dev/vercel-ai-sdk-expert)
Your own site
<a href="https://agentmods.dev/skills/beel-collab/presets.dev/vercel-ai-sdk-expert"><img src="https://agentmods.dev/badge/skills/beel-collab/presets.dev/vercel-ai-sdk-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.02165
Opus 5 $0.00020 $0.01082
Sonnet 5 $0.00008 $0.00433
Haiku 4.5 $0.00004 $0.00216

Measured 4d ago against content hash 4a0c25ca8755, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

vercel-ai-sdk-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude/skills/web-development/vercel-ai-sdk-expert/SKILL.md · 229 lines

How it starts

The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

// 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();
}

Read the full file on GitHub · 229 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 229 lines · 41 tokens per session scan A 4a0c25ca8755

Subscribe to this mod's changes

vercel-ai-sdk-expert is a skill published in the GitHub repository beel-collab/presets.dev (2 stars, last pushed 4mo ago), licensed MIT. It adds 41 tokens to every session and 2,165 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

prompt-enhancer

Transform poor or overly simple prompts with expert-level framing. Use when the user explicitly asks to improve, refine, or rewrite a prompt, or wants help framing a request for another AI system. Do NOT use for authoring, reviewing, or migrating system prompts or skills targeting a specific Claude model…

sammcj/agentic-coding · 67 tokens

llm-prompting-guide

Prompt format rules for generative video and music models. Use when writing or reviewing a prompt for MiniMax H3 (text/image/reference-to-video with native audio) or MiniMax Music 3 (song generation from caption plus lyrics), in ComfyUI or elsewhere. Do NOT use for chat-assistant prompts, or for generative models not…

sammcj/agentic-coding · 79 tokens

langchain

Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…

davila7/claude-code-templates · 79 tokens

apply-mantel-styles

Provides guidelines for applying Mantel's brand styles to diagrams and frontend components. Use when asked to create visuals that need to align with Mantel's branding.

sammcj/agentic-coding · 37 tokens

deepeval

Use when discussing or working with DeepEval (the python AI evaluation framework).

sammcj/agentic-coding · 19 tokens

create-mcp-app

This skill should be used when the user asks to "create an MCP App", "add a UI to an MCP tool", "build an interactive MCP View", or needs guidance on MCP Apps SDK patterns, UI-resource registration, MCP App lifecycle, or host integration. Provides guidance for building MCP Apps with interactive UIs.

sammcj/agentic-coding · 69 tokens