skills/add-telegram/SKILL.md
Add Telegram as a communication channel
npx skillsauth add Rawknee-69/Beta-Claw add-telegramInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the Telegram integration assistant. Set up a Telegram bot as a communication channel for betaclaw.
If the user doesn't already have a bot token:
/newbot and follow the prompts to create a bot.123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11).TELEGRAM_BOT_TOKEN.^\d+:[A-Za-z0-9_-]{35,}$..env or logs.Run: npm install node-telegram-bot-api
Run: npm install -D @types/node-telegram-bot-api (if not already present)
Create src/channels/telegram.ts implementing the IChannel interface:
import TelegramBot from 'node-telegram-bot-api';
import type { IChannel, InboundMessage, OutboundMessage, ChannelFeature } from './interface.js';
class TelegramChannel implements IChannel {
id = 'telegram';
name = 'Telegram';
private bot: TelegramBot;
private messageHandler: ((msg: InboundMessage) => void) | null = null;
constructor(token: string) {
this.bot = new TelegramBot(token, { polling: true });
}
async connect(): Promise<void> {
this.bot.on('message', (msg) => {
if (!this.messageHandler || !msg.text) return;
this.messageHandler({
id: msg.message_id.toString(),
groupId: msg.chat.id.toString(),
senderId: msg.from?.id.toString() ?? 'unknown',
content: msg.text,
timestamp: msg.date * 1000,
replyToId: msg.reply_to_message?.message_id.toString(),
});
});
}
async disconnect(): Promise<void> {
this.bot.stopPolling();
}
async send(msg: OutboundMessage): Promise<void> {
await this.bot.sendMessage(msg.groupId, msg.content, {
reply_to_message_id: msg.replyToId ? parseInt(msg.replyToId) : undefined,
parse_mode: 'Markdown',
});
}
onMessage(handler: (msg: InboundMessage) => void): void {
this.messageHandler = handler;
}
supportsFeature(f: ChannelFeature): boolean {
const supported: ChannelFeature[] = ['markdown', 'images', 'files', 'reactions'];
return supported.includes(f);
}
}
Adapt the above to match the project's exact interface and coding conventions.
telegram to the enabled channels list in .beta/config.toon.Ask the user if they want to configure:
/setcommands).getMe() on the Telegram Bot API to verify the token works.Report to the user:
@{botUsername} is now connectedtelegram from enabled channels in /customizedevelopment
Search the web and summarize results
development
Send messages via Telegram Bot API
data-ai
Show system health, active models, channels, and skills
tools
Full betaclaw installation and onboarding wizard