Skills

Chat SDK: deploy one logic path to many chat platforms

Use this when you want TypeScript to talk to several chat platforms at once. First npm i chat, then add an adapter per platform, and do not send outbound messages on the first try.

Official source · Chat SDK

Install

npm i chat

Who it's for

Use Chat SDK when you want the same TypeScript logic to power chatbots on Slack, Microsoft Teams, Google Chat, Discord, Telegram, GitHub, Linear, WhatsApp, and similar platforms. It emphasizes writing the bot logic once and deploying it everywhere, not writing a separate unnamed framework for each platform.

A better fit is when you plan to install the core package in a Node / TypeScript project and then install the matching platform adapter. The material does not treat these platforms as a mutually exclusive list; it continues with and more. The official guide page is

https://github.com/vercel/chat

First try in 3 minutes

The recommended first path is the core package install. Do not start three installers at once:

npm i chat

Prerequisite: npm is already on this machine. This command changes package.json and node_modules; confirm the current directory is your bot project first. After install, do a read-only check: write the imports from the material in a script; do not connect a real workspace yet, and do not send outbound messages.

import { Chat } from "chat";
import { createSlackAdapter } from "@chat-adapter/slack";
import { createRedisState } from "@chat-adapter/state-redis";

Success signal: the core package can be imported. Adapters need a further per-platform install; the excerpt states Install one or more adapters for your platforms; the summary names, for example, @chat-adapter/slack. If an adapter import fails, stop at the missing dependency; do not invent other package names.

The same page also shows npx skills add vercel/chat and npx create-chat-sdk@latest my-bot. Do not run the scaffold in parallel on the first try; that generates project files, so you must first confirm the directory name my-bot will not overwrite an existing folder.

Use cases

Case 1: Wire Slack into an existing TypeScript project. First npm i chat, then install the Slack adapter, then assemble an instance with Chat, createSlackAdapter, and createRedisState. The summary also mentions handling onNewMention and onSubscribedMessage, but the excerpt does not write complete function bodies for those two callbacks, so this case is done when import and assembly succeed, not when a reply has already been sent in Slack. Before connecting Redis or registering a webhook, confirm the connection target and route will not write to the wrong environment.

Case 2: Use the official scaffold to create a bot directory. The command is npx create-chat-sdk@latest my-bot. The summary says it generates Chat config, webhook routes, and .env.example. This writes to disk: confirm the my-bot directory does not exist or may be overwritten, then run. Done means the directory was created and you can see the generated files. Do not put fabricated secrets into .env.example beyond any key placeholders, and do not start an outbound service before changing the config. The material does not write environment-variable names, so do not invent them.

Boundaries

The core install is npm i chat; platform capability comes from adapters. The import example only gives the Slack adapter and Redis state. The scaffold and agent skill install appear as other side-by-side entry points; do not mix them with the core package install as a step that must run together.

Do not assume every platform in the list already has a written adapter package name. The material does not give a client list, and does not say how to hit Teams or WhatsApp directly without an adapter installed. Beyond these written install, import, and scaffold commands, this guide does not cover the rest.