Format and deliver rich Telegram messages with HTML formatting via direct Telegram API. Auto-invoked by the main session for substantive Telegram output — no other skills need to call it. Decision rule: If your Telegram reply is >3 lines or contains structured data (lists, stats, sections, reports), spawn this as a Haiku sub-agent to format and send. Short replies (<3 lines) go directly via OpenClaw message tool. Handles: research summaries, alerts, status updates, reports, briefings, notifications — anything with visual hierarchy.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install telegram-compose或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install telegram-compose⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/telegram-compose/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: telegram-compose description: | Format and deliver rich Telegram messages with HTML formatting via direct Telegram API. Auto-invoked by the main session for substantive Telegram output — no other skills need to call it. Decision rule: If your Telegram reply is >3 lines or contains structured data (lists, stats, sections, reports), spawn this as a Haiku sub-agent to format and send. Short replies (<3 lines) go directly via OpenClaw message tool. Handles: research summaries, alerts, status updates, reports, briefings, notifications — anything with visual hierarchy. metadata: | {"openclaw":{ "os": ["darwin", "linux"], "requires": { "binaries": ["jq", "curl"], "config": ["channels.telegram.accounts.
Format and deliver rich, scannable Telegram messages via direct API with HTML formatting.
This skill is auto-invoked by the main session agent. No other skills need to know about it.
Before sending a message to Telegram, check:
message tool. Done.The main session agent calls sessions_spawn with:
sessions_spawn(
model: "claude-haiku-4-5",
task: "<task content — see template below>"
)
Task template:
Read the telegram-compose skill at {baseDir}/SKILL.md for formatting rules, then format and send this content to Telegram.
Bot account: <account_name> (e.g., "main" — must match a key in channels.telegram.accounts)
Chat ID: <chat_id>
Thread ID: <thread_id> (omit this line if not a forum/topic chat)
Content to format:
---
<raw content here>
---
After sending, reply with the message_id on success or the error on failure. Do NOT include the formatted message in your reply — it's already been sent to Telegram.
IMPORTANT: The caller MUST specify which bot account to use. The sub-agent must NOT auto-select or iterate accounts.
CRITICAL: The sub-agent announcement routes back to the main session, NOT to Telegram. So the main session should reply NO_REPLY after spawning to avoid double-messaging. The sub-agent's curl call is what delivers to Telegram.
---
Bot token: Stored in the OpenClaw config file under channels.telegram.accounts..
The account name is always provided by the caller. Never auto-select or iterate accounts.
# Auto-detect config path
CONFIG=$([ -f ~/.openclaw/openclaw.json ] && echo ~/.openclaw/openclaw.json || echo ~/.openclaw/clawdbot.json)
# ACCOUNT is provided by the caller (e.g., "main")
# Validate the account exists before extracting the token
ACCOUNT="<provided_account_name>"
BOT_TOKEN=$(jq -r ".channels.telegram.accounts.$ACCOUNT.botToken" "$CONFIG")
if [ "$BOT_TOKEN" = "null" ] || [ -z "$BOT_TOKEN" ]; then
echo "ERROR: Account '$ACCOUNT' not found in config or has no botToken"
exit 1
fi
---
CONFIG=$([ -f ~/.openclaw/openclaw.json ] && echo ~/.openclaw/openclaw.json || echo ~/.openclaw/clawdbot.json)
# ACCOUNT provided by caller — never auto-select
BOT_TOKEN=$(jq -r ".channels.telegram.accounts.$ACCOUNT.botToken" "$CONFIG")
# Without topic thread
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d "$(jq -n \
--arg chat "$CHAT_ID" \
--arg text "$MESSAGE" \
'{
chat_id: $chat,
text: $text,
parse_mode: "HTML",
link_preview_options: { is_disabled: true }
}')"
# With topic thread
curl -s -X POST "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d "$(jq -n \
--arg chat "$CHAT_ID" \
--arg text "$MESSAGE" \
--argjson thread $THREAD_ID \
'{
chat_id: $chat,
text: $text,
parse_mode: "HTML",
message_thread_id: $thread,
link_preview_options: { is_disabled: true }
}')"
---
<b>bold</b> <i>italic</i> <u>underline</u> <s>strike</s>
<code>mono</code> <pre>code block</pre>
<tg-spoiler>hidden until tapped</tg-spoiler>
<blockquote>quote</blockquote>
<blockquote expandable>collapsed by default</blockquote>
<a href="url">link</a>
<a href="tg://user?id=123">mention by ID</a>
Escape these characters in text content only (not in your HTML tags):
& → & (do this FIRST to avoid double-escaping)< → <> → >Common gotcha: content containing & (e.g., "R&D", "Q&A") will break HTML parsing if not escaped.
EMOJI <b>HEADING IN CAPS</b>
<b>Label:</b> Value
<b>Label:</b> Value
<b>SECTION</b>
• Bullet point
• Another point
<blockquote>Key quote or summary</blockquote>
<blockquote expandable><b>Details</b>
Hidden content here...
Long details go in expandable blocks.</blockquote>
<a href="https://...">Action Link →</a>
EMOJI CAPS TITLE with blank line afterLink Text →Status update:
📋 <b>TASK COMPLETE</b>
<b>Task:</b> Deploy v2.3
<b>Status:</b> ✅ Done
<b>Duration:</b> 12 min
<blockquote>All health checks passing.</blockquote>
Alert:
⚠️ <b>ATTENTION NEEDED</b>
<b>Issue:</b> API rate limit at 90%
<b>Action:</b> Review usage
<a href="https://dashboard.example.com">View Dashboard →</a>
List:
✅ <b>PRIORITIES</b>
• <s>Review PR #234</s> — done
• <b>Finish docs</b> — in progress
• Deploy staging
<i>2 of 3 complete</i>
---
Never use for stats, summaries, or visual layouts. uses monospace font and wraps badly on mobile, breaking alignment and tree characters. Reserve for actual code/commands only.
For structured data, use emoji + bold + separators:
❌ BAD (wraps on mobile):
<pre>
├─ 🟠 Reddit 32 threads │ 1,658 pts
└─ 🌐 Web 8 pages
</pre>
✅ GOOD (flows naturally):
🟠 <b>Reddit:</b> 32 threads · 1,658 pts · 625 comments
🔵 <b>X:</b> 22 posts · 10,695 likes · 1,137 reposts
🌐 <b>Web:</b> 8 pages (supplementary)
🗣️ <b>Top voices:</b> @handle1 · @handle2 · r/subreddit
Other patterns:
Record cards:
<b>Ruby</b>
Birthday: Jun 16 · Age: 11
<b>Rhodes</b>
Birthday: Oct 1 · Age: 8
Bullet lists:
• <b>hzl-cli:</b> 1.12.0
• <b>skill:</b> 1.0.6
---
If formatted message exceeds 4,096 chars:
HEADING blocks)(continued)---
If Telegram API returns an error:
...
安装 Telegram Compose 后,可以对 AI 说这些话来触发它
Send a Slack message to the #engineering channel about the deployment
Formats and sends the message with relevant context, tagging the right people
Summarize all unread messages in my inbox from today
Reads messages across connected channels and returns a prioritized summary
Draft a reply to this customer complaint and send it for review
Writes an empathetic, professional response and routes it to the approval queue
将技能文件夹放到 ~/.claude/skills/telegram-compose/ 目录(个人级,所有项目可用),或 .claude/skills/telegram-compose/(项目级)。重启 AI 客户端后,用 /telegram-compose 主动调用,或让 AI 根据上下文自动发现并使用。
Telegram Compose 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Telegram Compose 可免费安装使用。请查阅仓库了解许可证信息。
Format and deliver rich Telegram messages with HTML formatting via direct Telegram API. Auto-invoked by the main session for substantive Telegram output — no other skills need to call it. Decision rule: If your Telegram reply is >3 lines or contains structured data (lists, stats, sections, reports), spawn this as a Haiku sub-agent to format and send. Short replies (<3 lines) go directly via OpenClaw message tool. Handles: research summaries, alerts, status updates, reports, briefings, notifications — anything with visual hierarchy.
Telegram Compose 属于「Communication」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。