telegram_bot
Use Telegram Bot when the user asks for Telegram Bot or this provider's API.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 70
- Forks
- 8
01 前言 Front Matter
- name
- telegram_bot
- description
- Use Telegram Bot when the user asks for Telegram Bot or this provider's API.
02 资源文件 1
- 脚本bin/tg.py3.4 KB
03 SKILL.md 正文
Telegram Bot
Purpose
Use Telegram Bot with the user-connected custom.telegram-bot credential.
Tooling
CLIs live under ~/workspace/skills/telegram-bot/bin/:
tg.py getMe— verify the bot identity.tg.py getUpdates [--offset N] [--timeout 30]— poll incoming messages.tg.py sendMessage <chat_id> <text>— send a text message.tg.py sendDocument <chat_id> <file_path> [caption]— send a file.
Python CLIs must import /opt/hatch/skills/skill-creator/bin/dynamic_credentials.py
and build the API URL with the raw (not URL-encoded) surrogate in the path:
https://api.telegram.org/bot{surr}/METHOD. The helper
url_with_surrogate_path_segment URL-encodes the surrogate, which breaks the
egress proxy's literal hsurr:* replacement (Telegram then 404s). Use
read_json_response(resp) from the same helper to parse responses. Send only
hsurr:* values, and only to api.telegram.org.
Auth
The credential is already stored; nothing here collects one. Never ask the user to paste a raw key in chat, set a secret environment variable, pass a secret flag, or write an auth file.
A 401 or 403 is a question about the request before it is a question about the key. Check that the credential was attached at all: a request built without the helpers named under Tooling carries nothing, and that looks exactly like a wrong or under-scoped token. Only once a request that did carry the credential is still rejected, call credentials.request_api_access with reconnect to replace it. The connector is stored as custom.telegram-bot.
Operating Rules
- Use this skill when the user asks for Telegram Bot or this provider's API.
- Restrict authenticated requests to: api.telegram.org.
- Do not print, log, or persist raw credentials.
- If auth is missing or rejected, follow the Auth section rather than asking for a key.
04 同仓库更多 Skills
superagent-bridge
Operate the Muse<->superagent Telegram bridge: poll the private group for task_request/task_result envelopes, validate senders, and reply with task_batch/task_done as Muse (the remote brain).
Writing Skills
TDD for process documentation - test with subagents before writing, iterate until bulletproof
writing-shape
Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.
Writing Plans
Create detailed implementation plans with bite-sized tasks for engineers with zero codebase context
writing-guidelines
Review docs/prose for Writing Guidelines compliance. Use when asked to "review my docs", "check writing style", "audit prose", "review docs voice and tone", or "check this page against the writing handbook".
writing-great-skills
Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.