
Chat Bot SDK
Builds multi-platform chat bots with webhooks, mentions, slash commands and streaming.
Install
npx skills add lobehub/lobehub --skill chat-sdk -g -a claude-code -y- Repository
- lobehub/lobehub83.7k
- Category
- AI and agents
- Updated
- 3d ago
- License
- See repository
- Context cost
- Lightabout 1,490 tokens
- Runs scripts
- No, instructions only
What it does
Use for multi-platform bots built with chat SDK: webhooks, mentions, slash commands, cards, modals and streaming.
Chat SDK
Unified TypeScript SDK for building chat bots across Slack, Teams, Google Chat, Discord, GitHub, and Linear. Write bot logic once, deploy everywhere.
Critical: Read the bundled docs
The chat package ships with full documentation in node_modules/chat/docs/ and TypeScript source types. Always read these before writing code:
node_modules/chat/docs/ # Full documentation (MDX files)
node_modules/chat/dist/ # Built types (.d.ts files)
Key docs to read based on task:
docs/getting-started.mdx, setup guidesdocs/usage.mdx, event handlers, threads, messages, channelsdocs/streaming.mdx, AI streaming with AI SDKdocs/cards.mdx, JSX interactive cardsdocs/actions.mdx, button/dropdown handlersdocs/modals.mdx, form dialogs (Slack only)docs/adapters.mdx,docs/platform-adapters.mdx, adapter overview and platform-specific setupdocs/state-adapters.mdx, state adapter config (Redis, ioredis, memory)
Also read the TypeScript types from node_modules/chat/dist/ to understand the full API surface.
Quick start
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({
botToken: process.env.SLACK_BOT_TOKEN!,
signingSecret: process.env.SLACK_SIGNING_SECRET!,
}),
},
state: createRedisState({ url: process.env.REDIS_URL! }),
});
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}`);
});

