
Update
Methodically migrate an app from AI SDK v4 or v5 to v6 with agent-assisted research, planning, execution, and verification.
Install
npx skills add https://github.com/assistant-ui/skills --skill updateWhat is this skill?
- Six-phase migration workflow: deep research, detailed plan, execute, build verify, test verify, final verification
- Covers v4.x→v6.x and v5.x→v6.x with official migration guide alignment
- Documents core breaking changes: streaming architecture, structured output, tool system, provider-specific deltas
- Includes assistant-ui-specific migration notes and complete before/after examples
- Provides rollback plan, package update checklist, and optional automated migration path
Adoption & trust: 1.6k installs on skills.sh; 16 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Build integrations is primary because the work rewires provider APIs, streaming, tools, and assistant-ui bindings in application code. Integrations subphase reflects AI SDK, React UI, streaming, and tool-system breaking changes—not greenfield ideation.
Common Questions / FAQ
Is Update safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Update
# AI SDK v6 Migration Migrate a codebase from AI SDK v4 or v5 to v6. This is a methodical, careful process using agents. Do not rush. Verify everything. **Covers:** v4.x → v6.x, v5.x → v6.x **Official docs:** https://ai-sdk.dev/docs/migration-guides/migration-guide-6-0 --- ## Contents - [Critical Rules](#critical-rules) - [Phase 1: Deep Research (Use Agents)](#phase-1-deep-research-use-agents) - [Phase 2: Create Detailed Migration Plan](#phase-2-create-detailed-migration-plan) - [Phase 3: Execute Migration](#phase-3-execute-migration) - [Phase 4: Build Verification](#phase-4-build-verification) - [Phase 5: Test Verification](#phase-5-test-verification) - [Phase 6: Final Verification](#phase-6-final-verification) - [Rollback Plan](#rollback-plan) - [Package Updates](#package-updates) - [Automated Migration](#automated-migration) - [Core Breaking Changes](#core-breaking-changes) - [UI & React Changes](#ui--react-changes) - [Tool System Changes](#tool-system-changes) - [Streaming Architecture](#streaming-architecture) - [Structured Output Changes](#structured-output-changes) - [Provider-Specific Changes](#provider-specific-changes) - [assistant-ui Specific Changes](#assistant-ui-specific-changes) - [Complete Migration Examples](#complete-migration-examples) - [Environment Configuration](#environment-configuration) - [Test Utilities](#test-utilities) - [New Utilities in v6](#new-utilities-in-v6) - [v4-Specific Changes (v4 → v6 Direct Migration)](#v4-specific-changes-v4--v6-direct-migration) - [Migration Checklist](#migration-checklist) ## Critical Rules 1. **NEVER make changes without reading files first** - Always read the full file before editing 2. **NEVER guess** - If unsure, search the codebase or ask the user 3. **ALWAYS verify after changes** - Run type check after each file modification 4. **USE AGENTS for research** - Spawn Explore agents for thorough codebase analysis 5. **TRACK EVERYTHING** - Use TodoWrite to track every file and change 6. **ONE CHANGE AT A TIME** - Make atomic changes, verify, then proceed 7. **REFERENCE THE GUIDE** - The complete migration guide is embedded below - consult it for every change --- ## Phase 1: Deep Research (Use Agents) **STOP. Do not skip this phase. Thorough research prevents mistakes.** ### 1.1 Spawn Research Agent for AI SDK Patterns Use Task tool with `subagent_type: "Explore"` and `model: "opus"`: ``` Thoroughly search this codebase for ALL AI SDK usage. Find EVERY instance of: IMPORTS TO FIND: - import from "ai" - import from "@ai-sdk/*" - import from "@assistant-ui/react-ai-sdk" PATTERNS TO FIND: - useChat hook usage - streamText / generateText calls - generateObject / streamObject calls - convertToCoreMessages calls - CoreMessage / Message types - maxSteps configuration - tool definitions (look for parameters:, execute:) - addToolResult calls - textEmbedding / textEmbeddingModel - Experimental_Agent - toDataStreamResponse For EACH finding, report: - Exact file path - Line numbers - The actual code snippet - What v6 change applies to it Be exhaustive. Missing something causes migration failures. ``` ### 1.2 Spawn Research Agent for Package Analysis Use Task tool with `subagent_type: "Explore"`: ``` Find and analyze all package.json files in this repository. For each package.json, extract: 1. Current versions of: ai, @ai-sdk/*, zod, @assistant-ui/* 2. The package manager (look for pnpm-lock.yaml, yarn.lock, package-lock.json) 3. Test scripts (test, test:watch, etc.) 4. Build scripts Report the exact current versions vs required v6 versions. ``` ### 1.3 Spawn Research Agent for Test Infrastructure Use Task tool with `subagent_type: "Explore"`: ``` Find the test infrastructure in this codebase: 1. Test framework (vitest, jest, etc.) 2. Test file locations and patterns 3. Any AI SDK test mocks (MockLanguageModelV2, etc.) 4. The exact command to run tests 5. Any test configuration files ``` ### 1.4 Compile Research Results After ALL agents complete, creat