SkillsReviewed · laguagu

AI SDK 6 maintenance skill

The ai-sdk-6 skill gives coding assistants guidance for developers maintaining Vercel AI SDK 6 applications, but its advice must match the exact installed release. It covers agents, streaming chat, tool approvals, structured output, middleware and MCP connections, with particular attention to differences between v6 and v7 APIs.

Researched 16 Nov 2026

In short.

The ai-sdk-6 skill is an instruction package for coding assistants helping developers maintain Vercel AI SDK 6 applications, with compatibility depending on the project's exact installed release. Its main value is concrete guidance on version-sensitive details such as message conversion, tool approvals, streaming protocols and multi-step usage accounting. A route-and-UI example accompanies eight feature references. The files also address authorization, conversation history, cancellation and MCP client cleanup. No code was executed, compatibility claims were not independently verified, and operating costs are unknown.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes skills/ai-sdk-6/SKILL.md and all eight supplied references: agents.md, core-functions.md, examples.md, mcp.md, middleware.md, tools.md, ui-hooks.md and workflows.md. The related repository-root LICENSE is included. The source revision is b84dc5df467ce6c21e96f5266f8a3889c060e827. Other repository folders, sibling skills, linked upstream documentation and dependency implementations are outside the supplied scope. No code was executed; assistant behavior, application compatibility, provider behavior, security, performance and operating costs remain unverified or unknown.

The overview

Identity

Published in laguagu/claude-code-nextjs-skills, ai-sdk-6 consists of SKILL.md and eight reference documents. It supplies instructions an assistant can consult while working on applications that already depend on ai@6.

The original source folder is [https://github.com/laguagu/claude-code-nextjs-skills/tree/main/skills/ai-sdk-6]. Its references cover agents, generation functions, tools, chat UI, middleware, MCP, workflow choices and examples.

Assessment

The strongest reason to use this skill is its attention to integration mistakes that arise when similar-looking APIs differ across SDK versions. Examples include awaiting convertToModelMessages, using v6 tool-level needsApproval and returning the streaming protocol expected by the chat UI.

Its likely benefit is more version-aware assistance during maintenance. The supplied material provides no measured improvement in coding accuracy, development time or production reliability. Application compatibility remains unassessed.

Users

The intended users are developers maintaining v6 agents, chatbots, tool integrations, streaming interfaces or structured-output features with a coding assistant. The source directs new projects and ai@7 applications toward a separate ai-sdk-7 skill.

Beginners get a concrete server route and React form to study, although understanding the examples requires familiarity with TypeScript, dependencies and client/server boundaries. Experienced developers get more detailed guidance on approval states, stream cancellation, message persistence and provider-specific contracts.

Capabilities

The guidance covers ToolLoopAgent, generateText, streamText, schema-based Output specifications and typed tool inputs. It explains tool execution, manual approval, client-provided outputs and the UI states needed to display those interactions.

Additional references address chat transports and stored messages, model middleware, and MCP connections that expose external tools. They discuss stream cleanup, server authorization and choosing between fixed application steps and model-directed tool loops. These are implementation instructions; their effectiveness in a particular application is unknown.

Using it

Requirements

The application must already use ai@6. Compatible provider and UI packages should be resolved from its manifest and lockfile, including from the relevant application directory in a monorepo. Model calls require an appropriately configured provider or gateway model.

Several instructions depend on minor versions. The tool reference identifies 6.0.202 as the minimum for the replayed-approval vulnerability it describes. It places experimental_toolApprovalSecret support in text functions at 6.0.202 and in ToolLoopAgent settings and prepareCall at 6.0.272. These source claims were not independently verified.

The supplied folder does not establish a minimum Node.js version, a required deployment host or a coding-assistant subscription requirement.

Mechanism

SKILL.md provides the assistant's entry instructions and points to feature-specific references. It directs the assistant to inspect documentation, source and types matching the application's installed packages before proposing changes. Runtime behavior comes from those SDK and provider packages.

The version distinctions include system for v6 text functions versus instructions for ToolLoopAgent, stopWhen with stepCountIs for loop limits, and asynchronous message conversion. The core reference also distinguishes final-step usage from totalUsage across a multi-step interaction.

Setup

Obtain the complete skills/ai-sdk-6 folder, including its references, and preserve the repository's LICENSE notice. The supplied files do not document an assistant-specific installation command or activation procedure.

Before applying its examples, establish the resolved ai version and compatible provider and UI dependencies. The skill prioritizes installed documentation and types; it says ai packages include documentation from 6.0.32 onward. Its linked ai@6.0.297 documentation snapshot is a fallback reference, rather than an application dependency requirement.

Example

The supplied example pairs an app/api/chat/route.ts endpoint with a React page. The endpoint validates incoming UI messages, awaits conversion into model messages, defines a typed weather tool and calls streamText with a five-step limit. It returns a UI-message stream consumed through DefaultChatTransport and useChat.

The weather tool always returns 21 °C, and provider/model-id is a placeholder. The page renders text and completed weather results, keeping form input separate from useChat state. This illustrates API wiring; real weather retrieval, application authentication, persistence and complete approval/error handling require additional implementation. Nothing in the example was executed.

Assessment & evidence

Limitations

The instructions require release-specific interpretation. The main file warns that substituting v7's toolApproval into v6 can leave a tool running without approval if the mistake escapes type checking. The tool reference therefore places authorization in trusted execution and server policy, alongside approval handling.

Operational work remains application-specific. The references explain that in-memory agent execution lacks restart durability, consuming a stream does not automatically provide resumption, and MCP clients need cleanup across completion, error and cancellation. Middleware can also alter stream order, latency and memory behavior.

Schema-valid output can still be semantically wrong. Provider compatibility, production reliability, comprehensive security and performance were not assessed.

Reasoning

The assessment rests on the specificity of the instructions: named APIs, version-dependent approval behavior, explicit stream contracts and a connected server/UI example. These details make the folder useful as a maintenance reference, while its repeated checks against installed types help address dependency drift.

That usefulness is an inference from the content. It does not establish that an assistant will follow every instruction or produce correct changes. The resource provides no comparative evaluation of assistant output with and without the skill.

Alternatives

The entry file points to the sibling ai-sdk skill when the major version is unknown and ai-sdk-7 for new projects or an authorized upgrade. Those sibling files were not supplied, so their contents and quality are unknown here.

Developers can also consult version-matched SDK documentation and official examples directly, as this skill recommends. Its fallback documentation tree is [https://github.com/vercel/ai/tree/ai%406.0.297/content/docs]. The examples reference advises choosing files matching both the application's release and provider.

Evidence

The supplied material contains the complete selected folder: SKILL.md and eight reference documents, together with the repository-root LICENSE. It supports analysis of the instructions and illustrative code. Linked upstream documentation, SDK implementation files and sibling skills were not included.

SKILL.md names ai@6.0.298, @ai-sdk/react@3.0.301, zod@4.6.5, React 19 and TypeScript 5.9 as its claimed check configuration. Those compatibility claims were not independently verified. No commands, model calls or application examples were executed.

Access & freshness

Costs

The MIT licence grants permission to use and redistribute the covered material free of charge. The supplied files give no prices for a coding assistant, model provider, gateway, hosting or external MCP service. Total operating cost is unknown.

The workflow reference notes that additional routing, worker or evaluator stages add model calls and latency. The core reference distinguishes totalUsage from final-step usage, which matters when an application accounts for multi-step model consumption. No monetary estimates or cost benchmarks are supplied.

Rights

The repository-root MIT licence names copyright holder laguagu, dated 2026. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notice accompany copies or substantial portions. It also disclaims warranties and liability.

This notice supports redistribution of the captured skill material with the required notice. It does not establish the terms for SDK dependencies, model services or separately linked documentation. Licence source: [https://raw.githubusercontent.com/laguagu/claude-code-nextjs-skills/b84dc5df467ce6c21e96f5266f8a3889c060e827/LICENSE].

Freshness

The supplied snapshot was captured on 16 November 2026 at repository revision b84dc5df467ce6c21e96f5266f8a3889c060e827. The fixed source folder is [https://github.com/laguagu/claude-code-nextjs-skills/tree/b84dc5df467ce6c21e96f5266f8a3889c060e827/skills/ai-sdk-6]. File modification dates and subsequent repository changes are unknown.

The instructions explicitly anticipate documentation drift between v6 and newer code. Their fallback documentation tag is ai@6.0.297, while the example's named configuration uses ai@6.0.298. Compatibility should therefore be resolved against the application's actual release.

Actions

Start by confirming that the target application resolves ai@6, then obtain the complete folder and licence notice. Match provider and UI packages to the existing dependency set, consult the relevant installed documentation and replace sample model configuration with the application's actual provider configuration.

Before deployment, typecheck changes and exercise the relevant multi-turn streaming, tool, approval and error paths. For approval-enabled tools, verify trusted server authorization and the applicable minor-version behavior. For stored chats or MCP connections, also check history validation, cancellation and cleanup. These are recommended validation steps; their outcomes remain unknown.

Evidence for this report

LICENSEnotice · checked 2026-11-16
skills/ai-sdk-6/SKILL.mdselected · checked 2026-11-16
skills/ai-sdk-6/references/agents.mdselected · checked 2026-11-16
skills/ai-sdk-6/references/core-functions.mdselected · checked 2026-11-16
skills/ai-sdk-6/references/examples.mdselected · checked 2026-11-16
skills/ai-sdk-6/references/mcp.mdselected · checked 2026-11-16
skills/ai-sdk-6/references/middleware.mdselected · checked 2026-11-16
skills/ai-sdk-6/references/tools.mdselected · checked 2026-11-16
skills/ai-sdk-6/references/ui-hooks.mdselected · checked 2026-11-16
skills/ai-sdk-6/references/workflows.mdselected · checked 2026-11-16