Trevin

Telegram Compose

AIエージェントv1.0.4
作者:Trevin更新日 2026-05-17全 5 バージョン · 最新版の公開日 2026-02-12telegram-compose@clawhub_tmchow/telegram-compose
タスク自動化ツール呼び出し#Telegram#Message

AlphaMoatによると、2026-10時点でTelegram Composeのダウンロード数は8,781、スター数は5で、累計ダウンロード数で今回のランキング対象AIスキル10,914件中3,162位、AIエージェントでは1,632件中418位です。

一覧の初期表示は累計ダウンロード数順で、スター数順にも並べ替えできます。詳細ページの順位は累計ダウンロード数で計算しています。

ダウンロード数
8781
スター数
5
累計ダウンロード順位
#3,162
全体の上位 29% · AIエージェントの上位 26%
プラットフォームダウンロード数スター数コメント
ClawHub ↗66194-
SkillHub ↗87815—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

要約、通知、レポートなどの構造化された内容をHTMLで整える。長文や構造化返信ではサブエージェントを使い、短文は直接送ることを推奨する。送信には対象アカウントの設定が必要。 Telegramメッセージの送信は外部への操作です。送信前に宛先と最終文面を確認してください。

資料公開日 2026-10-27

できること

  • TelegramレポートをHTML形式に整える
  • 通知や要約を階層化する

使う場面

  • 長文または構造化されたTelegramメッセージを送るとき
  • 読みやすいHTML形式が必要なとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

この要約をTelegram用のHTMLメッセージに整えて
この通知を見出しとリストで構成して

月次の推移

ダウンロード数8781
5182711590482026-05 · ダウンロード数 54492026-06 · ダウンロード数 56562026-07 · ダウンロード数 59642026-08 · ダウンロード数 62222026-09 · ダウンロード数 65082026-10 · ダウンロード数 878126-0526-0926-10
スター数5
4562026-05 · スター数 52026-06 · スター数 52026-07 · スター数 52026-08 · スター数 52026-09 · スター数 52026-10 · スター数 526-0526-0926-10

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-108781—5
2026-096508—5
2026-086222+4.3%5
2026-075964+5.4%5
2026-065656+3.8%5
2026-055449—5

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

9.4 KB・ClawHub v1.0.4
---
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":{
すべて表示(全 314 行)
    "os": ["darwin", "linux"],
    "requires": {
      "binaries": ["jq", "curl"],
      "config": ["channels.telegram.accounts.<account>.botToken"]
    },
    "credentials": "Reads Telegram bot token from OpenClaw config file (~/.openclaw/openclaw.json or ~/.openclaw/clawdbot.json). The specific account name must be provided by the caller — the skill does not auto-select accounts.",
    "network": ["api.telegram.org"]
  }}
model-preference: claude-haiku-4-5
subagent: true
allowed-tools: exec, Read
---

# Telegram Compose

Format and deliver rich, scannable Telegram messages via direct API with HTML formatting.

## How This Skill Gets Used

**This skill is auto-invoked by the main session agent.** No other skills need to know about it.

### Decision Rule (for the main session agent)

Before sending a message to Telegram, check:

- **Short reply (<3 lines, no structure):** Send directly via OpenClaw `message` tool. Done.
- **Substantive content (>3 lines, or has lists/stats/sections/reports):** Spawn this skill as a sub-agent.

### Spawning the sub-agent

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.

### What the sub-agent receives

1. **Skill path** — so it can read the formatting rules
2. **Bot account name** — which Telegram bot account to use (must be specified, never auto-selected)
3. **Chat ID** — where to send
4. **Thread ID** — topic thread if applicable
5. **Raw content** — the unformatted text/data to turn into a rich message

---

## Credentials

**Bot token:** Stored in the OpenClaw config file under `channels.telegram.accounts.<name>.botToken`.

**The account name is always provided by the caller.** Never auto-select or iterate accounts.

```bash
# 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
```

---

## Sending

```bash
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 }
    }')"
```

---

## Formatting Rules

### HTML Tags

```
<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>
```

### Escaping

Escape these characters in **text content only** (not in your HTML tags):
- `&` → `&amp;`  (do this FIRST to avoid double-escaping)
- `<` → `&lt;`
- `>` → `&gt;`

Common gotcha: content containing `&` (e.g., "R&D", "Q&A") will break HTML parsing if not escaped.

### Structure Pattern

```
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>
```

### Style Rules

1. **Faux headings:** `EMOJI <b>CAPS TITLE</b>` with blank line after
2. **Emojis:** 1-3 per message as visual anchors, not decoration
3. **Whitespace:** Blank lines between sections
4. **Long content:** Use `<blockquote expandable>`
5. **Links:** Own line, with arrow: `Link Text →`

### Examples

**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>
```

---

## Mobile-Friendly Data Display

**Never use `<pre>` for stats, summaries, or visual layouts.** `<pre>` uses monospace font and wraps badly on mobile, breaking alignment and tree characters. Reserve `<pre>` 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
```

---

## Limits and Splitting

- **Message max:** 4,096 characters
- **Caption max:** 1,024 characters

**If formatted message exceeds 4,096 chars:**
1. Split at section boundaries (blank lines between `<b>HEADING</b>` blocks)
2. Each chunk must be valid HTML (don't split inside a tag)
3. Send chunks sequentially with a 1-second delay between them
4. First chunk gets the full heading; subsequent chunks get a continuation indicator: `<i>(continued)</i>`

---

## Error Handling

**If Telegram API returns an error:**

| Error | Action |
|-------|--------|
| `Bad Request: can't parse entities` | HTML is malformed. Strip all HTML tags and resend as plain text. |
| `Bad Request: message is too long` | Split per the rules above and retry. |
| `Bad Request: message thread not found` | Retry without `message_thread_id` (sends to General). |
| `Too Many Requests: retry after X` | Wait X seconds, then retry once. |
| Any other error | Report the error back; don't retry. |

**Fallback rule:** If HTML formatting fails twice, send as plain text rather than not sending at all. Delivery matters more than formatting.

---

## Sub-Agent Execution Checklist

When running as a sub-agent, follow this sequence:

1. **Parse the task** — extract Bot account name, Chat ID, Thread ID (if any), skill path, and raw content
2. **Read this SKILL.md** — load the formatting rules
3. **Format the content** — apply HTML tags, structure pattern, style rules, mobile-friendly data display
4. **Escape special chars** — `&` then `<` then `>` in text content only (not in your HTML tags)
5. **Check length** — if >4,096 chars, split at section boundaries
6. **Get bot token** — auto-detect config path, extract token for the specified account (error if not found)
7. **Send via curl** — use the appropriate template (with/without thread ID)
8. **Check response** — parse curl output for `"ok": true`
9. **Handle errors** — follow the error handling table above
10. **Report back** — reply with message_id on success, or error details on failure

AIエージェントの人気スキル

self-improving agentAIエージェント

開発中の学び、エラー、訂正を Markdown ファイルに記録し、再利用やワークスペースの記憶への昇格に備えます。

↓ 160.3万★ 4544pskoett
技能发现·Find SkillsAIエージェント

やりたいことを自然文で伝えると、ローカルとリモートのカタログからスキルを探して推薦するスキルです。

↓ 157.4万★ 1810桂皮
Agent BrowserAIエージェント

AI エージェント向けのブラウザ自動化コマンドラインスキルです。

↓ 122.3万★ 1001Nicolas Kleiber
Self-Improving + Proactive AgentAIエージェント

利用者の訂正と自己点検を層構造の記憶に蓄え、使われ方に応じて昇格や保管を行うスキルです。

↓ 69.6万★ 1622Iván
Proactive AgentAIエージェント

AI エージェントの先回り、作業記憶、振り返りの手順を計画するためのワークスペース設定ガイドです。

↓ 57.9万★ 916halthelobster
Skill CreatorAIエージェント

効果的な Claude スキルの作成・更新ガイドです。

↓ 47.7万★ 485chindden
Skill VetterAIエージェント

第三者のスキルを入れる前に、出所と権限と危険な作りを手順に沿って調べるスキルです。

↓ 44.5万★ 1328spclaudehome
唐朝诗仙李白 · Ai Agent SkillAIエージェント

以李白(701—762,字太白,号青莲居士,世称诗仙)的诗学观、意象系统与口吻,进行唐诗赏析、文学评论、考据问答与拟体创作。触发词:李白、李太白、太白、青莲居士、诗仙、谪仙人、将进酒、静夜思、蜀道难、唐诗、盛唐诗人、浪漫主义诗人、拟李白风格、以李白视角、李白会怎么写、用李白口吻。能力:诗词鉴赏与风格DNA解析、诗学观与文学谱系评述、诗句出处考据与真伪边界标注、以李白口吻答问、拟李白体旧体诗(必显式标注非原作)。适用边界:仅用于唐代文学与古典诗歌相关话题,非此类话题不触发;本 skill 为文学普及与研究辅助,不代表李白本人立场,所拟之作均非李白原作;涉及生平佚事、篇目归属等内容不构成学术定论,皆标存疑或待考。

↓ 43.6万★ 4user_ff4d9420

Trevinのその他のスキル

データ月:2026-10 · ダウンロード数とスター数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。