itstauq

Telegram Auto Topic

AI 智能体v0.1.8
作者:itstauq更新于 2026-05-11共 9 个版本 · 最新版本发布于 2026-02-12telegram-auto-topic@clawhub_itstauq/telegram-auto-topic
任务自动化#Telegram#Message

据 AlphaMoat 统计,截至 2026-09,Telegram Auto Topic 累计下载 4,489 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 2,150 位,在「AI 智能体」分类(969 个)中排名第 410 位。

累计安装
573
累计下载
4,489
星标
3
全站排名
#2,150
全站前 43% · 「AI 智能体」前 43%
平台累计安装累计下载星标评论
ClawHub ↗1383,9543-
SkillHub ↗5734,4893—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

在群里发一条以 /topic 开头的消息,就会为它新建一个话题,标题由消息内容自动取,不必自己想。前提是群已在 OpenClaw 的频道配置里登记、群已启用话题模式,且机器人是群管理员并拥有管理话题权限。三个前提缺一不可。使用仅具备所需群权限的专用 bot token,并保护 OpenClaw 配置;广泛部署前检查命令如何处理 token。确认目标群已启用论坛话题,且机器人是管理员并拥有 Manage Topics 权限。

资料发布于 2026-10-27

可以用来做什么

  • 把一条讨论按主题拆成独立话题
  • 在群里快速建一个按内容命名的话题

什么时候用

  • 群里话题多、需要分门别类时
  • 不想手动起标题时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

在群里用这条消息开个新话题
帮我把这周的讨论按主题分话题

月度数据趋势

累计下载4,489
3,4013,9864,5702026-03 · 累计下载 3,4822026-05 · 累计下载 3,7212026-06 · 累计下载 3,5902026-07 · 累计下载 3,9342026-08 · 累计下载 4,0492026-09 · 累计下载 4,48926-0326-09
星标3
2342026-03 · 星标 32026-05 · 星标 32026-06 · 星标 32026-07 · 星标 32026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-094,489—3
2026-084,049+2.9%3
2026-073,934+9.6%3
2026-063,590-3.5%3
2026-053,721—3
2026-033,482—3

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

4.0 KB · ClawHub v0.1.8
---
name: telegram-auto-topic
description: >
  Add `/topic` to the start of any message in a Telegram forum group to
  auto-create a new topic from it. A title is generated automatically from
  the message content.
  Github: https://github.com/itstauq/telegram-auto-topic
metadata:
  openclaw:
    requires:
展开全部(共 109 行)
      config:
        - ~/.openclaw/openclaw.json
      env:
        - OPENCLAW_CONFIG
      bins:
        - curl
        - jq
---

# Telegram Auto-Topic

Add `/topic` to the start of any message in a Telegram forum group → a new topic is created from it. The title is figured out from your message automatically — no need to think of one yourself.

### Example

**1.** You send a message starting with `/topic`:
> /topic @your_bot I need to look into renewing my passport before March

**2.** A new forum topic **"Passport Renewal Before March"** is created with your message quoted inside it. You get a reply linking directly to the new topic.

## Prerequisites

- The group must be configured in OpenClaw (`channels.telegram.groups.<CHAT_ID>`) — this is how OpenClaw knows to process messages from it.
- The group must have **forum/topics** enabled.
- Your bot must be an admin in the group with **Manage Topics** permission.

## Handling /topic

When a message starts with `/topic`:

1. Generate a concise 3-7 word title summarising the message.
2. Run the script — replace placeholders with actual values from the message context:
   ```
   scripts/telegram-auto-topic.sh <chat_id> <message_id> "<sender name>" "<title>" "<text after /topic>"
   ```
   Pass an empty string for the text arg if there's no text (e.g. media-only).
   Use the path relative to this skill's directory.
3. The script returns JSON with `topic_id`, `title`, and `link`.
4. Reply to the original message with: `Topic created → [<title>](<link>)`
5. Then send a response to the actual message content in the NEW topic (use message tool with `threadId` from the returned `topic_id`). Respond naturally as you would to any message.
6. After both replies are sent, respond with NO_REPLY.

## How It Works

1. You send a message starting with `/topic`
2. A new forum topic is created — titled from your message automatically
3. Your message is quoted in the new topic with your name
4. You get a reply with a clickable link to the new topic
5. The bot responds to your message in the new topic

Works with media too — photos, videos, or documents with `/topic` in the caption get forwarded into the new topic.

## Script Reference

```bash
scripts/telegram-auto-topic.sh <chat_id> <message_id> <sender> [title] [text]
```

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `chat_id` | arg | yes | Supergroup chat ID (negative number) |
| `message_id` | arg | yes | Original message to quote |
| `sender` | arg | yes | Display name of original sender |
| `title` | arg | no | Topic title. Falls back to first ~50 chars of text if omitted |
| `text` | arg | no | Message body after `/topic`. If empty, forwards as media |

Returns JSON: `{"topic_id": 123, "title": "Used title", "link": "https://t.me/c/..."}`

## Optional configuration

**Skip the @bot mention** — by default, the bot only responds when mentioned. To use `/topic` without mentioning the bot:

```json
"channels.telegram.groups.<CHAT_ID>": {
  "requireMention": false
}
```

**Telegram autocomplete** — to get `/topic` in Telegram's command menu, add under `channels.telegram`:

```json
{
  "customCommands": [
    {
      "command": "topic",
      "description": "Create a new forum topic from a message"
    }
  ]
}
```

## Limitations

- **Attribution:** Quoted messages appear as sent by the bot (Telegram API limitation). Sender name is included as attribution text below the quote.
- **Media:** Forwarded media shows a "Forwarded from" header — best available but not native.
- **Forum groups only:** Won't work in regular groups or DMs.
- **Permissions:** Bot needs admin with Manage Topics.
- **Title length:** Telegram caps topic names at 128 characters.

「AI 智能体」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。