Build multi-platform chat bots with Chat SDK (chat npm package).

AGPL-3.0Auto-check passedAgent Workflows

Install Chat SDK

skills CLI
$ npx skills add databuddy-analytics/Databuddy --skill chat-sdk -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install databuddy-analytics/Databuddy chat-sdk --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/databuddy-analytics/Databuddy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/chat-sdk .claude/skills/chat-sdk && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
chat-sdk
GitHub stars
1.2k
Token cost
~2.6k tokens
SKILL.md length
776 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Build multi-platform chat bots with Chat SDK (chat npm package).

  • Developers want to build a Slack
  • SKILL.md covers Start with published sources, Available resources, Quick start and Core concepts, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Handle mentions

What it does

Chat SDK is an agent skill from databuddy-analytics/Databuddy. Build multi-platform chat bots with Chat SDK (chat npm package). Use when developers want to 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.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Messaging and chat bots, Hooks and plugins and Webhooks. It works with Slack, GitHub, Discord and Telegram. The repository describes itself as: Open-source product analytics for startups: track visitors, events, funnels, and goals without cookies, and ask Databunny, the built-in AI analyst. Uptime, feature flags, and… The licence is AGPL-3.0.

When your agent uses it

  • Developers want to build a Slack
  • Handle mentions
  • Direct messages
  • Subscribed threads

Example prompts

  • “/chat-sdk”

What it can do on your machine

Read from SKILL.md and the folder at commit fc7eb6b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • vercel.com
    • chat-sdk.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Chat SDK loads about 2.6k tokens when it runs. Until then it costs about 115 tokens; SKILL.md has 776 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from databuddy-analytics/Databuddy at commit fc7eb6b, republished under its AGPL-3.0 licence (© databuddy-analytics). 776 words, ~2,561 tokens.

Download SKILL.mdSave it as .claude/skills/chat-sdk/SKILL.md (or your agent's skills folder).
name
chat-sdk
description
Build multi-platform chat bots with Chat SDK (`chat` npm package). Use when developers want to 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.

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/resources/guides/        # framework/platform guides (markdown)
node_modules/chat/resources/templates.json # starter templates (title, description, href)

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, delete, schedule
  • node_modules/chat/docs/streaming.mdx — AI SDK integration and streaming semantics
  • node_modules/chat/docs/cards.mdx — JSX cards
  • node_modules/chat/docs/actions.mdx — button/select interactions
  • node_modules/chat/docs/modals.mdx — modal submit/close flows
  • node_modules/chat/docs/slash-commands.mdx — slash command routing
  • node_modules/chat/docs/direct-messages.mdx — DM behavior and openDM()
  • node_modules/chat/docs/files.mdx — attachments/uploads
  • node_modules/chat/docs/state.mdx — persistence, locking, dedupe
  • node_modules/chat/docs/adapters.mdx — cross-platform feature matrix
  • node_modules/chat/docs/api/chat.mdx — exact Chat API
  • node_modules/chat/docs/api/thread.mdx — exact Thread API
  • node_modules/chat/docs/api/message.mdx — exact Message API
  • node_modules/chat/docs/api/modals.mdx — modal element and event details

For the specific adapter or state package you are using, inspect that installed package's dist/index.d.ts export surface in node_modules.

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/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.
Templates

Listed in node_modules/chat/resources/templates.json:

<!-- RESOURCES:END -->

Quick start

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

const bot = new Chat({
  userName: "mybot",
  adapters: {
    slack: createSlackAdapter(),
  },
  state: createRedisState(),
  dedupeTtlMs: 600_000,
});

bot.onNewMention(async (thread) => {
  await thread.subscribe();
  await thread.post("Hello! I'm listening to this thread.");
});

bot.onSubscribedMessage(async (thread, message) => {
  await thread.post(`You said: ${message.text}`);
});

Core concepts

  • Chat — main entry point; coordinates adapters, routing, locks, and state
  • Adapters — platform-specific integrations for Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp
  • State adapters — persistence for subscriptions, locks, dedupe, and thread state
  • Thread — conversation context with post(), stream(), subscribe(), setState(), startTyping()
  • Message — normalized content with text, formatted, attachments, author info, and platform raw
  • Channel — container for threads and top-level posts
Show full SKILL.md (287 more words)Show less

Event handlers

HandlerTrigger
onNewMentionBot @-mentioned in an unsubscribed thread
onDirectMessageNew DM in an unsubscribed DM thread
onSubscribedMessageAny message in a subscribed thread
onNewMessage(regex)Regex match in an unsubscribed thread
onReaction(emojis?)Emoji added or removed
onAction(actionIds?)Button clicks and select/radio interactions
onModalSubmit(callbackId?)Modal form submitted
onModalClose(callbackId?)Modal dismissed/cancelled
onSlashCommand(commands?)Slash command invocation
onAssistantThreadStartedSlack assistant thread opened
onAssistantContextChangedSlack assistant context changed
onAppHomeOpenedSlack App Home opened
onMemberJoinedChannelSlack member joined channel event

Read node_modules/chat/docs/handling-events.mdx, node_modules/chat/docs/actions.mdx, node_modules/chat/docs/modals.mdx, and node_modules/chat/docs/slash-commands.mdx before wiring handlers. onDirectMessage behavior is documented in node_modules/chat/docs/direct-messages.mdx.

Streaming

Pass any AsyncIterable<string> to thread.post(). For AI SDK, prefer result.fullStream over result.textStream when available so step boundaries are preserved.

typescript
import { ToolLoopAgent } from "ai";

const agent = new ToolLoopAgent({ model: "anthropic/claude-4.5-sonnet" });

bot.onNewMention(async (thread, message) => {
  const result = await agent.stream({ prompt: message.text });
  await thread.post(result.fullStream);
});

Key details:

  • streamingUpdateIntervalMs controls post+edit fallback cadence
  • fallbackStreamingPlaceholderText defaults to "..."; set null to disable
  • Structured StreamChunk support is Slack-only; other adapters ignore non-text chunks

Cards and modals (JSX)

Set jsxImportSource: "chat" in tsconfig.json.

Card components:

  • Card, CardText, Section, Fields, Field, Button, CardLink, LinkButton, Actions, Select, SelectOption, RadioSelect, Table, Image, Divider

Modal components:

  • Modal, TextInput, Select, SelectOption, RadioSelect
tsx
await thread.post(
  <Card title="Order #1234">
    <CardText>Your order has been received.</CardText>
    <Actions>
      <Button id="approve" style="primary">Approve</Button>
      <Button id="reject" style="danger">Reject</Button>
    </Actions>
  </Card>
);

Adapter inventory

See chat-sdk.dev/adapters for the current list of official, vendor-official, and community adapters, including package names and authors. For the exact factory function and config types of an installed adapter, inspect its dist/index.d.ts in node_modules.

Building a custom adapter

Read these published docs first:

  • node_modules/chat/docs/contributing/building.mdx
  • node_modules/chat/docs/contributing/testing.mdx
  • node_modules/chat/docs/contributing/publishing.mdx

Also inspect:

  • node_modules/chat/dist/index.d.ts — Adapter and related interfaces
  • node_modules/@chat-adapter/shared/dist/index.d.ts — shared errors and utilities
  • Installed official adapter dist/index.d.ts files — reference implementations for config and APIs

A custom adapter needs request verification, webhook parsing, message/thread/channel operations, ID encoding/decoding, and a format converter. Use BaseFormatConverter from chat and shared utilities from @chat-adapter/shared.

Webhook setup

Each registered adapter exposes bot.webhooks.<name>. Wire those directly to your HTTP framework routes. See node_modules/chat/resources/guides/how-to-build-a-slack-bot-with-next-js-and-redis.md and node_modules/chat/resources/guides/create-a-discord-support-bot-with-nuxt-and-redis.md for framework-specific route patterns.

© databuddy-analytics, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/chat-sdk of databuddy-analytics/Databuddy.

Open the folder on GitHubat commit fc7eb6b

Compare with similar skills

Chat SDK next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Chat SDK compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Chat SDK this skilldatabuddy-analytics/Databuddy1.2k—~2.6kAutomated safety check: PassAGPL-3.0
Chat SDK Botslobehub/lobehub83k—~1.5kAutomated safety check: PassCustom licence
Frontmcp Channelsagentfront/frontmcp146—~3.7kAutomated safety check: PassApache-2.0
Chat SDKvercel/vercel-plugin301—~2.9kAutomated safety check: PassCustom licence
Bot BuilderFerroxLabs/wayland608—~2.5kAutomated safety check: PassApache-2.0
Hitl ProtocolLeoYeAI/openclaw-master-skills2.2k—~5.3kAutomated safety check: PassApache-2.0

Similar skills

  • Chat SDK Bots

    lobehub/lobehub

    Builds chat bots once for Slack, Teams, Google Chat, Discord, GitHub and Linear with the Chat SDK, covering event handlers, cards, modals, streaming and state adapters.

    83k GitHub stars~1.5k tokensUpdated today
    Backend & APIsAuto-check passed
  • Frontmcp Channels

    agentfront/frontmcp

    A skill your agent uses when pushing real-time notifications or events into Claude Code (or another MCP client) sessions, or building two-way chat bridges.

    146 GitHub stars~3.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Chat SDK

    vercel/vercel-plugin

    Official

    Vercel Chat SDK expert guidance. An agent skill from vercel/vercel-plugin.

    301 GitHub stars~2.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Bot Builder

    FerroxLabs/wayland

    Bot development expertise covering Slack, Discord, and Telegram bot architecture, command handling patterns, event-driven design, conversation state management, rate limiting, user permission…

    608 GitHub stars~2.5k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Hitl Protocol

    LeoYeAI/openclaw-master-skills

    HITL Protocol — the open standard for human decisions in autonomous agent workflows.

    2.2k GitHub stars~5.3k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Openloomi Connectors

    melandlabs/openloomi

    openloomi Connectors tools - manage the native 7 messaging integrations and pair with the composio skill for the 1000+ apps OAuth layer (Slack, Discord, X, Gmail, Outlook, Google…

    1k GitHub stars~3.3k tokensUpdated 14 days ago
    Productivity & AutomationAuto-check passed

More from databuddy-analytics/Databuddy

All 8 skills in this repo
  • Databuddy

    databuddy-analytics/Databuddy

    Integrate Databuddy analytics using the SDK, REST API, or MCP.

    1.2k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Databuddy

    databuddy-analytics/Databuddy

    Help external users integrate Databuddy into their own apps.

    1.2k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Typescript Bun Drizzle Quality

    databuddy-analytics/Databuddy

    Build or review Bun fullstack TypeScript code with Drizzle-backed SQL.

    1.2k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Vertical Slices

    databuddy-analytics/Databuddy

    Design, implement, and review software using vertical slices (feature-first architecture) instead of horizontal layers.

    1.2k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Databuddy Internal

    databuddy-analytics/Databuddy

    Work inside the Databuddy monorepo for internal implementation, debugging, review, and refactoring.

    1.2k GitHub stars~11k tokensUpdated today
    Auto-check: notes
  • Databuddy MCP

    databuddy-analytics/Databuddy

    A skill your agent uses whenever the Databuddy MCP server is available and the user wants analytics, errors, vitals, investigations, flags, links, annotations, funnels, or goals queried or changed.

    1.2k GitHub stars~711 tokensUpdated today
    Auto-check passed

Questions about Chat SDK

What does Chat SDK do?

Build multi-platform chat bots with Chat SDK (chat npm package). Chat SDK is an agent skill from databuddy-analytics/Databuddy. Build multi-platform chat bots with Chat SDK (chat npm package).

When should I use Chat SDK?

Chat SDK fits situations like: developers want to build a Slack; handle mentions; direct messages; subscribed threads.

How do I install Chat SDK in Claude Code?

Run `npx skills add databuddy-analytics/Databuddy --skill chat-sdk -a claude-code`. Or copy the skill folder (.agents/skills/chat-sdk in databuddy-analytics/Databuddy) into .claude/skills/chat-sdk in your project. Claude Code loads it when a task matches its description.

How do I install Chat SDK in Codex?

Run `npx skills add databuddy-analytics/Databuddy --skill chat-sdk -a codex`. Or copy the skill folder (.agents/skills/chat-sdk in databuddy-analytics/Databuddy) into .agents/skills/chat-sdk in your project. Codex loads it when a task matches its description.

Can I use Chat SDK in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add databuddy-analytics/Databuddy --skill chat-sdk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/chat-sdk, .gemini/skills/chat-sdk, .github/skills/chat-sdk and .opencode/skills/chat-sdk in your project.

What does Chat SDK need to run?

SKILL.md names no scripts, command-line tools or credentials: Chat SDK is instructions for the agent only.

Does Chat SDK access the network?

SKILL.md names 2 domains. As links in the text: vercel.com and chat-sdk.dev. This is read from the text; nothing was executed.

Is Chat SDK safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Chat SDK use?

Chat SDK is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Chat SDK use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Chat SDK?

Skills that share tags, products or a category with Chat SDK: Chat SDK Bots (lobehub/lobehub, 83k stars), Frontmcp Channels (agentfront/frontmcp, 146 stars), Chat SDK (vercel/vercel-plugin, 301 stars) and Bot Builder (FerroxLabs/wayland, 608 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Chat SDK?

databuddy-analytics (a GitHub organization) maintains it in databuddy-analytics/Databuddy, which has 1,176 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 7, 2026.

Source: databuddy-analytics/Databuddy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.