chat-sdk · vercel — скилл для Claude Code: что делает и как установить
Помогает создавать мультиплатформенных чат-ботов на TypeScript с помощью Chat SDK от Vercel. Пригодится при настройке логики для Slack, Discord, Telegram или WhatsApp.
npx skills add vercel/chat --skill chat-sdk -a claude-codeЧто делает chat-sdk
Скилл обучает ассистента работать с библиотекой chat и утилитой create-chat-sdk, которая разворачивает проект бота на базе Next.js. Он ориентирует модель в архитектуре адаптеров, обработке вебхуков, упоминаний, интерактивных карточек и потоковых ответов нейросетей.
Внутри собраны ссылки на локальную документацию и готовые руководства в node_modules/chat/resources/guides/. Они описывают связку Chat SDK с Vercel AI Gateway, Workflow SDK, Hono и Redis. Для работы со списком адаптеров без подтягивания тяжёлых зависимостей используется каталог @chat-adapter/catalog, пришедший на смену устаревшему пути chat/adapters.
Если пакет chat ещё не добавлен в репозиторий через npm i chat, агент не сможет прочитать встроенные руководства и шаблоны на диске. Это повод сначала поставить библиотеку.
Какие задачи решает
- развернуть проект бота на Next.js с помощью
create-chat-sdk - подключить адаптеры для Slack, Telegram, Discord или GitHub
- настроить стриминг ответов моделей через AI SDK и Chat SDK
- организовать подтверждение действий через интерактивные карточки в чате
Примеры запросов агенту
- Разверни новый проект бота на Next.js через create-chat-sdk и добавь адаптер для Slack
- Покажи, как настроить подтверждение действий пользователя через Workflow SDK и интерактивные карточки
- Собери бота на Hono и Redis для ревью пуллреквестов в GitHub по упоминанию
Как установить chat-sdk
1Через Skills CLI (Vercel)
npx skills add vercel/chat --skill chat-sdk -a claude-code2Вручную: положить файлы
~/.claude/skills/chat-sdk/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/chat-sdk/
1Через Skills CLI (Vercel)
npx skills add vercel/chat --skill chat-sdk -a codex2Вручную: положить файлы
.agents/skills/chat-sdk/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add vercel/chat --skill chat-sdk -a cursor2Вручную: положить файлы
.cursor/skills/chat-sdk/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install vercel/chat chat-sdk2Вручную: положить файлы
.github/skills/chat-sdk/SKILL.md1Через Skills CLI (Vercel)
npx skills add vercel/chat --skill chat-sdk -a gemini-cli2Командой платформы
gemini skills install https://github.com/vercel/chat --path packages/create-chat-sdk/_template/.claude/skills/chat-sdkВручную: положить файлы
.devin/skills/chat-sdk/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add vercel/chat --skill chat-sdk -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Другие версии chat-sdk
Похожие
Вопросы о chat-sdk
Как установить chat-sdk в Claude Code?
Выполните команду npx skills add vercel/chat --skill chat-sdk -a claude-code в терминале.
Что делает скилл chat-sdk?
Он обучает ассистента архитектуре Chat SDK, помогая писать единый код бота на TypeScript для Slack, Discord, Telegram и других платформ.
Что нужно проекту для чтения встроенных руководств?
Нужно установить библиотеку командой npm i chat. После этого скилл сможет читать документацию и шаблоны из каталога node_modules/chat/resources/.
Исходный текст
SKILL.md · MIT
--- name: chat-sdk description: Build multi-platform chat bots with Chat SDK (`chat` npm package). Use when developers want to scaffold a bot with create-chat-sdk, build a Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, or WhatsApp bot, handle mentions, direct messages, subscribed threads, reactions, slash commands, cards, modals, files, or AI streaming, set up webhook routes or multi-adapter bots, send rich cards or streamed AI responses to chat platforms, or build a custom adapter or state adapter. license: MIT --- # Chat SDK Unified TypeScript SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, Telegram, GitHub, Linear, WhatsApp, and more. Write your bot logic once, deploy everywhere. ## Scaffold a new project Use `create-chat-sdk` to scaffold a basic Next.js bot project without prompts. Run `npx create-chat-sdk --help` to see the available options and how the CLI works. ## Start with Chat SDK documentation When Chat SDK is installed in a user's project, inspect the published docs that ship in `node_modules/chat/docs/`, the resources in `node_modules/chat/resources/`, and the available open source templates in `node_modules/chat/resources/templates.json`. If those paths do not exist, the `chat` package is not installed in the project yet. The user can install it with `npm i chat`. You can also find the docs on the [Chat SDK website](https://chat-sdk.dev/docs) and in the [Vercel knowledge base](https://vercel.com/kb/chat-sdk). ## Available resources <!-- RESOURCES:START --> ### Guides - `node_modules/chat/resources/guides/how-to-build-an-ai-agent-for-slack-with-chat-sdk-and-ai-sdk.md` — Build a Slack AI agent using Chat SDK, AI SDK's ToolLoopAgent, and Vercel AI Gateway. Covers project setup, tool definitions, streaming responses, deployment to Vercel, and scaling tool selection with toolpick. - `node_modules/chat/resources/guides/human-in-the-loop-with-chat-sdk-and-workflow-sdk.md` — Pause durable workflows on Slack approval cards using Chat SDK and Workflow SDK. Uses createWebhook to suspend workflows until a button click, with patterns for multi-stage approvals, timeouts via durable sleep, and approver validation. - `node_modules/chat/resources/guides/liveblocks-chat-sdk-ai-sdk.md` — Build an AI agent that replies to @-mentions in Liveblocks comment threads with streamed responses and tool calling. Uses Chat SDK, the Liveblocks adapter, AI SDK's ToolLoopAgent, and Redis for thread subscriptions and distributed locking. - `node_modules/chat/resources/guides/slack-bot-vercel-blob.md` — Build a Slack bot that lists, reads, uploads, and deletes files in Vercel Blob through tool calls. Uses Chat SDK, AI SDK's ToolLoopAgent, and Files SDK's createFileTools factory with approval-gated write tools and a read-only mode. - `node_modules/chat/resources/guides/run-and-track-deploys-from-slack.md` — Build a Slack deploy bot with Chat SDK and Vercel Workflow. Dispatch GitHub Actions from a slash command, gate production behind approval, poll for completion, and notify Linear and GitHub when the run finishes. - `node_modules/chat/resources/guides/triage-form-submissions-with-chat-sdk.md` — Build a Slack bot that triages form submissions with interactive cards. Forward, edit, or mark as spam without leaving Slack. Built with Chat SDK, Hono, and Resend. - `node_modules/chat/resources/guides/how-to-build-a-slack-bot-with-next-js-and-redis.md` — This guide walks through building a Slack bot with Next.js, covering project setup, Slack app configuration, event handling, interactive features, and deployment. - `node_modules/chat/resources/guides/create-a-discord-support-bot-with-nuxt-and-redis.md` — This guide walks through building a Discord support bot with Nuxt, covering project setup, Discord app configuration, Gateway forwarding, AI-powered responses, and deployment. - `node_modules/chat/resources/guides/ship-a-github-code-review-bot-with-hono-and-redis.md` — This guide walks through building a GitHub bot that reviews pull requests on demand. When a user @mentions the bot on a PR, Chat SDK picks up the mention, spins up a Vercel Sandbox with the repo cloned, and uses AI SDK to analyze the diff. - `node_modules/chat/resources/guides/build-a-slack-bot-with-vercel-connect.md` — Learn how to build your very own Slackbot with Chat SDK and AI SDK. Vercel Connect supplies runtime Slack tokens and forwards triggers, so you never store a long-lived bot token. - `node_modules/chat/resources/guides/vercel-connect.md` — Use Vercel Connect to call provider APIs like Slack, GitHub, and Snowflake from your agents and services with short-lived, user-authorized tokens instead of long-lived secrets. - `node_modules/chat/resources/guides/ai-gateway-and-ai-sdk.md` — Build AI agents on Vercel with AI Gateway and AI SDK, then make them reliable, capable, and durable with Sandbox, Chat SDK, Vercel Connect, and Workflow. - `node_modules/chat/resources/guides/daily-digest-bot-with-chat-sdk-and-workflow-sdk.md` — Create your own daily digest bot that posts a daily digest of GitHub stats to Slack. Learn how to use Vercel Connect to set up Slack and GitHub app securely in your project. ### Templates Listed in `node_modules/chat/resources/templates.json`: - **Chat SDK Liveblocks Bot** — Build a bot that you can engage with inside Liveblocks. (https://vercel.com/templates/next.js/chat-sdk-liveblocks-bot) - **Durable iMessage Agent** — Durable iMessage agent powered by the Sendblue adapter. (https://vercel.com/templates/nitro/durable-imessage-ai-agent) - **Knowledge Agent** — Open source file-system and knowledge based agent template. Build AI agents that stay up to date with your knowledge base. (https://vercel.com/templates/nuxt/chat-sdk-knowledge-agent) - **Community Agent** — Open source AI-powered Slack community management bot with a built-in Next.js admin panel. Uses Chat SDK, AI SDK, and Vercel Workflow. (https://vercel.com/templates/next.js/chat-sdk-community-agent) - **Caltext** — iMessage calorie tracking assistant powered by AI. (https://vercel.com/templates/hono/caltext) <!-- RESOURCES:END --> ## Chat SDK adapters ### Adapter directory See the 'Official Adapters', 'Vendor-Official Adapters', and 'Community Adapters' sections in the [Chat SDK llms.txt file](https://chat-sdk.dev/llms.txt) for the current list of official, vendor-official, and community adapters. ### Adapter catalog package `@chat-adapter/catalog` is a zero-dependency static catalog of official, vendor-official, and community adapters. It replaces the deprecated `chat/adapters` subpath, which still re-exports the original API. Agents can import `listAdapters`, `getCatalogEntry`, `getFeatureSupport`, `ADAPTERS`, `ADAPTER_NAMES`, `getAdapter`, `isAdapterSlug`, `listEnvVars`, `getSecretEnvVars`, and metadata types like `CatalogAdapter`, `CatalogEntry`, and `AdapterSlug` without importing any adapter implementation package. Use it for: - Listing adapter slugs, names, npm packages, maintainers, groups, and platform vs state types. - Checking which capabilities an adapter supports, such as streaming, modals, or distributed locking. - Building setup or onboarding flows that need package names, peer dependencies, and install guidance before any adapter is installed. - Discovering required, optional, and credential-mode environment variables for official and vendor-official adapters, including which variables are secrets. - Keeping adapter docs and metadata aligned with the catalog when adding or updating a listed adapter.
© vercel · MIT · vercel/chat