# Channel Post

> Compose and post formatted content to a Telegram channel -- MarkdownV2 escaping, message splitting, media ordering

- Skill: `n24q02m/channel-post` (Agent Skill)
- Install (CLI): `npx skillmds@latest add n24q02m/channel-post`
- Raw SKILL.md: https://api.skillmd.com/api/skills/n24q02m/channel-post/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: n24q02m (https://skillmd.com/u/n24q02m)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/n24q02m/channel-post

---


# Channel Post

Compose and post formatted content to a Telegram channel with correct formatting.

## Steps

1. **Identify target channel**:
   - `chat(action="list")` to find the channel
   - Channel chat_id is a negative number (e.g., -1001234567890) or @username

2. **Compose content** with the user:
   - Draft the message text
   - Apply MarkdownV2 formatting (see escaping rules below)
   - Determine if media attachments are needed

3. **Handle media attachments** (if any):
   - Photo with caption: `media(action="send_photo", chat_id="...", file_path_or_url="...", caption="...")` -- caption goes WITH the photo, not as a separate message
   - Document: `media(action="send_file", chat_id="...", file_path_or_url="...")`
   - Multiple photos: send as media group, first photo carries the caption

4. **Split long messages** if content exceeds 4096 characters:
   - Split at paragraph boundaries (double newline) to preserve readability
   - Each chunk must be independently valid MarkdownV2 (no unclosed formatting)
   - Send chunks sequentially with the same parse_mode

5. **Send and verify**:
   - `message(action="send", chat_id="<channel>", text="<content>", parse_mode="MarkdownV2")`
   - Verify the message appears correctly in the channel
   - If formatting breaks, check the escaping rules below

## MarkdownV2 Escaping Rules

All these characters MUST be escaped with `\` when used as literal text (outside formatting markup):

```
_ * [ ] ( ) ~ ` > # + - = | { } . !
```

### Common patterns

| Intent | Correct MarkdownV2 |
|---|---|
| Bold text | `*bold*` |
| Italic text | `_italic_` |
| Code inline | `` `code` `` |
| Code block | ```` ```language\ncode\n``` ```` |
| Link | `[text](https://url)` |
| Literal dot in "v2.0" | `v2\.0` |
| Literal dash in list | `\- item` |
| Price "$9.99" | `\$9\.99` |
| Exclamation "Done!" | `Done\!` |
| Parenthetical "(note)" | `\(note\)` |
| Hashtag "#topic" | `\#topic` |

### Formatting inside formatting

When nesting, the inner delimiter must also be escaped:
- Bold italic: `*_bold italic_*` -- the `_` inside `*...*` does NOT need escaping
- But literal `_` inside bold: `*score\_value*` -- MUST escape

### Frequent mistakes

- Forgetting to escape `.` in URLs used as plain text (not inside `[](...)`)
- Forgetting to escape `!` at end of sentences
- Forgetting to escape `-` in bulleted lists (use `\-` or switch to HTML `<li>`)
- Unescaped `(` `)` in regular text (Telegram interprets them as link syntax)

## When to Use

- Publishing announcements, updates, or newsletters to a Telegram channel
- Posting formatted content (code snippets, tables, lists) to channels
- Sending content with images or documents to channels
- Any message that needs careful MarkdownV2 formatting

