/telegram-skills:tg-classic-messagesfrom telegram-skills
Sends and edits classic Telegram bot messages: text, MarkdownV2/HTML escaping, entities, media with captions, albums, link previews, quotes, and message management (copy, forward, delete). Helps choose between classic and rich message formats.
Ships in telegram-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Checked against the official docs on 2026-12-02: Bot API 10.5 (November 22, 2026). Pre-send rules below come from Formatting options, the method pages and Sending files. Nothing here was run against a live bot.
Default to the classic message. Take sendRichMessage when the content needs structure the classic format lacks. examples/same-post.md builds one post both ways.
| Need | Classic | Rich (tg-rich-messages) |
|---|---|---|
| Text up to 4096 characters | yes | yes |
| Longer than 4096, one message | no, split into several | up to 32768 |
| Headings, tables, lists, formulas, details | no | yes |
| Link preview control | link_preview_options | no such parameter |
| Media with a caption, spoiler flag, caption position | caption, has_spoiler, show_caption_above_media | media blocks with their own captions |
| Album of 2-10 items | sendMediaGroup | collage, slideshow |
| Poll | sendPoll (tg-polls) | no poll block |
| Old clients | render everything | show an update placeholder for features they lack (2026-08-25) |
Editing is one method for both: editMessageText takes text or rich_message.
| What | Limit |
|---|---|
text | 1-4096 characters after entities parsing |
caption | 0-1024 characters after entities parsing |
sendMediaGroup | 2-10 items; documents and audio only group with their own type |
| Upload by multipart | photo 10 MB, other files 50 MB |
| Upload by HTTP URL | photo 5 MB, other 20 MB; sendDocument by URL only for .PDF and .ZIP |
By file_id | no limit, but no type change, and a file_id belongs to one bot |
| Photo dimensions | width + height at most 10000, ratio at most 20 |
Download with getFile | 20 MB |
deleteMessages, copyMessages, forwardMessages | 1-100 ids |
reply_parameters.quote | 0-1024 characters, exact substring of the replied message |
| Local Bot API server | upload 2000 MB, download unlimited, see tg-bot-ops |
Measure against the limits after parsing, on the visible text: tags and escapes don't count. Entity offset and length are in UTF-16 code units, so an emoji outside the BMP counts as two: in Python, len(text.encode('utf-16-le')) // 2.
Text over 4096: split on paragraph boundaries, re-open entities in each part, and send in order with the pacing from tg-bot-ops. Over 1024 in a caption: send the media with a short caption and the text as a reply, or switch to rich.
Pick one per message: parse_mode or an explicit entities list. Entities need no escaping, so generated text is safest that way.
<, > and & in all dynamic text as <, >, &. Only the listed tags work; an unknown tag fails the send._ * [ ] ( ) ~ > # + - = | { } . !outside entities, including every.and-of plain text. Insidepreandcodeescape only `` `` and \; inside the (...) of a link only ) and \.date_time.Nesting: entities overlap only by full containment. bold, italic, underline, strikethrough and spoiler nest freely, except with pre and code. Quotes can't nest. In MarkdownV2 two adjacent quotes need an empty bold entity (**) between them.
tg://user?id= works only inside an inline link or an inline keyboard button, never as plain text.<blockquote>, <blockquote expandable>.<tg-time>, see Live dates.<tg-emoji emoji-id="…">👍</tg-emoji>, with a real emoji inside as fallback. Allowed for bots with extra usernames bought on Fragment, or for messages sent directly to private chats, groups and supergroups when the bot's owner has Premium. Channels are not on that second list: without Fragment usernames, plan the post without custom emoji. Not tested live for this skill.message_effect_id works in private chats only.Any moment the bot names (an event start, a deadline) and any countdown go into a date_time entity; a date with no time of day, such as a payment date in a ledger, stays plain text. Telegram renders it in the reader's timezone and language, and a relative one stays true as time passes, so the bot never guesses a timezone or edits "in 3 days" into "in 2 days".
Recipe for "when is the next event and how long until it":
Next stream: <tg-time unix="1796929200" format="wDt">Thursday, December 10, 2026, 19:00 UTC</tg-time>
Starts <tg-time unix="1796929200" format="r">December 10, 2026, 19:00 UTC</tg-time>
unix is the event time in Unix seconds, UTC.format="wDt": weekday, long date, time without seconds. "How long until" or "how long ago" takes format="r", which allows no other letters. The full grammar is r|w?[dD]?[tT]?: w weekday, d or D short or long date ("17.03.22" or "March 17, 2022").t shows the time without seconds ("22:45"), T with seconds ("22:45:00"); the docs' own wDT example therefore shows seconds, which an event announcement doesn't need.format is empty and wherever the entity isn't rendered. Write it as an absolute date with the timezone, for the r tag too: a relative fallback goes stale.The same entity in other forms:
.entities: {"type":"date_time","offset":13,"length":38,"unix_time":1796929200,"date_time_format":"wDt"}, with offset and length in UTF-16 code units over the fallback text.RichTextDateTime with text, unix_time, date_time_format; rich button text accepts it too (tg-rich-messages).style on InlineKeyboardButton is primary (blue), success (green) or danger (red); without it the app picks the look. Give primary to the single main action of a message, the one the text leads to, and leave the other buttons unstyled:
{"inline_keyboard": [
[{"text": "Join the stream", "url": "https://example.com/stream", "style": "primary"}],
[{"text": "Remind me", "callback_data": "remind:1796929200"}, {"text": "Schedule", "callback_data": "schedule"}]
]}
Keep success for a confirmed good outcome and danger for a destructive action such as "Delete". Two primary buttons in one message leave the reader without a main action.
link_preview_options on sendMessage and editMessageText:
is_disabled: true removes the preview.url picks the page instead of the first link in the text.prefer_small_media, prefer_large_media take effect only with an explicit url.show_above_text moves the preview above the text.file_id for anything already sent; keep it per bot.show_caption_above_media, has_spoiler sit on the media method or InputMedia*.message_id 0: the server may schedule a heavy video for a big chat instead of sending at once. Treat 0 as unknown, never as a stored id.tg-bot-ops.protect_content guards one message against forwarding and saving. Protection for a whole chat is a client setting, see tg-capability-map.disable_notification sends silently.copyMessage has no link to the original. It can't copy service, paid media, giveaway or invoice messages; a quiz only if the bot knows correct_option_ids.deleteMessage: under 48 hours old. A bot deletes its own messages and, in private chats, incoming ones. In channels it needs can_post_messages for its own posts and can_delete_messages for others. A dice in a private chat is deletable only after 24 hours.pinChatMessage needs can_pin_messages in groups and can_edit_messages in channels.Editing: editMessageText, editMessageCaption, editMessageMedia, editMessageReplyMarkup. Edits count against the chat's flood limits.
parse_mode, or sent as entities.tg-bot-ops: a timeout is unknown, not failed.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub serejaris/telegram-skills --plugin telegram-skills15 skills in this plugin
/tg-bot-opsUse when running a Telegram bot in production: webhook or long polling, allowed_updates, webhook secret token, bot settings from code (setMySettings, getMe, privacy mode, callback_query_mode), botinvite links, 429 and retry_after, file retries, broadcast limits and paid broadcasts, lost updates on shutdown, a poison update after new Bot API types, t.me outage and fallback domains, local Bot API server./tg-capability-mapUse before promising a Telegram feature or designing around one: what a bot can do in Bot API, what lives only in the client or MTProto (scheduled posts, channel stats, poll stats, channel stories, folders, boosts, welcome messages, communities), and what never to promise from a bot./tg-Other plugins' skills for the same job