tg-channel-manager

Universal config-driven content pipeline engine for any Telegram channel: news search via SearXNG, drafts, scheduled publishing, deduplication. All channel specifics are defined in config — one skill for any channel.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "tg-channel-manager" with this command: npx skills add axisrow/tg-channel-manager

TG Channel Manager

Pipeline: scout → draft → human approves → publisher.

Execution

python3 and curl are available in your environment (declared in requires.bins). Run all commands yourself using exec/bash tool. NEVER ask the user to run commands for you.

Startup

When you load this skill, run the preflight check FIRST:

python3 {baseDir}/scripts/tgcm.py --workspace {workspace} check

After check — act on results, don't ask:

  • All [ok] → proceed with the user's task silently
  • [fail] Bot token → ask the user for the token, then save it: tgcm.py config set bot-token <token>. Do NOT ask where the token is or offer choices
  • [warn] SEARXNG_URL → ask the user for the URL, then save it: tgcm.py config set searxng-url <url>. Proceed without it — scout won't work but other commands will
  • [fail] Channel → report which channel failed and why, include the fix from the output
  • [warn] No channels → mention it, but proceed — the user may want to init one

Settings saved via config set persist in tgcm/.config.json and are used by all subsequent commands.

NEVER ask follow-up questions about check results. Report what's wrong and the fix from the output. If the user hasn't specified a task — just report the check status, nothing else.

CLI Reference (FULL list — NO other commands exist)

All commands: python3 {baseDir}/scripts/tgcm.py --workspace {workspace} <cmd>

CommandWhat it does
init <name>Create a channel
listShow all channels
bind <name> --channel-id IDBind channel to Telegram
info <name> [--chat] [--subscribers] [--permissions] [--admins] [--all]Channel status
get-id <@username|ID>Resolve @username or numeric ID → full channel info (id, type, title)
checkPreflight: verify bot token, channels, env vars
config set <key> <value>Save setting locally (keys: bot-token, searxng-url)
config get <key>Read a saved setting
config listShow all saved settings
fetch-posts <name> [--limit N] [--dry-run]Load channel posts into dedup index (requires public channel with @username)
connect --channel-id ID [--channel-title T]Handle #tgcm connect event

Bot token is auto-resolved: --bot-token arg → $BOT_TOKEN env → openclaw.json (auto-search) → tgcm/.config.json. Just call tgcm.py get-id @username without --bot-token — the script finds the token itself. If auto-detection fails, save it once: tgcm.py config set bot-token <token>.

Channel name validation: ^[a-z0-9][a-z0-9_-]{0,62}$.

Quick Reference

User saysDo this
«узнай/определи channel-id»tgcm.py get-id @username
«подключи канал»Recipe: Connect a channel (ниже)
«какие каналы / список»tgcm.py list
«статус канала X»tgcm.py info X
«что в очереди»cat tgcm/<name>/content-queue.md
«загрузи посты / rebuild index»tgcm.py fetch-posts <name>

Recipes

Look up channel ID

python3 {baseDir}/scripts/tgcm.py get-id @username

Token is found automatically. Returns channel id, type, and title.

Connect a channel

  1. Get ID: python3 {baseDir}/scripts/tgcm.py get-id @username
  2. python3 {baseDir}/scripts/tgcm.py --workspace {workspace} init <name>
  3. python3 {baseDir}/scripts/tgcm.py --workspace {workspace} bind <name> --channel-id <id>
  4. Configure skills.entries["tg-channel-manager"].config in openclaw.json
  5. Add crons (see {baseDir}/references/cron-setup.md)

Load channel posts (rebuild dedup index)

python3 {baseDir}/scripts/tgcm.py --workspace {workspace} fetch-posts <name>

Fetches posts from the channel's public page (t.me/s/) and adds them to content-index.json. Options: --limit N (max pages, default 5), --dry-run (preview only). Requires: channel must be public (have a @username).

View channels / status

  • tgcm.py list
  • tgcm.py info <name>
  • Queue: cat tgcm/<name>/content-queue.md

Do NOT

  • Invent commands — the table above is the FULL list
  • Publish posts directly — only cron Publisher does this
  • Change draft → pending — only the human does this
  • Skip dedup-check before drafting
  • Ask the user to run commands — python3 and curl are available, use exec/bash yourself
  • Ask the user for bot token or env vars — token is auto-resolved, check shows what's wrong
  • Ask the user follow-up questions after check — report errors and the fix commands, don't offer choices
  • Ask whether it's a channel or group — get-id returns the type field, this skill is for channels only

Data Layout

tgcm/
  channels.json            <- [{"name", "channelId", "status", "createdAt"}, ...]
  {channel-name}/
    channel.json           <- per-channel metadata
    content-index.json     <- dedup index
    content-queue.md       <- post queue

A channel is bound when channelId is set and status is "connected".

Configuration

Parameters are read from openclaw.jsonskills.entries["tg-channel-manager"]:

Telegram

ParameterTypeDescription
config.channelIdstringTelegram channel ID for publishing
config.chatIdstringChannel community chat ID (optional)

Limits & Schedule

ParameterTypeDescription
config.maxPostsPerDaynumberMaximum posts per day
config.maxDraftsPerRunnumberMaximum drafts per scout run
config.timezonestringSchedule timezone (IANA format)
config.languagestringPost language (ru, en, ...)
config.cronScoutTimesstring[]Scout schedules (cron format)
config.cronPublisherTimesstring[]Publisher schedules (cron format)

Content

ParameterTypeDescription
config.rubricsarrayRubrics: [{id, emoji, name}, ...]
config.searchQueriesstring[]Search queries for SearXNG
config.searchIncludestringWhat to look for (filter description)
config.searchExcludestringWhat to discard (filter description)
config.evergreenstring[]Topics for articles when there are no news

Post Style

ParameterTypeDescription
config.postStyle.minCharsnumberMinimum characters per post
config.postStyle.maxCharsnumberMaximum characters per post
config.postStyle.emojiTitlebooleanEmoji before the title
config.postStyle.boldTitlebooleanBold title
config.postStyle.signaturestringPost signature
config.postStyle.newsFooterstringExtra text for news posts (empty = none)
config.postStyle.articleFooterstringExtra text for articles (empty = none)

Environment

ParameterTypeDescription
env.SEARXNG_URLstringSearXNG instance URL

Path Resolution

VariableHow to resolve
{workspace}Your CWD. Run pwd or use --workspace .
{baseDir}{workspace}/skills/tg-channel-manager

In sandbox mode (workspaceAccess: "none"), the workspace is under ~/.openclaw/sandboxes, not ~/.openclaw/workspace. Always use CWD-relative paths.

Cron setup: see {baseDir}/references/cron-setup.md.

Queue Format

Entry Format in content-queue.md

### <number>
- **Status:** draft | pending
- **Rubric:** <emoji> <name> (from config.rubrics)
- **Topic:** <topic>
- **Source:** <url> (for news)
- **Text:**

<post text>

Statuses:

  • draft — awaiting approval
  • pending — approved, ready for publishing

After publishing, the entry is removed from content-queue.md.

Deduplication

Before every draft — mandatory check:

python3 {baseDir}/scripts/dedup-check.py --base-dir <workspace> --topic "topic" --links "url1" "url2"

After publishing — add to index:

python3 {baseDir}/scripts/dedup-check.py --base-dir <workspace> --add <msgId> --topic "topic" --links "url"

Rebuild index (via Telegram search):

python3 {baseDir}/scripts/dedup-check.py --base-dir <workspace> --rebuild --channel-id <config.channelId>

Index is stored in <workspace>/content-index.json (or per-channel: tgcm/<name>/content-index.json).

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

小红书内容自动化套件

小红书内容自动化套件 - 爆款选题挖掘、文案生成、封面提示词、数据分析

Registry SourceRecently Updated
1870Profile unavailable
Automation

小红书笔记抓取与选题助手

抓取并整理小红书笔记公开页面信息(标题、正文摘要、作者、发布时间、互动数据、标签、封面图等)为结构化 JSON 或 Markdown。用于“根据笔记链接提取内容”“批量收集笔记基础信息”“生成笔记摘要素材”等场景;当用户提供小红书笔记 URL、URL 列表或需要导出机器可读结果时触发。

Registry SourceRecently Updated
2010Profile unavailable
Automation

Content360

Integrates with Content360 (app.content360.io) to create, schedule, and publish social media content across Facebook, LinkedIn, X, Instagram, YouTube, TikTok...

Registry SourceRecently Updated
2010Profile unavailable
Automation

RSS内容流

RSS 订阅 + AI 内容流引擎。监控多个 RSS 源,自动抓取最新文章, AI 分析提取核心观点,一键生成适配知乎/小红书/公众号的原创内容。 触发场景:用户说"帮我找今天的选题"、"RSS订阅"、"监控XX的更新"、 "把XX的文章改写成小红书"、"我需要一些内容灵感"、"自动生成今日内容"。 Keywor...

Registry SourceRecently Updated
2850Profile unavailable