vercel-ai-sdk-streaming

vercel-ai-sdk-streaming is a skill for Claude Code from vaquarkhan/Fullstack-development-agent-skills. It costs 48 tokens per session (518 once invoked), scanned A, original, MIT.

A set of instructions for building AI chat and assistant interfaces in Next.js, a React web framework, with responses that arrive progressively.

In plain words
What is it for?
Use it to build streaming chat interfaces, connect language-model providers, add typed tool calls, and create server-side API routes.
Why use it?
It helps avoid common mistakes such as exposing provider keys in the browser, leaving stream errors hidden, or allowing unauthorized tool calls.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the fullstack-development-agent-skills plugin — 129 skills, 10 commands shipped together

Good fit Use it to build streaming chat interfaces, connect language-model providers, add typed tool calls, and create server-side API routes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vaquarkhan/fullstack-development-agent-skills/vercel-ai-sdk-streaming
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 vaquarkhan/Fullstack-development-agent-skills --skill vercel-ai-sdk-streaming
Clone the repo
git clone --depth 1 https://github.com/vaquarkhan/Fullstack-development-agent-skills

Made for: Claude Code.

Or install fullstack-development-agent-skills, the plugin that ships this one along with the rest of its 129 skills, 10 commands.

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-streaming

README.md
[![agentmods](https://agentmods.dev/badge/skills/vaquarkhan/fullstack-development-agent-skills/vercel-ai-sdk-streaming/github.svg)](https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/vercel-ai-sdk-streaming)
Your own site
<a href="https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/vercel-ai-sdk-streaming"><img src="https://agentmods.dev/badge/skills/vaquarkhan/fullstack-development-agent-skills/vercel-ai-sdk-streaming/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-streaming

Your own site · 80×15
<a href="https://agentmods.dev/skills/vaquarkhan/fullstack-development-agent-skills/vercel-ai-sdk-streaming"><img src="https://agentmods.dev/badge/skills/vaquarkhan/fullstack-development-agent-skills/vercel-ai-sdk-streaming.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 518 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.00048 $0.00518
Opus 5 $0.00024 $0.00259
Sonnet 5 $0.00010 $0.00104
Haiku 4.5 $0.00005 $0.00052

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

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 3 executable files (examples/bad-example.ts, examples/good-example.ts, templates/route.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skill-packs/ai/vercel-ai-sdk/vercel-ai-sdk-streaming/SKILL.md · 61 lines

How it starts

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

Vercel AI SDK Streaming

Use When

  • Implementing streaming chat or copilot UX in Next.js App Router
  • Using Vercel AI SDK (ai package) with OpenAI, Anthropic, or custom providers
  • Pairing with skills/nextjs-app-router-and-streaming-ui and skills/ai-llm-integration-in-fullstack-apps

Workflow

  1. Keep provider API keys server-side only — Route Handlers or server actions.
  2. Use streamText/generateText with typed tools and maxSteps limits.
  3. Wire useChat/useAssistant on client with optimistic UI and error states.
  4. Pass abortSignal from request for client disconnect cancellation.
  5. Log usage in onFinish; rate limit per user/session at edge or API.
  6. Test streaming contracts with integration tests and mock language model.

Required Checks

  • API keys never imported in client components
  • maxSteps and token budgets configured per endpoint
  • Tool calls authorized per user — not global admin tools
  • Stream errors surfaced to UI — not silent hangs

Examples And Templates

See examples/ for side-by-side good vs bad patterns agents commonly get wrong. See templates/ for copy-paste starters aligned with this skill.

Decision Framework

  • streamText for chat UX; generateObject for structured form fill.
  • Edge runtime only when latency dominates and deps are compatible.
  • Persist messages server-side for compliance — not only browser state.
  • AI SDK UI components for rapid UX; headless hooks for custom design systems.

Common Rationalizations And Rebuttals

  • "Client-side OpenAI is simpler." -> Exposes keys and bypasses auth; always server proxy.
  • "Unlimited tool steps." -> Runaway cost; cap steps and tool allowlist.
  • "Streaming skips validation." -> Validate tool inputs/outputs same as REST APIs.

Evidence Pack

  • Route handler test with mock stream
  • Rate limit configuration and burst test
  • UX recording of error/retry behavior
  • Token usage dashboard sample per feature

Exit Criteria

  • Streaming chat works with abort and error handling
  • Keys and auth remain server-side
  • Tool calling respects user authorization and step limits

Read the full file on GitHub · 61 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 61 lines · 48 tokens per session scan A 8d0273646b1c

Subscribe to this mod's changes

vercel-ai-sdk-streaming is a skill published in the GitHub repository vaquarkhan/Fullstack-development-agent-skills (2 stars, last pushed 3d ago), licensed MIT. It adds 48 tokens to every session and 518 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-08-31.

Related

Other skills, from other repositories

igniteui-wc-choose-components

Identify and select the right Ignite UI Web Components for your app UI, then navigate to official docs, usage examples, and API references.

IgniteUI/igniteui-cli · 34 tokens

nextjs-expert

Expert knowledge in Next.js framework, Server-Side Rendering, Static Site Generation, App Router, Server Components, and full-stack React applications. Use when the user mentions React, SSR, SSG, the App Router, React Server Components, or full stack, or when the task involves Next.js Fundamentals, App Router…

personamanagmentlayer/pcl · 77 tokens

remix-expert

Expert knowledge in Remix framework, nested routing, loaders, actions, progressive enhancement, and building resilient full-stack web applications. Use when the user mentions React, nested routing, loaders, actions, progressive enhancement, or full stack, or when the task involves Remix Fundamentals, Routing System…

personamanagmentlayer/pcl · 70 tokens

nifra-web

Use when building the full-stack side of a Nifra app - file routes, layouts, loaders and actions, forms, server functions, streaming SSR, islands, SSG and ISR, the query cache, and the React, Vue, Solid, Svelte, or Preact render adapters. Covers the client/server boundary rules and the hydration errors that boundary…

nifrajs/nifra · 85 tokens

cometchat-nextjs-patterns

Framework-specific patterns for integrating CometChat React UI Kit v6 into Next.js projects (App Router and Pages Router). Covers SSR prevention, provider setup, route placement, API routes, and common pitfalls.

cometchat/cometchat-skills · 49 tokens

cometchat-react-patterns

Framework-specific patterns for integrating CometChat React UI Kit v6 into React projects (Vite or CRA). Covers provider setup, routing, layout integration, env vars, and common pitfalls.

cometchat/cometchat-skills · 45 tokens