Compose and post formatted content to a Telegram channel -- MarkdownV2 escaping, message splitting, media ordering
Add this skill
npx mdskills install n24q02m/channel-postComprehensive Telegram channel posting workflow with detailed MarkdownV2 escaping rules and media handling
1---2name: channel-post3description: Compose and post formatted content to a Telegram channel -- MarkdownV2 escaping, message splitting, media ordering4argument-hint: "[content to post]"5---67# Channel Post89Compose and post formatted content to a Telegram channel with correct formatting.1011## Steps12131. **Identify target channel**:14 - `chats(action="list")` to find the channel15 - Channel chat_id is a negative number (e.g., -1001234567890) or @username16172. **Compose content** with the user:18 - Draft the message text19 - Apply MarkdownV2 formatting (see escaping rules below)20 - Determine if media attachments are needed21223. **Handle media attachments** (if any):23 - Photo with caption: `media(action="send_photo", chat_id="...", file_path="...", caption="...")` -- caption goes WITH the photo, not as a separate message24 - Document: `media(action="send_document", chat_id="...", file_path="...")`25 - Multiple photos: send as media group, first photo carries the caption26274. **Split long messages** if content exceeds 4096 characters:28 - Split at paragraph boundaries (double newline) to preserve readability29 - Each chunk must be independently valid MarkdownV2 (no unclosed formatting)30 - Send chunks sequentially with the same parse_mode31325. **Send and verify**:33 - `messages(action="send", chat_id="<channel>", text="<content>", parse_mode="MarkdownV2")`34 - Verify the message appears correctly in the channel35 - If formatting breaks, check the escaping rules below3637## MarkdownV2 Escaping Rules3839All these characters MUST be escaped with `\` when used as literal text (outside formatting markup):4041```42_ * [ ] ( ) ~ ` > # + - = | { } . !43```4445### Common patterns4647| Intent | Correct MarkdownV2 |48|---|---|49| Bold text | `*bold*` |50| Italic text | `_italic_` |51| Code inline | `` `code` `` |52| Code block | ```` ```language\ncode\n``` ```` |53| Link | `[text](https://url)` |54| Literal dot in "v2.0" | `v2\.0` |55| Literal dash in list | `\- item` |56| Price "$9.99" | `\$9\.99` |57| Exclamation "Done!" | `Done\!` |58| Parenthetical "(note)" | `\(note\)` |59| Hashtag "#topic" | `\#topic` |6061### Formatting inside formatting6263When nesting, the inner delimiter must also be escaped:64- Bold italic: `*_bold italic_*` -- the `_` inside `*...*` does NOT need escaping65- But literal `_` inside bold: `*score\_value*` -- MUST escape6667### Frequent mistakes6869- Forgetting to escape `.` in URLs used as plain text (not inside `[](...)`)70- Forgetting to escape `!` at end of sentences71- Forgetting to escape `-` in bulleted lists (use `\-` or switch to HTML `<li>`)72- Unescaped `(` `)` in regular text (Telegram interprets them as link syntax)7374## When to Use7576- Publishing announcements, updates, or newsletters to a Telegram channel77- Posting formatted content (code snippets, tables, lists) to channels78- Sending content with images or documents to channels79- Any message that needs careful MarkdownV2 formatting80
Full transparency — inspect the skill content before installing.