vercel-ai-sdk

vercel-ai-sdk is a skill for Claude Code, Codex from neverinfamous/memory-journal-mcp. It costs 82 tokens per session (586 once invoked), scanned A, original, MIT.

Development guidance for AI applications built with React or Next.js using the Vercel AI SDK. The SDK provides building blocks for streamed responses, structured data, conversations, and tool calls.

In plain words
What is it for?
Use it when building chat interfaces, streaming model responses, validating structured output with Zod, or adding model-driven tools in TypeScript.
Why use it?
It helps avoid unsafe tool inputs and inconsistent patterns when connecting language models to a user interface and application code.

Skill for Claude CodeCodex

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

Good fit Use it when building chat interfaces, streaming model responses, validating structured output with Zod, or adding model-driven tools in TypeScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/neverinfamous/memory-journal-mcp/vercel-ai-sdk
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 neverinfamous/memory-journal-mcp --skill vercel-ai-sdk
Clone the repo
git clone --depth 1 https://github.com/neverinfamous/memory-journal-mcp

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/neverinfamous/memory-journal-mcp/vercel-ai-sdk/github.svg)](https://agentmods.dev/skills/neverinfamous/memory-journal-mcp/vercel-ai-sdk)
Your own site
<a href="https://agentmods.dev/skills/neverinfamous/memory-journal-mcp/vercel-ai-sdk"><img src="https://agentmods.dev/badge/skills/neverinfamous/memory-journal-mcp/vercel-ai-sdk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vercel-ai-sdk

Your own site · 80×15
<a href="https://agentmods.dev/skills/neverinfamous/memory-journal-mcp/vercel-ai-sdk"><img src="https://agentmods.dev/badge/skills/neverinfamous/memory-journal-mcp/vercel-ai-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 586 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.00082 $0.00586
Opus 5 $0.00041 $0.00293
Sonnet 5 $0.00016 $0.00117
Haiku 4.5 $0.00008 $0.00059

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

Security

Grade A, and why

vercel-ai-sdk 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 9d 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.

skills/vercel-ai-sdk/SKILL.md · 49 lines

How it starts

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

Vercel AI SDK Guidelines

The Vercel AI SDK is the de facto standard for building streaming AI applications in TypeScript and React.

1. Core API (@ai-sdk/core)

  • Text Generation: Use streamText for any user-facing chat or text response to minimize perceived latency. Only use generateText for background tasks where the user is not waiting for a real-time response.
  • Structured Outputs: Use streamObject or generateObject paired with Zod schemas to guarantee type-safe JSON outputs. Never prompt the model manually to "return JSON".
  • Tool Calling: Define tools using the tool() helper with strict Zod schemas.
import { streamText, tool } from 'ai'
import { z } from 'zod'

const result = streamText({
  model: myModel,
  messages,
  tools: {
    weather: tool({
      description: 'Get the weather in a location',
      parameters: z.object({ location: z.string() }),
      execute: async ({ location }) => fetchWeather(location),
    }),
  },
})

2. UI Hooks (@ai-sdk/react)

  • useChat: The primary hook for conversational interfaces. It automatically manages message history, streaming state, and tool invocations.
  • Error Handling: Implement the onError callback in useChat to gracefully handle API rate limits or network failures.
  • Data Streaming: Use the data property exported from useChat to stream auxiliary data (like tool execution metadata or citations) alongside the main text stream.

3. Server Actions & Next.js Integration

  • App Router: When using Next.js App Router, implement Route Handlers (app/api/chat/route.ts) that return result.toDataStreamResponse() for seamless streaming to useChat.
  • RSC (React Server Components): For generative UI, use the ai/rsc module to stream React components directly from the server to the client.

4. Security & Safety

  • Rate Limiting: Always apply rate limiting to your chat endpoints, as LLM APIs are expensive and vulnerable to abuse.
  • Provider API Keys: Ensure OPENAI_API_KEY (or equivalent) is strictly kept server-side. Never expose these keys to the client.

Read the full file on GitHub · 49 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. 9d ago First seen · 49 lines · 82 tokens per session scan A b5895f17d3e9

Subscribe to this mod's changes

vercel-ai-sdk is a skill published in the GitHub repository neverinfamous/memory-journal-mcp (20 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 586 once invoked, about $0.0004 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-08-30.

Related

Other skills, from other repositories

framework-expert

Unified framework expertise bundle. Lazy-loads relevant framework patterns (React, Vue, Angular, Next.js, Node.js, Python, Laravel, Go, Flutter, React Native, TypeScript) based on detected tech stack.

nguyenthienthanh/aura-frog · 48 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

thinking-orbs

Add accessible animated AI loading and agent-status indicators with the React thinking-orbs library. Use when a chat, copilot, voice, search, generation, or tool-running interface needs a semantic working, searching, solving, listening, composing, or shaping state; when replacing a generic spinner with an AI activity…

MengTo/Skills · 88 tokens

menu-visibility

Track which react-horizontal-scrolling-menu items are on screen: useIsVisible(itemId | 'first' | 'last', defaultValue), useLeftArrowVisible/useRightArrowVisible, the options prop (ratio, rootMargin, threshold), items.getVisible()/subscribe/unsubscribe, and the async IntersectionObserver truth model (items must be seen…

asmyshlyaev177/react-horizontal-scrolling-menu · 112 tokens

ss-reference

Compile screenshots, URLs, Figma exports, or an existing UI into a project-local StyleSeed output grammar with evidence, tokens, confidence, anti-patterns, and a validation screen. Use when the user supplies a design reference that StyleSeed does not already model.

bitjaru/styleseed · 56 tokens

ai-app

Full-stack AI application generator with Next.js, AI SDK, and ai-elements. Use when creating chatbots, agent dashboards, or custom AI applications. Triggers: chatbot, chat app, agent dashboard, AI application, Next.js AI, useChat, streamText, ai-elements, build AI app, create chatbot.

laguagu/claude-code-nextjs-skills · 66 tokens