Skip to content

laguagu/claude-code-nextjs-skills / skills/ai-sdk-6

ai-sdk-6

Verified

Vercel AI SDK v6 development, for projects already on ai@6. Use when building or maintaining AI agents, chatbots, tool integrations, streaming apps, or structured output in a v6 codebase. New projects and ai@7 code use ai-sdk-7; an unknown version goes through ai-sdk. Covers ToolLoopAgent, useChat, generateText, streamText, tool approval, provider tools, MCP integration, and Output patterns.

FileKindSize
SKILL.mdskill md5.1 KB
references/agents.mdmarkdown1.0 KB
references/core-functions.mdmarkdown1.1 KB
references/examples.mdmarkdown787 B
references/mcp.mdmarkdown1009 B
references/middleware.mdmarkdown1.0 KB
references/tools.mdmarkdown1.9 KB
references/ui-hooks.mdmarkdown1.9 KB
references/workflows.mdmarkdown831 B

references/agents.md

View on GitHub
# AI SDK 6 agents

Use `ToolLoopAgent` for a reusable in-memory tool loop. It takes
`instructions`, unlike v6 text functions' `system` option. Configure
`stopWhen` with `stepCountIs` for the task's budget.

Agent construction describes the reusable policy; per-call options describe
request-specific data. Verify the installed `callOptionsSchema` /
`prepareCall` signatures rather than copying v7 runtime/tool context options.
Do not put credentials or authorization decisions in model-controlled input.

`prepareStep` can adjust active tools, messages and settings. In v6 its
instruction/message overrides are step-local; v7 changes their carry-forward
semantics.

Use `createAgentUIStreamResponse` with `uiMessages` for an SDK UI route.
Validate/authenticate before execution and infer the agent's UI message type.
In-memory execution does not make a run durable across restarts.

Find details in the installed agent docs and `ToolLoopAgent` source or the
[v6 agent guide](https://github.com/vercel/ai/blob/ai%406.0.297/content/docs/03-agents/02-building-agents.mdx).
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall