Token导航 LogoToken导航

Agent Skill · 研究检索

sergei-mikhailov-tg-channel-reader(谢尔盖·米哈伊洛夫 tg 频道读者)

sergei-mikhailov-tg-channel-reader 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

sergei-mikhailov-tg-channel-reader 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,674 个 Skill 里排第 58,684。

总安装 408周安装 17GitHub Stars 52下载 136核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sergei-mikhailov-tg-channel-reader(谢尔盖·米哈伊洛夫 tg 频道读者)
来源仓库:https://github.com/aaaaqwq/claude-code-skills
仓库路径:skills/sergei-mikhailov-tg-channel-reader
安装命令:
npx skills add https://github.com/aaaaqwq/claude-code-skills --skill sergei-mikhailov-tg-channel-reader
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aaaaqwq/claude-code-skills --skill sergei-mikhailov-tg-channel-reader

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于读取 Telegram 频道的帖子与评论内容。支持公开及用户已订阅的私有频道数据获取。可提取帖子正文、时间戳及关联讨论回复。

安装命令为 npx skills add https://github.com/aaaaqwq/claude-code-skills --skill sergei-mikhailov-tg-channel-reader。需配置 TG_API_ID 和 TG_API_HASH,会话文件具有账户完全访问权限,请妥善保管。

来源仓库内路径:skills/sergei-mikhailov-tg-channel-reader

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/aaaaqwq/claude-code-skills --skill sergei-mikh…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

sergei-mikhailov-tg-channel-reader 怎么安装?

在终端执行 npx skills add https://github.com/aaaaqwq/claude-code-skills --skill sergei-mikhailov-tg-c…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

sergei-mikhailov-tg-channel-reader 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

sergei-mikhailov-tg-channel-reader 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

sergei-mikhailov-tg-channel-reader 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

sergei-mikhailov-tg-channel-reader 用的人多吗?

公开数据是累计安装 408 次,近一周安装 17 次,下载 136 次,GitHub 52 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

sergei-mikhailov-tg-channel-reader 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
sergei-mikhailov-tg-channel-reader

谢尔盖·米哈伊洛夫 tg 频道读者 · 本页

40852需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

tg-channel-reader

Read posts and comments from Telegram channels using MTProto (Pyrogram or Telethon). Works with any public channel and private channels the user is subscribed to. Supports fetching discussion replies (comments) for individual posts.

Security notice: This skill requires TG_API_ID and TG_API_HASH from my.telegram.org. The session file grants full Telegram account access — store it securely and never share it.

Exec Approvals

Just installed via clawhub install? Complete Setup & Installation (below) first — the skill needs pip install, credentials, and a session file before exec approvals matter.

OpenClaw blocks unknown CLI commands by default. The user must approve tg-reader commands before they can run. If the command hangs or the user says nothing is happening — exec approval is likely pending.

Quick setup (recommended)

Run from the skill directory — checks prerequisites, installs pip packages if needed, and prints the approval commands to run:

cd ~/.openclaw/workspace/skills/sergei-mikhailov-tg-channel-reader
bash setup-tg-reader.sh

Manual CLI approval

openclaw approvals allowlist add --gateway "$(which tg-reader)"
openclaw approvals allowlist add --gateway "$(which tg-reader-check)"
openclaw approvals allowlist add --gateway "$(which tg-reader-telethon)"

Alternative: approve on first use

  1. Control UI — open http://localhost:18789/, find the pending approval for tg-reader, click "Always allow". Docs
  2. Messenger (Telegram, Slack, Discord) — the bot sends an approval request with an <id>. Reply: /approve <id> allow-always. Other options: allow-once, deny.

The approval prompt appears in the Control UI or as a bot message — not in the agent's conversation. This is a common source of confusion.


When to Use

  • User asks to "check", "read", or "monitor" a Telegram channel
  • Wants a digest or summary of recent posts
  • Asks "what's new in @channel" or "summarize last 24h from @channel"
  • Wants to track or compare multiple channels
  • Wants channel info (title, description, subscribers) — use tg-reader info

Quick Start

# 1. Run pre-flight diagnostic (fast, no Telegram connection)
tg-reader-check

# 2. Get channel info
tg-reader info @channel_name

# 3. Fetch recent posts
tg-reader fetch @channel_name --since 24h
tg-reader: command not found? Run bash setup-tg-reader.sh from the skill directory (it will install the package), or manually: cd ~/.openclaw/workspace/skills/sergei-mikhailov-tg-channel-reader && pip install.

Commands

tg-reader-check — Pre-flight Diagnostic

Always run before fetching. Fast offline check — no Telegram connection needed.

tg-reader-check
tg-reader-check --config-file /path/to/config.json
tg-reader-check --session-file /path/to/session

Returns JSON with "status": "ok" or "status": "error" plus a problems array.

Verifies:

  • Credentials available (env vars or ~/.tg-reader.json)
  • Session file exists on disk (with size, modification date)
  • At least one MTProto backend installed (Pyrogram or Telethon)
  • Detects stale sessions (config points to older file while a newer one exists)

tg-reader info — Channel Info

tg-reader info @channel_name

Returns title, description, subscriber count, and link.

tg-reader fetch — Read Posts

# Last 24 hours (default)
tg-reader fetch @channel_name --since 24h

# Last 7 days, up to 200 posts
tg-reader fetch @channel_name --since 7d --limit 200

# Multiple channels (fetched sequentially with 10s delay between each)
tg-reader fetch @channel1 @channel2 @channel3 --since 24h

# Custom delay between channels (seconds)
tg-reader fetch @channel1 @channel2 @channel3 --since 24h --delay 5

# Fetch posts with comments (single channel only, limit auto-drops to 30)
tg-reader fetch @channel_name --since 7d --comments

# More comments per post, custom delay between posts
tg-reader fetch @channel_name --since 24h --comments --comment-limit 20 --comment-delay 5

# Skip posts without text (media-only, no caption)
tg-reader fetch @channel_name --since 24h --text-only

# Human-readable output
tg-reader fetch @channel_name --since 24h --format text

# Write output to file instead of stdout (saves tokens)
tg-reader fetch @channel_name --since 24h --output
tg-reader fetch @channel_name --since 24h --comments --output comments.json

# Use Telethon instead of Pyrogram (one-time)
tg-reader fetch @channel_name --since 24h --telethon

# Read unread mode — only fetch new (unread) posts, no --since needed
# Requires "read_unread": true in ~/.tg-reader.json
tg-reader fetch @channel_name

# Override read_unread mode (fetch everything, don't update state)
tg-reader fetch @channel_name --since 7d --all

# Custom state file location
tg-reader fetch @channel_name --since 24h --state-file /path/to/state.json

tg-reader auth — First-time Authentication

tg-reader auth

Creates a session file. Only needed once.


Read Unread Mode

Only return new (unread) posts — the skill remembers what you've already seen. Useful for daily digests and monitoring workflows.

Setup

Option A — config file (~/.tg-reader.json):

{
  "api_id": 12345,
  "api_hash": "...",
  "read_unread": true
}

Option B — env var (works with ~/.openclaw/openclaw.json):

export TG_READ_UNREAD=true

Env vars take priority over the config file. This lets you enable read_unread via openclaw.json Docker env alongside TG_API_ID/TG_API_HASH.

State is stored in ~/.tg-reader-state.json (configurable via "state_file" in config, TG_STATE_FILE env var, or --state-file flag).

Behavior

  • --since is not needed when read_unread is enabled — the skill automatically returns all unread posts regardless of time
  • First run (no prior state for channel): --since applies as usual (default 24h); state file created
  • Subsequent runs: only posts newer than the last read are returned; --since is ignored
  • --all flag: bypasses read_unread mode — fetches everything by --since without updating state (preserves your position)
  • New channel: behaves like a first run (no prior state)
  • No new posts: state unchanged, count: 0 returned

Examples

# With read_unread enabled — just fetch, no --since needed
tg-reader fetch @channel_name

# First run for a new channel — --since determines initial window
tg-reader fetch @new_channel --since 7d

# Override: fetch everything, don't update tracking state
tg-reader fetch @channel_name --since 7d --all

Output

When read_unread mode is active, the JSON output includes a read_unread field:

{
  "channel": "@channel_name",
  "read_unread": {"enabled": true},
  "count": 5,
  "messages": [...]
}

With --all: "read_unread": {"enabled": true, "overridden": true}

Limitations

  • Tracking is post-level only — new comments on already-read posts are not caught
  • If a channel changes its username, tracking resets (state is keyed by username)
  • Concurrent runs for the same channel are safe but last writer wins

Diagnostic

tg-reader-check reports tracking status:

{
  "tracking": {
    "read_unread": true,
    "state_file": "~/.tg-reader-state.json",
    "state_file_exists": true,
    "tracked_channels": 3
  }
}

Output Format

info

{
  "id": -1001234567890,
  "title": "Channel Name",
  "username": "channel_name",
  "description": "About this channel...",
  "members_count": 42000,
  "link": "https://t.me/channel_name"
}

fetch

{
  "channel": "@channel_name",
  "fetched_at": "2026-02-22T10:00:00Z",
  "since": "2026-02-21T10:00:00Z",
  "count": 12,
  "messages": [
    {
      "id": 1234,
      "date": "2026-02-22T09:30:00Z",
      "text": "Post content...",
      "views": 5200,
      "forwards": 34,
      "link": "https://t.me/channel_name/1234",
      "has_media": true,
      "media_type": "MessageMediaType.PHOTO"
    }
  ]
}

fetch with --comments

{
  "channel": "@channel_name",
  "fetched_at": "2026-02-28T10:00:00Z",
  "since": "2026-02-27T10:00:00Z",
  "count": 5,
  "comments_enabled": true,
  "comments_available": true,
  "messages": [
    {
      "id": 1234,
      "text": "Post content...",
      "has_media": false,
      "comment_count": 2,
      "comments": [
        {
          "id": 5678,
          "date": "2026-02-28T09:35:00Z",
          "text": "Great post!",
          "from_user": "username123"
        }
      ]
    }
  ]
}

Notes:

  • comments_available: false — channel has no linked discussion group (no comments possible)
  • comments_error on a message — rate limit hit for that post's comments
  • from_user may be null for anonymous comments
  • Images/videos in comments are not analyzed — only text is captured
  • Default post limit drops to 30 when --comments is active (override with --limit)

After Fetching

  1. Parse the JSON output
  2. Posts with images/videos have has_media: true and a media_type field. Their text is in the text field (from the caption). Do not skip posts just because they have media — they often contain important text.
  3. Images and videos are not analyzed (no OCR/vision) — only the text/caption is returned.
  4. Summarize key themes, top posts by views, notable links
  5. If comments_enabled: true, analyze comment sentiment and key themes alongside the main posts
  6. Save summary to memory/YYYY-MM-DD.md if user wants to track over time

Saving to File (Token Economy)

Use --output when the result is large (especially with --comments) and you don't need to analyze it immediately. The full data goes to a file, and stdout returns only a short confirmation — this saves tokens.

Periodic updates pattern: set up a cron task that runs tg-reader fetch @channel --comments --output comments.json on schedule. The file gets updated regularly. When the user asks to analyze comments — read the file instead of re-fetching. This avoids consuming tokens on every fetch.

When --output is used without a filename, the default is tg-output.json. Stdout confirmation:

{"status": "ok", "output_file": "/absolute/path/to/tg-output.json", "count": 12}

Saving Channel List

Store tracked channels in TOOLS.md:

## Telegram Channels
- @channel1 — why tracked
- @channel2 — why tracked

Error Handling

Errors include an error_type and action field to help agents decide what to do automatically.

Channel Errors

error_typeMeaningaction
access_deniedChannel is private, you were kicked, or access is restrictedremove_from_list_or_rejoin — ask user if they still have access; if not, remove the channel
bannedYou are banned from this channelremove_from_list — remove the channel, tell the user
not_foundChannel doesn't exist or username is wrongcheck_username — verify the @username with the user
invite_expiredInvite link is expired or invalidrequest_new_invite — ask user for a new invite link
flood_waitTelegram rate limitwait_Ns — waits ≤ 60 s are retried automatically; longer waits return this error
comments_multi_channel--comments used with multiple channelsremove_extra_channels_or_drop_comments — use one channel at a time

System Errors

ErrorAction
Session file not foundRun tg-reader-check — use the suggestion from output
Missing credentialsGuide user through Setup (Step 1-2 below)
tg-reader: command not foundRun bash setup-tg-reader.sh from the skill directory, or manually: pip install. Fallback: python3 -m tg_reader_unified
AUTH_KEY_UNREGISTEREDSession expired — delete and re-auth (see below)

Session Expired

rm -f ~/.tg-reader-session.session
tg-reader auth

Auth Code Not Arriving

Use the verbose debug script for full MTProto-level logs:

python3 debug_auth.py
Warning: debug_auth.py deletes existing session files before re-authenticating. It will ask for confirmation first.

Library Selection

Two MTProto backends are supported:

BackendCommandNotes
Pyrogram (default)tg-reader or tg-reader-pyrogramModern, actively maintained
Telethontg-reader-telethonAlternative if Pyrogram has issues

Switch persistently: export TG_USE_TELETHON=true Switch one-time: tg-reader fetch @channel --since 24h --telethon


Setup & Installation

Full details in README.md.

Step 1 — Get API Credentials

Go to https://my.telegram.org → API Development Tools → create an app → copy api_id and api_hash.

Step 2 — Save Credentials

Recommended (works in agents and servers):

cat > ~/.tg-reader.json << 'EOF'
{
  "api_id": YOUR_ID,
  "api_hash": "YOUR_HASH"
}
EOF
chmod 600 ~/.tg-reader.json

Alternative (interactive shell only):

export TG_API_ID=YOUR_ID
export TG_API_HASH="YOUR_HASH"

Set these in your current shell session. Avoid writing TG_API_HASH to shell profiles (~/.bashrc) — use ~/.tg-reader.json instead for persistent storage.

Note: Agents and servers don't load shell profiles. Use ~/.tg-reader.json (the recommended method above) for non-interactive environments.

Step 3 — Install & Configure

npx clawhub@latest install sergei-mikhailov-tg-channel-reader
cd ~/.openclaw/workspace/skills/sergei-mikhailov-tg-channel-reader
bash setup-tg-reader.sh

The setup script: installs Python packages (pip install.), checks credentials and session, runs tg-reader-check, and prints the exec approval commands for you to run manually.

On Linux with managed Python (Ubuntu/Debian), use a venv before running the setup script:

python3 -m venv ~/.venv/tg-reader
echo 'export PATH="$HOME/.venv/tg-reader/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
cd ~/.openclaw/workspace/skills/sergei-mikhailov-tg-channel-reader
pip install pyrogram tgcrypto telethon && pip install .
openclaw approvals allowlist add --gateway "$(which tg-reader)"
openclaw approvals allowlist add --gateway "$(which tg-reader-check)"

Step 4 — Authenticate

tg-reader auth

Pyrogram will ask to confirm the phone number — answer y. The code arrives in the Telegram app (not SMS).

Step 5 — Verify

tg-reader-check

Should return "status": "ok". If not — fix the reported issues and re-run bash setup-tg-reader.sh.


Scheduled Tasks & Cron

This skill needs network access (MTProto connection to Telegram servers) and a session file. How you configure OpenClaw cron depends on the session target.

Important: When setting up a scheduled task that uses tg-reader, tell the user which approach you're using and what it means — so they can make an informed choice.

Option A — sessionTarget: "main" (recommended)

The cron task sends a reminder to the main agent session. The agent then runs tg-reader in the main environment where the skill, credentials, and session file are already available.

Pros: No extra configuration — everything works out of the box. Cons: Not fully autonomous — the task sends a system event, the agent picks it up and executes. Requires payload.kind: "systemEvent" (OpenClaw cron API limitation for main target).

How to set up:

  1. Create a cron task with sessionTarget: "main" and payload.kind: "systemEvent"
  2. In the task description, include the exact tg-reader command to run
  3. The agent receives the reminder and executes the command in its main session

Option B — sessionTarget: "isolated" (autonomous, complex setup)

The cron task runs in a Docker container — fully autonomous, no agent interaction needed. However, the container starts empty: no skill, no credentials, no session file.

Pros: Fully autonomous — runs on schedule without agent involvement. Cons: Requires Docker setup; session file must be mounted into the container (may not work reliably — session files are tied to the machine and Telegram may invalidate them in a new environment).

Required configuration in ~/.openclaw/openclaw.json:

{
  "agents": {
    "defaults": {
      "sandbox": {
        "docker": {
          "setupCommand": "clawhub install sergei-mikhailov-tg-channel-reader && cd ~/.openclaw/workspace/skills/sergei-mikhailov-tg-channel-reader && pip install pyrogram tgcrypto telethon && pip install .",
          "env": {
            "TG_API_ID": "YOUR_ID",
            "TG_API_HASH": "YOUR_HASH",
            "TG_READ_UNREAD": "true"
          }
        }
      }
    }
  }
}

Session file caveat: The Telegram session file (~/.tg-reader-session.session) must also be available inside the container. This may require Docker volume mounting and might not work reliably — Telegram can invalidate sessions when they appear from a different environment. If you encounter AUTH_KEY_UNREGISTERED errors in isolated mode, switch to Option A.

Explicit paths (both options)

When ~/ is not available or points to a different location, use explicit paths:

tg-reader-check \
  --config-file /home/user/.tg-reader.json \
  --session-file /home/user/.tg-reader-session

tg-reader fetch @channel --since 6h \
  --config-file /home/user/.tg-reader.json \
  --session-file /home/user/.tg-reader-session

Both flags work with all subcommands and both backends.


Security

  • Session file (~/.tg-reader-session.session) grants full account access — keep it safe
  • Never share or commit TG_API_HASH or session files
  • TG_API_HASH is a secret — store in env vars or config file, never in git

平台分布

Codex

35.61%
按下载量换算48

Claude

30.62%
按下载量换算42

Cursor

20.15%
按下载量换算27

Gemini CLI

8.95%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills