Pytdbot
pytdbot/client
Write Telegram bots and userbots with Pytdbot (async TDLib wrapper with high-level helpers; not the Telegram Bot API).
Telegram Bot skill for sending and editing Telegram messages via Bot API.
$ npx skills add bubbuild/bub --skill telegram -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install bubbuild/bub telegram --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/bubbuild/bub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/telegram .claude/skills/telegram && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "telegram" agent skill from https://github.com/bubbuild/bub/tree/main/src/skills/telegram into .claude/skills/telegram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/bubbuild/bub/tree/main/src/skills/telegramType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add bubbuild/bub --skill telegram -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install bubbuild/bub telegram --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bubbuild/bub.git skills-src && mkdir -p .agents/skills && cp -r skills-src/src/skills/telegram .agents/skills/telegram && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "telegram" agent skill from https://github.com/bubbuild/bub/tree/main/src/skills/telegram into .agents/skills/telegram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bubbuild/bub --skill telegram -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install bubbuild/bub telegram --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bubbuild/bub.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/src/skills/telegram .cursor/skills/telegram && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "telegram" agent skill from https://github.com/bubbuild/bub/tree/main/src/skills/telegram into .cursor/skills/telegram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/bubbuild/bub.git --path src/skills/telegram--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add bubbuild/bub --skill telegram -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install bubbuild/bub telegram --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bubbuild/bub.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/src/skills/telegram .gemini/skills/telegram && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "telegram" agent skill from https://github.com/bubbuild/bub/tree/main/src/skills/telegram into .gemini/skills/telegram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install bubbuild/bub telegramInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add bubbuild/bub --skill telegram -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/bubbuild/bub.git skills-src && mkdir -p .github/skills && cp -r skills-src/src/skills/telegram .github/skills/telegram && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "telegram" agent skill from https://github.com/bubbuild/bub/tree/main/src/skills/telegram into .github/skills/telegram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bubbuild/bub --skill telegram -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install bubbuild/bub telegram --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bubbuild/bub.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/src/skills/telegram .opencode/skills/telegram && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "telegram" agent skill from https://github.com/bubbuild/bub/tree/main/src/skills/telegram into .opencode/skills/telegram/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "telegram", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
telegramTelegram Bot skill for sending and editing Telegram messages via Bot API.
Telegram is an agent skill from bubbuild/bub. Telegram Bot skill for sending and editing Telegram messages via Bot API. Use when Bub needs to: (1) Send a message to a Telegram user/group/channel, (2) Reply to a specific Telegram message with replytomessageid, (3) Edit an existing Telegram message, or (4) Push proactive Telegram notifications. Prefer rich formatted messages (headings, lists, tables, blockquotes, math, collapsible details, captioned media) over plain markdown whenever the content is more than one short paragraph.
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/telegram_edit.py`, `scripts/telegram_rich.py` and `scripts/telegram_send.py`).
It sits in Productivity & Automation, covering Chatbots and conversational support. It works with Telegram and Python. The repository describes itself as: Bub it. Build it. A tiny agent runtime, composable with plugins. The licence is Apache-2.0.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit b4a61bf. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 3 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
uvFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
core.telegram.orgFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
BUB_TELEGRAM_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Telegram loads about 2.2k tokens when it runs. Until then it costs about 125 tokens; SKILL.md has 825 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from bubbuild/bub at commit b4a61bf, republished under its Apache-2.0 licence (© bubbuild). 825 words, ~2,234 tokens.
.claude/skills/telegram/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.Agent-facing execution guide for Telegram outbound communication.
Env vars:
BUB_TELEGRAM_TOKEN=${config.telegram.token}Collect these before execution:
chat_id (required)message_id (required for edit or reply)reply_to_message_id (required when you need a threaded reply)For any message that benefits from structured formatting — headings, bullet/numbered lists, tables, blockquotes, collapsible <details>, captioned media, math blocks, code blocks with language hints, or mixed media — use the dedicated telegram_rich.py script with rich-html-style markup. This is the first-choice path; fall back to plain markdown (telegram_send.py) only for short single-paragraph replies.
The Rich Message API uses sendRichMessage and editMessageText with a rich_message payload. Exactly one of html or markdown must be supplied. Supported HTML tags include <b>, <i>, <u>, <s>, <tg-spoiler>, <code>, <pre>, <mark>, <sub>, <sup>, <h1>-<h6>, <p>, <ul>/<ol>/<li>, <blockquote>, <aside>, <details>/<summary>, <table>, <figure>/<figcaption>, <img>/<video>/<audio>, <tg-collage>, <tg-slideshow>, <tg-map>, <tg-math>, <tg-math-block>, <tg-reference>, <tg-emoji>, <tg-time>. Full reference: https://core.telegram.org/bots/api#rich-html-style
# Send rich message (HTML)
uv run ./scripts/telegram_rich.py \
--chat-id <CHAT_ID> \
--html "<h2>Title</h2><p>Body with <b>bold</b> and <code>code</code>.</p>"
# Send rich message (HTML from heredoc via file)
uv run ./scripts/telegram_rich.py \
--chat-id <CHAT_ID> \
--html-file /tmp/payload.html \
--reply-to <MESSAGE_ID>
# Send rich message (Markdown instead of HTML)
uv run ./scripts/telegram_rich.py \
--chat-id <CHAT_ID> \
--markdown "## Title\n\n- item one\n- item two"
# Edit an existing message to become a rich message
uv run ./scripts/telegram_rich.py \
--chat-id <CHAT_ID> \
--edit <MESSAGE_ID> \
--html "<p>Updated content.</p>"For multi-line rich HTML, prefer --html-file over passing the payload on the command line to avoid shell escaping pitfalls. The script reads the file as UTF-8 and strips a single trailing newline.
message_id is known, send a reply message (--reply-to).sender_is_bot=true), do not use reply mode, but send a normal message and prefix content with @<sender_username> (or the provided source username). If the user doesn't have a username, use --source-user-id to mention via tg://user?id= link.--message - (or --text -). NEVER embed message text directly in shell arguments — special characters like ', ", $, ! will be mangled or cause syntax errors.telegram_rich.py (rich-html-style) over telegram_send.py for anything beyond a single short paragraph. See the "Rich Messages" section above.In Telegram groups, communicate with another bot using only these patterns:
message_id is available./command@OtherBot when you need to invoke that bot intentionally.When this skill is in scope, prefer proactive and timely Telegram updates:
Recommended pattern:
When the inbound Telegram message is voice:
When an inbound Telegram message warrants acknowledgment but does not merit a full reply, use a Telegram reaction as the response. But when any explanation or details are needed, use a normal reply instead.
Paths are relative to this skill directory.
# Send message (ALWAYS use heredoc stdin, never inline text in arguments)
cat << 'EOF' | uv run ${SKILL_DIR}/scripts/telegram_send.py --chat-id <CHAT_ID> --token "$BUB_TELEGRAM_TOKEN" --message -
Your message content here.
Special characters are safe: $100, "quotes", 'apostrophes', !exclamation
EOF
# Reply to a specific message
cat << 'EOF' | uv run ${SKILL_DIR}/scripts/telegram_send.py --chat-id <CHAT_ID> --token "$BUB_TELEGRAM_TOKEN" --reply-to <MESSAGE_ID> --message -
Reply content here.
EOF
# Source message sender is bot: no direct reply, use @username style
cat << 'EOF' | uv run ${SKILL_DIR}/scripts/telegram_send.py --chat-id <CHAT_ID> --token "$BUB_TELEGRAM_TOKEN" --source-is-bot --source-username <USERNAME> --message -
Message to a bot using @username mention.
EOF
# Source message sender is bot without username: use tg://user?id= link
cat << 'EOF' | uv run ${SKILL_DIR}/scripts/telegram_send.py --chat-id <CHAT_ID> --token "$BUB_TELEGRAM_TOKEN" --source-is-bot --source-user-id <USER_ID> --source-display-name "Display Name" --message -
Message to a user/bot using tg://user?id= mention.
EOF
# Edit an existing message
cat << 'EOF' | uv run ${SKILL_DIR}/scripts/telegram_edit.py --chat-id <CHAT_ID> --token "$BUB_TELEGRAM_TOKEN" --message-id <MESSAGE_ID> --text -
Updated content here.
EOFWhen sending message to a bot, either use --reply-to argument or pass --source-is-bot with --source-username otherwise the bot will not receive the message.
For other actions that not covered by these scripts, use curl to call Telegram Bot API directly with the provided token.
telegram_rich.py (preferred for structured messages)--chat-id, -c: required--html: rich message content as HTML--html-file: read rich message HTML from a file (preferred for multi-line payloads)--markdown: rich message content as Markdown--markdown-file: read rich message Markdown from a file--rtl: render right-to-left--skip-entity-detection: skip URL/email/mention auto-detection--reply-to, -r: optional message ID to reply to--disable-notification: send silently--edit MESSAGE_ID: edit an existing message instead of sending--token, -t: optional (normally not needed)telegram_send.py--chat-id, -c: required, supports comma-separated ids--message, -m: required (use - to read from stdin)--reply-to, -r: optional--token, -t: optional (normally not needed)--source-is-bot: optional flag, disables reply mode and adds mention prefix--source-username: optional, uses @username style mention when set--source-user-id: optional, uses tg://user?id= link mention when username is not available--source-display-name: optional, display name for user ID mention (defaults to "User")telegram_edit.py--chat-id, -c: required--message-id, -m: required--text, -t: required (use - to read from stdin)--token: optional (normally not needed)In Telegram groups, communicate with another bot using only these patterns:
message_id is available./command@OtherBot when you need to invoke that bot intentionally.© bubbuild, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (scripts) in src/skills/telegram of bubbuild/bub.
Open the folder on GitHubat commit b4a61bf
Telegram next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Telegram this skillbubbuild/bub | 1.7k | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| Pytdbotpytdbot/client | 137 | — | ~4.3k | Automated safety check: Pass | MIT | |
| Setupterranc/claude-telegram-bot-bridge | 134 | — | ~1.5k | Automated safety check: Notes | None | |
| Telegram Bot Builderaiskillstore/marketplace | 430 | 3 repos | ~2.2k | Automated safety check: Notes | None | |
| Process Inboxtelegramdesktop/tdesktop | 33k | 2 repos | ~4.5k | Automated safety check: Pass | GPL-3.0 | |
| MuseKevPH2026/muse-catch | 128 | — | ~1.6k | Automated safety check: Notes | AGPL-3.0 |
pytdbot/client
Write Telegram bots and userbots with Pytdbot (async TDLib wrapper with high-level helpers; not the Telegram Bot API).
terranc/claude-telegram-bot-bridge
Install and configure the Telegram Skill Bot. An agent skill from terranc/claude-telegram-bot-bridge.
aiskillstore/marketplace
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots.
telegramdesktop/tdesktop
Process the local ignored ai-tdesktop inbox into durable, independently testable Telegram Desktop task records while task execution worktrees remain active.
KevPH2026/muse-catch
Muse · Catch — AI 灵感捕手。浏览器插件 + 任意 Agent(Telegram/WhatsApp/Discord…)一键捕获灵感,AI自动提炼,Web Dashboard浏览。分级LLM路由:Agent内置LLM隐私分析 + TokenRouter云端分布式调用。当用户说「灵感」「捕获」「Muse」「Catch」「记下来」「收藏」「稍后读」时自动触发。
2025Emma/vibe-coding-cn
Chinese-language guide to building on Telegram: bots through the Bot API, Mini Apps in JavaScript and custom clients through TDLib, with Python examples.
bubbuild/bub
GitHub CLI skill for interacting with GitHub via the gh command line tool.
Categories
Telegram Bot skill for sending and editing Telegram messages via Bot API. Telegram is an agent skill from bubbuild/bub. Telegram Bot skill for sending and editing Telegram messages via Bot API.
Telegram fits situations like: send a message to a Telegram user/group/channel; reply to a specific Telegram message with replytomessageid; edit an existing Telegram message; push proactive Telegram notifications.
Run `npx skills add bubbuild/bub --skill telegram -a claude-code`. Or copy the skill folder (src/skills/telegram in bubbuild/bub) into .claude/skills/telegram in your project. Claude Code loads it when a task matches its description.
Run `npx skills add bubbuild/bub --skill telegram -a codex`. Or copy the skill folder (src/skills/telegram in bubbuild/bub) into .agents/skills/telegram in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bubbuild/bub --skill telegram -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/telegram, .gemini/skills/telegram, .github/skills/telegram and .opencode/skills/telegram in your project.
Going by SKILL.md and its folder, Telegram needs Python for the scripts in its folder, the command-line tools its instructions call (uv) and credentials named BUB_TELEGRAM_TOKEN. Our summary lists: Python 3; A credential in BUB_TELEGRAM_TOKEN.
SKILL.md names 1 domain. As links in the text: core.telegram.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Telegram is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Telegram: Pytdbot (pytdbot/client, 137 stars), Setup (terranc/claude-telegram-bot-bridge, 134 stars), Telegram Bot Builder (aiskillstore/marketplace, 430 stars) and Process Inbox (telegramdesktop/tdesktop, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
bubbuild (a GitHub organization) maintains it in bubbuild/bub, which has 1,679 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.
Source: bubbuild/bub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.