技能 telegram-automation
📦

telegram-automation

安全

使用 Claude Code 自动化 Telegram 消息

手动发送 Telegram 消息和管理机器人会占用开发时间。此技能通过 Rube MCP 集成自动化 Telegram 任务,让您可以直接从 Claude Code 发送消息、共享文件和管理机器人命令。

支持: Claude Codex Code(CC)
🥉 74 青铜
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“telegram-automation”。 Send a message to @mychannel saying 'Hello World'

预期结果:

Message sent successfully to chat @mychannel. Message ID: 123

正在使用“telegram-automation”。 Get information about chat @mychannel

预期结果:

  • Chat ID: -1001234567890
  • Type: channel
  • Title: My Channel
  • Member count: 542

正在使用“telegram-automation”。 Set bot commands: /start, /help, /status

预期结果:

Bot commands updated successfully. 3 commands are now available.

安全审计

安全
v1 • 2/25/2026

All 86 static analysis findings are false positives from code examples in markdown documentation. The file is a pure documentation skill for Telegram automation via Rube MCP service. No executable code, no credential exfiltration, no malicious intent detected.

1
已扫描文件
225
分析行数
0
发现项
1
审计总数
未发现安全问题
审计者: claude

质量评分

38
架构
100
可维护性
87
内容
50
社区
100
安全
91
规范符合性

你能构建什么

发送部署通知

当 CI/CD 管道完成时,在共享的 Telegram 频道中自动向团队通报部署状态。

通过 Telegram 共享报告

通过 Telegram 向利益相关者发送每日 PDF 报告、截图或日志文件,并附上说明关键指标的标题。

管理社区机器人

在社区 Telegram 群组中配置机器人命令、响应内联按钮的回调查询,并管理聊天消息。

试试这些提示

发送简单消息
Send a message to my Telegram channel @updates saying 'Deployment completed successfully'
发送格式化的消息
Send a formatted message to chat ID 123456789 using HTML with bold headers: '<b>Status Report</b>

All systems operational'
带标题发送文档
Send the PDF report at https://example.com/report.pdf to @team-reports with caption 'Q4 Performance Report attached'
配置机器人命令
Set up my Telegram bot commands: /start for 'Begin using the bot', /help for 'Show available commands', /status for 'Check system status'

最佳实践

  • 在运行工作流之前,始终验证 Rube MCP 连接是否已激活并通过 Telegram 身份验证
  • 在发送到公共频道或群组之前,先在私人聊天中测试消息格式
  • 对于简单的格式要求使用 HTML 解析模式,MarkdownV2 需要大量转义字符
  • 将超过 4096 个字符的长消息拆分为多个部分以避免 API 错误
  • 通过在批量操作之间实施指数退避来处理速率限制响应(HTTP 429)

避免

  • 不要在提示中硬编码聊天 ID 或机器人令牌;请从环境或配置中动态获取它们
  • 避免在没有延迟的情况下重复发送相同消息,以防止触达 Telegram 速率限制
  • 不要假设机器人具有管理员权限;在尝试执行管理操作之前检查访问权限
  • 切勿在消息文本中包含敏感凭据或 API 密钥;使用安全渠道进行凭据共享

常见问题

如何获取 Telegram 机器人令牌?
在 Telegram 上向 @BotFather 发送消息,使用 /newbot 创建机器人,然后复制提供的 API 令牌。
为什么机器人无法向我的群组发送消息?
必须先将机器人作为成员添加到群组中。在尝试发送消息之前,请先邀请 @BotName 到群组。
HTML 和 MarkdownV2 格式有什么区别?
HTML 更简单,使用 <b> 和 <i> 等标签。MarkdownV2 使用 * 和 _,但需要转义特殊字符,使其更复杂。
如何查找我的聊天 ID?
使用 TELEGRAM_GET_UPDATES 获取最近的消息,然后提取 chat.id 字段。对于公共频道,请使用 @channelname 格式。
我可以编辑其他用户发送的消息吗?
不行,机器人只能编辑自己的消息。要管理其他消息,机器人需要管理员删除权限。
如果触达 Telegram 速率限制会怎样?
API 返回 HTTP 429 Too Many Requests。在消息之间实施延迟并使用指数退避来处理速率限制响应。

开发者详情

文件结构

📄 SKILL.md