laguagu/claude-code-nextjs-skills/ai-sdk-7
- community
Checking that the SKILL.md file is still in the repository.
Vercel AI SDK v7 development and migration. Use when building or upgrading AI SDK 7 apps, especially ToolLoopAgent, WorkflowAgent, HarnessAgent, Claude Code/Codex/Pi harnesses, runtimeContext, toolsContext, toolApproval, telemetry, reasoning, file or skill uploads, realtime, video generation, or v6-to-v7 breaking changes. For AI SDK v6 code use ai-sdk-6; for version discovery and general doc lookup use ai-sdk.
Install
npx vskill@latest install laguagu/claude-code-nextjs-skills/ai-sdk-7SKILL.md
AI SDK 7 implementation and migration
Apply this skill to ai@7; use ai-sdk to resolve unknown versions and ai-sdk-6 for v6 maintenance. Match provider and UI package versions to the project. AI SDK 7 requires Node.js 22+ and AI SDK packages are ESM-only.
Read the resolved ai/docs/, provider docs and installed source/types first; each ai-sdk.dev/docs/... link in this skill has an offline copy under ai/docs/ (path mapping in ai-sdk). Harness, WorkflowAgent and migration guides live in ai/docs/03-ai-sdk-harnesses/, 03-agents/07-workflow-agent.mdx and 08-migration-guides/23-migration-guide-7-0.mdx; the companion packages ship only types. Use official docs or the matching repository tag when local docs are unavailable. Experimental package APIs need a fresh check before adding long-lived wrappers.
| Need | Entry point | |
|---|---|---|
| In-memory agent loop | ToolLoopAgent from ai | |
| Durable agent | WorkflowAgent from @ai-sdk/workflow + workflow 5 | |
| Claude Code/Codex/Pi runtime | HarnessAgent from @ai-sdk/harness/agent + adapter + sandbox package | |
| OpenTelemetry | registerTelemetry(new OpenTelemetry()), @ai-sdk/otel | |
| Stalled calls | timeout: ms or { totalMs, stepMs, firstChunkMs, chunkMs, toolMs } |
Important boundaries
- Text functions and ToolLoopAgent use
instructions; loop limits use
isStepCount. Core, agent and server UI-stream helpers use onEnd/onStepEnd (onFinish remains a deprecated alias); client useChat/Chat keeps onFinish.
prepareStepinstruction/message overrides carry forward. Results such as
usage and tool arrays aggregate all steps; finalStep preserves final-step access, and is awaited for streams.
- Use
runtimeContextfor server loop state and schema-validated
toolsContext for per-tool state. Neither is model-visible merely by being context.
- Approval, persistence and lifecycle differ across ToolLoopAgent,
WorkflowAgent, HarnessAgent and provider-executed tools. Choose the runtime for the actual durability/permission requirements.
- Resolve model IDs and capabilities from the configured provider. Avoid
overlapping reasoning settings: provider options can override top-level reasoning.
Core shape
Checked with ai@7.0.124, @ai-sdk/react@4.0.127, zod@4.6.5, React 19 and TypeScript 5.9: tsc --noEmit, plus a mock-model run through one tool step and the follow-up answer. A string model resolves through the AI Gateway.
The v6 spellings (system, stepCountIs, result.toUIMessageStreamResponse()) still compile in 7.0.124; system and the response method are deprecated.
Read for the feature
- Agents: in-memory/durable execution and context.
- Harnesses: runtime-owned sessions and permissions.
- Core functions: output, stream and result contracts.
- Tools: approval boundaries, MCP Apps and sandbox handles.
- UI hooks: UI streams, approval and resumption.
- Migration: semantic changes and codemods.
- Telemetry: registration and data controls.
- Media/files: provider references and capability gates.
- Examples: current official implementations.
Typecheck and exercise the changed multi-turn, tool, stream or resume path. A successful compile does not prove approval policy or persistence behavior.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ai-sdk-7/SKILL.md
Popularity
- Repository stars
- 68
- Repository forks
- 18
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/laguagu/claude-code-nextjs-skills/ai-sdk-7)