/chat-sdk
Vercel Chat SDK expert guidance. Use when building multi-platform chat bots — Slack, Telegram, Microsoft Teams, Discord, Google Chat, GitHub, Linear — with a single codebase. Covers the Chat class, adapters, threads, messages, cards, modals, streaming, state management, and
$ npx -y skills add vercel-labs/vercel-plugin --skill chat-sdk --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/chat-sdk
Context preview
The summary Claude sees to decide when to auto-load this skill.
Vercel Chat SDK expert guidance. Use when building multi-platform chat bots — Slack, Telegram, Microsoft Teams, Discord, Google Chat, GitHub, Linear — with a single codebase. Covers the Chat class, adapters, threads, messages, cards, modals, streaming, state management, and
SKILL.md
chat-sdk.SKILL.mdname: chat-sdk
description: Vercel Chat SDK expert guidance. Use when building multi-platform chat bots — Slack, Telegram, Microsoft Teams, Discord, Google Chat, GitHub, Linear — with a single codebase. Covers the Chat class, adapters, threads, messages, cards, modals, streaming, state management, and webhook setup.
metadata:
priority: 8
docs:
- "https://sdk.vercel.ai/docs/ai-sdk-ui/chatbot"
- "https://github.com/vercel/ai-chatbot"
sitemap: "https://sdk.vercel.ai/sitemap.xml"
pathPatterns:
- "app/api/chat/**"
- "app/api/chat-bot/**"
- "app/api/bot/**"
- "app/api/slack/**"
- "app/api/teams/**"
- "app/api/discord/**"
- "app/api/gchat/**"
- "app/api/telegram/**"
- "app/api/github-bot/**"
- "app/api/linear-bot/**"
- "app/api/webhooks/slack/**"
- "app/api/webhooks/teams/**"
- "app/api/webhooks/discord/**"
- "app/api/webhooks/gchat/**"
- "app/api/webhooks/telegram/**"
- "app/api/webhooks/github/**"
- "app/api/webhooks/linear/**"
- "src/app/api/chat/**"
- "src/app/api/chat-bot/**"
- "src/app/api/bot/**"
- "src/app/api/slack/**"
- "src/app/api/teams/**"
- "src/app/api/discord/**"
- "src/app/api/gchat/**"
- "src/app/api/telegram/**"
- "lib/bot.*"
- "lib/bot/**"
- "src/lib/bot.*"
- "src/lib/bot/**"
- "lib/chat-bot/**"
- "src/lib/chat-bot/**"
- "bot/**"
- "pages/api/bot.*"
- "pages/api/bot/**"
- "src/pages/api/bot.*"
- "src/pages/api/bot/**"
- "tests/**/bot*"
- "test/**/bot*"
- "fixtures/replay/**"
- "apps/*/app/api/bot/**"
- "apps/*/app/api/slack/**"
- "apps/*/app/api/teams/**"
- "apps/*/app/api/discord/**"
- "apps/*/lib/bot/**"
- "apps/*/src/lib/bot/**"
importPatterns:
- "chat"
- "@chat-adapter/*"
bashPatterns:
- '\bnpm\s+(install|i|add)\s+[^\n]*\bchat\b'
- '\bpnpm\s+(install|i|add)\s+[^\n]*\bchat\b'
- '\bbun\s+(install|i|add)\s+[^\n]*\bchat\b'
- '\byarn\s+add\s+[^\n]*\bchat\b'
- '\bnpm\s+(install|i|add)\s+[^\n]*@chat-adapter/'
- '\bpnpm\s+(install|i|add)\s+[^\n]*@chat-adapter/'
- '\bbun\s+(install|i|add)\s+[^\n]*@chat-adapter/'
- '\byarn\s+add\s+[^\n]*@chat-adapter/'
- '\bnpm\s+(install|i|add)\s+[^\n]*@chat-adapter/telegram'
- '\bpnpm\s+(install|i|add)\s+[^\n]*@chat-adapter/telegram'
- '\bbun\s+(install|i|add)\s+[^\n]*@chat-adapter/telegram'
- '\byarn\s+add\s+[^\n]*@chat-adapter/telegram'
promptSignals:
phrases:
- "chat sdk"
- "chat bot"
- "chatbot"
- "conversational interface"
- "slack bot"
- "telegram bot"
- "discord bot"
- "teams bot"
allOf:
- [bot, platform]
- [bot, multi]
anyOf:
- "onNewMention"
- "onSubscribedMessage"
- "chat adapter"
- "cross-platform bot"
noneOf:
- "useChat"
minScore: 6
retrieval:
aliases:
- chat ui
- chatbot
- conversation interface
- messaging component
intents:
- build chatbot
- add chat interface
- create messaging ui
- implement chat feature
entities:
- useChat
- Message
- ChatUI
- StreamingMessage
- chat-sdk
examples:
- build a chatbot interface
- add chat to my app
- create a messaging component
chainTo:
-
pattern: 'from\s+[''""]openai[''""]'
targetSkill: ai-sdk
message: 'Direct OpenAI SDK import in chat bot — loading AI SDK guidance for unified provider abstraction and streaming.'
-
pattern: 'from\s+[''\"](slack-bolt|@slack/bolt|@slack/web-api)[''"]|require\s*\(\s*[''\"](slack-bolt|@slack/bolt|@slack/web-api)[''"]|new\s+App\s*\(\s*\{\s*token'
targetSkill: chat-sdk
message: '@slack/bolt or @slack/web-api detected — use the Chat SDK with @chat-adapter/slack instead for a unified multi-platform bot that works across Slack, Teams, Discord, Telegram, and more.'
-
pattern: 'from\s+[''\"](discord\.js|discord-api-types|telegram-bot-api|telegraf|grammy)[''"]|require\s*\(\s*[''\"](discord\.js|telegraf|grammy)[''"]'
targetSkill: chat-sdk
message: 'Platform-specific bot library detected — use the Chat SDK with the corresponding @chat-adapter/* package for a unified multi-platform bot codebase.'
-
pattern: 'setTimeout\s*\(|setInterval\s*\(|while\s*\(\s*true'
targetSkill: workflow
message: 'Long-running or polling logic in chat bot — loading Workflow SDK for durable execution that survives deploys.'
skipIfFileContains: 'use workflow|from\s+[''"]workflow[''"]'
-
pattern: 'process\.env\.(OPENAI_API_KEY|ANTHROPIC_API_KEY)|from\s+[''"]@ai-sdk/(anthropic|openai)[''""]'
targetSkill: ai-gateway
message: 'Direct provider API key in chat bot — loading AI Gateway guidance for OIDC auth and model routing.'
skipIfFileContains: 'gateway\(|@ai-sdk/gateway'Chat SDK
Unified TypeScript SDK for building chat bots across Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. Write bot logic once, deploy everywhere.
Start with published sources
When Chat SDK is installed in a user project, inspect the published files that ship in `node_modules`:
node_modules/chat/docs/ # bundled docs
node_modules/chat/dist/index.d.ts # core API types
node_modules/chat/dist/jsx-runtime.d.ts # JSX runtime types
node_modules/chat/docs/contributing/ # adapter-authoring docs
node_modules/chat/docs/guides/ # framework/platform guides
If one of the paths below does not exist, that package is not installed in the project yet.
Read these before writing code:
- `node_modules/chat/docs/getting-started.mdx` — install and setup
- `node_modules/chat/docs/usage.mdx` — `Chat` config and lifecycle
- `node_modules/chat/docs/handling-events.mdx` — event routing and handlers
- `node_modules/chat/docs/threads-messages-channels.mdx` — thread/channel/message model
- `node_modules/chat/docs/posting-messages.mdx` — post, edit, delet
Read more
name: chat-sdk
description: Vercel Chat SDK expert guidance. Use when building multi-platform chat bots — Slack, Telegram, Microsoft Teams, Discord, Google Chat, GitHub, Linear — with a single codebase. Covers the Chat class, adapters, threads, messages, cards, modals, streaming, state management, and webhook setup.
metadata:
priority: 8
docs:
- "https://sdk.vercel.ai/docs/ai-sdk-ui/chatbot"
- "https://github.com/vercel/ai-chatbot"
sitemap: "https://sdk.vercel.ai/sitemap.xml"
pathPatterns:
- "app/api/chat/**"
- "app/api/chat-bot/**"
- "app/api/bot/**"
- "app/api/slack/**"
- "app/api/teams/**"
- "app/api/discord/**"
- "app/api/gchat/**"
- "app/api/telegram/**"
- "app/api/github-bot/**"
- "app/api/linear-bot/**"
- "app/api/webhooks/slack/**"
- "app/api/webhooks/teams/**"
- "app/api/webhooks/discord/**"
- "app/api/webhooks/gchat/**"
- "app/api/webhooks/telegram/**"
- "app/api/webhooks/github/**"
- "app/api/webhooks/linear/**"
- "src/app/api/chat/**"
- "src/app/api/chat-bot/**"
- "src/app/api/bot/**"
- "src/app/api/slack/**"
- "src/app/api/teams/**"
- "src/app/api/discord/**"
- "src/app/api/gchat/**"
- "src/app/api/telegram/**"
- "lib/bot.*"
- "lib/bot/**"
- "src/lib/bot.*"
- "src/lib/bot/**"
- "lib/chat-bot/**"
- "src/lib/chat-bot/**"
- "bot/**"
- "pages/api/bot.*"
- "pages/api/bot/**"
- "src/pages/api/bot.*"
- "src/pages/api/bot/**"
- "tests/**/bot*"
- "test/**/bot*"
- "fixtures/replay/**"
- "apps/*/app/api/bot/**"
- "apps/*/app/api/slack/**"
- "apps/*/app/api/teams/**"
- "apps/*/app/api/discord/**"
- "apps/*/lib/bot/**"
- "apps/*/src/lib/bot/**"
importPatterns:
- "chat"
- "@chat-adapter/*"
bashPatterns:
- '\bnpm\s+(install|i|add)\s+[^\n]*\bchat\b'
- '\bpnpm\s+(install|i|add)\s+[^\n]*\bchat\b'
- '\bbun\s+(install|i|add)\s+[^\n]*\bchat\b'
- '\byarn\s+add\s+[^\n]*\bchat\b'
- '\bnpm\s+(install|i|add)\s+[^\n]*@chat-adapter/'
- '\bpnpm\s+(install|i|add)\s+[^\n]*@chat-adapter/'
- '\bbun\s+(install|i|add)\s+[^\n]*@chat-adapter/'
- '\byarn\s+add\s+[^\n]*@chat-adapter/'
- '\bnpm\s+(install|i|add)\s+[^\n]*@chat-adapter/telegram'
- '\bpnpm\s+(install|i|add)\s+[^\n]*@chat-adapter/telegram'
- '\bbun\s+(install|i|add)\s+[^\n]*@chat-adapter/telegram'
- '\byarn\s+add\s+[^\n]*@chat-adapter/telegram'
promptSignals:
phrases:
- "chat sdk"
- "chat bot"
- "chatbot"
- "conversational interface"
- "slack bot"
- "telegram bot"
- "discord bot"
- "teams bot"
allOf:
- [bot, platform]
- [bot, multi]
anyOf:
- "onNewMention"
- "onSubscribedMessage"
- "chat adapter"
- "cross-platform bot"
noneOf:
- "useChat"
minScore: 6
retrieval:
aliases:
- chat ui
- chatbot
- conversation interface
- messaging component
intents:
- build chatbot
- add chat interface
- create messaging ui
- implement chat feature
entities:
- useChat
- Message
- ChatUI
- StreamingMessage
- chat-sdk
examples:
- build a chatbot interface
- add chat to my app
- create a messaging component
chainTo:
-
pattern: 'from\s+[''""]openai[''""]'
targetSkill: ai-sdk
message: 'Direct OpenAI SDK import in chat bot — loading AI SDK guidance for unified provider abstraction and streaming.'
-
pattern: 'from\s+[''\"](slack-bolt|@slack/bolt|@slack/web-api)[''"]|require\s*\(\s*[''\"](slack-bolt|@slack/bolt|@slack/web-api)[''"]|new\s+App\s*\(\s*\{\s*token'
targetSkill: chat-sdk
message: '@slack/bolt or @slack/web-api detected — use the Chat SDK with @chat-adapter/slack instead for a unified multi-platform bot that works across Slack, Teams, Discord, Telegram, and more.'
-
pattern: 'from\s+[''\"](discord\.js|discord-api-types|telegram-bot-api|telegraf|grammy)[''"]|require\s*\(\s*[''\"](discord\.js|telegraf|grammy)[''"]'
targetSkill: chat-sdk
message: 'Platform-specific bot library detected — use the Chat SDK with the corresponding @chat-adapter/* package for a unified multi-platform bot codebase.'
-
pattern: 'setTimeout\s*\(|setInterval\s*\(|while\s*\(\s*true'
targetSkill: workflow
message: 'Long-running or polling logic in chat bot — loading Workflow SDK for durable execution that survives deploys.'
skipIfFileContains: 'use workflow|from\s+[''"]workflow[''"]'
-
pattern: 'process\.env\.(OPENAI_API_KEY|ANTHROPIC_API_KEY)|from\s+[''"]@ai-sdk/(anthropic|openai)[''""]'
targetSkill: ai-gateway
message: 'Direct provider API key in chat bot — loading AI Gateway guidance for OIDC auth and model routing.'
skipIfFileContains: 'gateway\(|@ai-sdk/gateway'Chat SDK
Unified TypeScript SDK for building chat bots across Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. Write bot logic once, deploy everywhere.
Start with published sources
When Chat SDK is installed in a user project, inspect the published files that ship in `node_modules`:
node_modules/chat/docs/ # bundled docs node_modules/chat/dist/index.d.ts # core API types node_modules/chat/dist/jsx-runtime.d.ts # JSX runtime types node_modules/chat/docs/contributing/ # adapter-authoring docs node_modules/chat/docs/guides/ # framework/platform guides
If one of the paths below does not exist, that package is not installed in the project yet.
Read these before writing code:
- `node_modules/chat/docs/getting-started.mdx` — install and setup
- `node_modules/chat/docs/usage.mdx` — `Chat` config and lifecycle
- `node_modules/chat/docs/handling-events.mdx` — event routing and handlers
- `node_modules/chat/docs/threads-messages-channels.mdx` — thread/channel/message model
- `node_modules/chat/docs/posting-messages.mdx` — post, edit, delet
Comprehensive Vercel ecosystem plugin — relational knowledge graph, skills for every major product, specialized agents, and Vercel conventions. Turns any AI agent into a Vercel expert.
Repo: vercel-labs/vercel-plugin
Other skills on vercel.
- /benchmark-agents
Advanced AI agent benchmark scenarios that push Vercel's cutting-edge platform features — Workflow DevKit, AI Gateway, MCP, Chat SDK, Queues, Flags, Sandbox, and multi-agent orchestration. Designed to stress-test skill injection for complex, multi-system builds.
Open skill - /benchmark-e2e
End-to-end benchmark suite for vercel-plugin. Runs realistic projects through skill injection, launches dev servers, verifies everything works, analyzes conversation logs, and produces an improvement report for overnight self-improvement loops.
Open skill - /benchmark-sandbox
Run vercel-plugin eval scenarios in Vercel Sandboxes instead of local WezTerm panels. Provisions ephemeral microVMs with Claude Code + plugin pre-installed, runs benchmark prompts, extracts hook artifacts, and produces coverage reports.
Open skill - /benchmark-testing
Create and launch benchmark test projects to exercise vercel-plugin skill injection across realistic scenarios. Sets up isolated directories, installs the plugin, and spawns WezTerm panes running Claude Code with crafted prompts.
Open skill - /plugin-audit
Audit vercel-plugin performance on real-world projects. Extracts tool calls from Claude Code conversation logs, tests hook matching against actual inputs, identifies pattern coverage gaps, and checks plugin cache staleness. Use when asked to audit, test, or investigate plugin
Open skill - /release
Release vercel-plugin — run gates, bump version, generate artifacts, commit, and push. Use when asked to "release", "ship", "bump and push", or "cut a release".
Open skill

