
Telegram
Telegram Bot skill for sending and editing Telegram messages via Bot API.
Install
npx skills add bubbuild/bub --skill telegram -g -a claude-code -y- Repository
- bubbuild/bub1.7k
- Category
- Engineering
- Updated
- 4d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 2,091 tokens
- Runs scripts
- Yes, review before use
What it does
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 reply_to_message_id, (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.
Telegram Skill
Agent-facing execution guide for Telegram outbound communication.
Env vars:
BUB_TELEGRAM_TOKEN=${config.telegram.token}
Required Inputs
Collect these before execution:
chat_id(required)message_id(required for edit or reply)- message content (required for send/edit)
reply_to_message_id(required when you need a threaded reply)
Rich Messages (Bot API 10.1+, June 2026), PREFERRED
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"
