tanstack-ai-migration — скилл для Claude Code
Скилл tanstack-ai-migration для Claude Code переносит проект на TanStack AI с Vercel AI SDK или обновляет версию 0.x до 1.0. Запускается при смене библиотек ИИ или обновлении пакетов.
MIT 505 установок ★ 3 377 обновлён 2026-11-16
npx skills add TanStack/ai --skill tanstack-ai-migration -a claude-codeЧто делает tanstack-ai-migration
Скилл автоматизирует переход между версиями и библиотеками искусственного интеллекта. Помогает заменить вызовы streamText и generateText на единый метод chat(), перенести хуки и задействовать встроенные ответы.
Пакет требует проверки текущей версии пакета через node и запуска скриптов миграции. Для переименований используется jscodeshift с предварительным просмотром изменений через флаг --dry --print.
Инструмент сопоставляет старые адаптеры вроде createOpenAI с древовидно-удаляемыми аналогами и обновляет устаревшие пакеты интерфейса. Применяется при возникновении ошибок сборки, устаревших опциях или несовпадении сигнатур адаптеров.
Какие задачи решает
- перенести проект с Vercel AI SDK на TanStack AI
- обновить пакеты TanStack AI с версии 0.x до 1.0
- запустить трансформацию кода через jscodeshift
- заменить стриминг и генерацию текстов на метод chat
Примеры запросов агенту
- Перенеси проект с Vercel AI SDK на TanStack AI
- Обнови зависимости TanStack AI с версии 0.x до 1.0
- Запусти кодемод для исправления устаревших опций
Как установить tanstack-ai-migration
1Через Skills CLI (Vercel)
npx skills add TanStack/ai --skill tanstack-ai-migration -a claude-code2Вручную: положить файлы
~/.claude/skills/tanstack-ai-migration/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/tanstack-ai-migration/
1Через Skills CLI (Vercel)
npx skills add TanStack/ai --skill tanstack-ai-migration -a codex2Вручную: положить файлы
.agents/skills/tanstack-ai-migration/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add TanStack/ai --skill tanstack-ai-migration -a cursor2Вручную: положить файлы
.cursor/skills/tanstack-ai-migration/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install TanStack/ai skills/tanstack-ai-migration2Вручную: положить файлы
.github/skills/tanstack-ai-migration/SKILL.md1Через Skills CLI (Vercel)
npx skills add TanStack/ai --skill tanstack-ai-migration -a gemini-cli2Командой платформы
gemini skills install https://github.com/TanStack/ai --path skills/tanstack-ai-migrationВручную: положить файлы
.devin/skills/tanstack-ai-migration/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add TanStack/ai --skill tanstack-ai-migration -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о tanstack-ai-migration
Как установить tanstack-ai-migration в Claude Code?
Выполните команду npx skills add TanStack/ai --skill tanstack-ai-migration -a claude-code, затем используйте файл скилла по пути ~/.claude/skills/tanstack-ai-migration/SKILL.md.
Что делает tanstack-ai-migration?
Переносит приложения на TanStack AI с других библиотек и автоматизирует обновление версий до 1.0.
Что нужно для работы tanstack-ai-migration?
Для работы требуется среда Node.js и установленный пакет jscodeshift для выполнения миграций кода.
Исходный текст
SKILL.md · MIT
---
name: tanstack-ai-migration
description: >
Move an app to TanStack AI from the Vercel AI SDK or raw provider SDKs, or
upgrade it from TanStack AI 0.x to 1.0. Use when someone asks
whether to switch AI libraries, when code mixes streamText, generateText,
generateObject, createOpenAI, or @ai-sdk/* with TanStack AI, when an upgrade
breaks, or when someone hits a renamed option, a deprecated -ui package, or an
old adapter shape. Triggers on "migrate", "switch from Vercel AI SDK",
"ai-sdk", "streamText", "upgrade TanStack AI", "deprecated",
"breaking change", "codemod".
---
# Migrating to TanStack AI
Two different jobs. Pick the one that matches the code in front of you.
## Coming from another SDK
The name-by-name mapping lives in the docs, and it is longer than any summary
that fits here:
https://tanstack.com/ai/latest/docs/migration/migration-from-vercel-ai
The shape of the change:
- `streamText` and `generateText` become one `chat()` call with a streaming
option.
- `createOpenAI(...)` becomes a tree-shakeable adapter, such as `openaiText()`
from `@tanstack/ai-openai`.
- `onFinish` and friends become middleware hooks.
- Manual SSE wiring becomes the built-in response helpers.
- `generateObject` becomes structured outputs on `chat()`.
Read the guide, then load the target API's own skill with
`npx @tanstack/intent@latest load @tanstack/ai#ai-core`. Do not port from memory: a half-remembered mapping produces
code that type-checks in neither SDK.
## Upgrading TanStack AI itself
Start with the version the app has, and the current release:
```bash
node -p "require('@tanstack/ai/package.json').version"
npm view @tanstack/ai version
```
Then read the guides for what changed:
- https://tanstack.com/ai/latest/docs/migration/v1 (0.x to 1.0)
- https://tanstack.com/ai/latest/docs/migration/migration
- https://tanstack.com/ai/latest/docs/migration/ag-ui-compliance
- https://tanstack.com/ai/latest/docs/migration/sampling-options-to-model-options
1.0 removes every API that 0.x marked as deprecated. Each one has a
replacement that already shipped in 0.x, so you can move to the replacements
on 0.x first, then bump every `@tanstack/ai*` package to 1.0 together.
## Codemods
Some renames have a jscodeshift transform. Run it straight from the repo, and
preview first with `--dry --print`:
```bash
npx jscodeshift \
-t https://raw.githubusercontent.com/TanStack/ai/main/codemods/ag-ui-compliance/transform.ts \
--dry --print src/
```
Each guide names the codemod that covers it, and what the codemod cannot reach.
Server-side rewrites are usually manual.
## After the port
Run the project's type checker. Most errors after a migration come from an API
that was remembered rather than read, so check the failing name against
`node_modules/@tanstack/ai/src/` before changing it again.
© TanStack · MIT · TanStack/ai