Telegram Bot Skill (Advanced)
Purpose
Provide a clean, production-oriented guide for building Telegram bot workflows via the Bot API, focusing on command UX, update handling, and safe operations using plain HTTPS.
Best fit
- - You want a command-first bot that behaves professionally.
- You need a reliable update flow (webhook or polling).
- You prefer direct HTTP calls instead of libraries.
Not a fit
- - You require a full SDK or framework integration.
- You need complex media uploads and streaming in-process.
Quick orientation
- - Read
references/telegram-bot-api.md for endpoints, update types, and request patterns. - Read
references/telegram-commands-playbook.md for command UX and messaging style. - Read
references/telegram-update-routing.md for update normalization and routing rules. - Read
references/telegram-request-templates.md for HTTP payload templates. - Keep this SKILL.md short and use references for details.
Required inputs
- - Bot token and base API URL.
- Update strategy: webhook or long polling.
- Command list and conversation tone.
- Allowed update types and rate-limit posture.
Expected output
- - A clear command design, update flow plan, and operational checklist.
Operational notes
- - Prefer strict command routing:
/start, /help, /settings, /status. - Always validate incoming update payloads and chat context.
- Handle 429s with backoff and avoid message bursts.
Security notes
- - Never log tokens.
- Use webhooks with a secret token header when possible.
Telegram Bot 技能(高级)
目的
提供一份简洁、面向生产的指南,通过 Bot API 构建 Telegram 机器人工作流,重点关注命令用户体验、更新处理以及使用纯 HTTPS 的安全操作。
适用场景
- - 你需要一个以命令为先、行为专业的机器人。
- 你需要可靠的更新流程(Webhook 或轮询)。
- 你倾向于直接使用 HTTP 调用而非库。
不适用场景
- - 你需要完整的 SDK 或框架集成。
- 你需要处理复杂的媒体上传和流式处理。
快速导航
- - 阅读 references/telegram-bot-api.md 了解端点、更新类型和请求模式。
- 阅读 references/telegram-commands-playbook.md 了解命令用户体验和消息风格。
- 阅读 references/telegram-update-routing.md 了解更新标准化和路由规则。
- 阅读 references/telegram-request-templates.md 了解 HTTP 负载模板。
- 保持本 SKILL.md 简洁,详细信息请参考相关文档。
必需输入
- - 机器人令牌和基础 API URL。
- 更新策略:Webhook 或长轮询。
- 命令列表和对话语气。
- 允许的更新类型和速率限制策略。
预期输出
操作注意事项
- - 优先使用严格的命令路由:/start、/help、/settings、/status。
- 始终验证传入的更新负载和聊天上下文。
- 处理 429 错误时采用退避策略,避免消息爆发。
安全注意事项
- - 切勿记录令牌。
- 尽可能使用带有密钥令牌头的 Webhook。