基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Rawknee-69/Beta-Claw --skill add-telegram命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | add-telegram |
| command | /add-telegram |
| description | Add Telegram as a communication channel |
| requiredEnvVars | ["TELEGRAM_BOT_TOKEN"] |
| requiredTools | ["write_file","read_file","run_code","install_pkg"] |
| platforms | ["linux","macos","windows"] |
| version | 1.0.0 |
| author | betaclaw |
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.) ;
.({
: msg..(),
: msg...(),
: msg.?..() ?? ,
: msg.,
: msg. * ,
: msg.?..(),
});
});
}
(): <> {
..();
}
(: ): <> {
..(msg., msg., {
: msg. ? (msg.) : ,
: ,
});
}
(: ): {
. = handler;
}
(: ): {
: [] = [, , , ];
supported.(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 /customize