Token导航 LogoToken导航

Agent Skill · 研究检索

tgcli(tgcli 搜索)

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

tgcli 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 37,082。

总安装 1,806周安装 76GitHub Stars 5下载 632核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:tgcli(tgcli 搜索)
来源仓库:https://github.com/dapi/tgcli
仓库路径:skills/tgcli
安装命令:
npx skills add https://github.com/dapi/tgcli --skill tgcli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dapi/tgcli --skill tgcli

这个 Skill 是做什么的

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

tgcli 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。适用于信息搜集、线索筛选和关键词驱动的内容发现等研究检索类任务。

通过安装命令 npx skills add https://github.com/dapi/tgcli --skill tgcli 从 GitHub 仓库安装使用。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。tgcli 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/tgcli

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

tgcli 怎么安装?

在终端执行 npx skills add https://github.com/dapi/tgcli --skill tgcli。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

tgcli 支持哪些 AI 工具?

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

tgcli 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

tgcli 是免费的吗?

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

tgcli 用的人多吗?

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

tgcli 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

  • 同时适配 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调用外部服务未明确有提醒
tgcli

tgcli 搜索 · 本页

1,8065调用外部服务未明确未通过

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

SKILL.md 原文

tgcli

Telegram CLI skill for AI agents.

Install

Install this skill from GitHub:

npx skills add dapi/tgcli --skill tgcli --agent '*' -g -y

Install CLI:

npm install -g @dapi/tgcli

Authenticate once:

tgcli auth

Tool Boundary: tgcli vs telegram-mcp

Use tgcli forUse telegram-mcp for
Read/search/archive messagesedit/delete/forward
Send text/photo/files and topic postsreactions
Forum topics listing/searchinline bot buttons
Download media from messagesadvanced interactive actions
Group admin (rename, members, invite, join/leave)ban/kick/promote with granular permissions
Channel/contact tags and metadata
Sync jobs and archive monitoring
JSON output for automation

Execution Rules

  • If tgcli is not found, install it: npm install -g @dapi/tgcli then run tgcli auth for first-time login.
  • tgcli auth only authenticates the Telegram session. Use tgcli sync --once or tgcli sync --follow to seed/archive dialogs.
  • Always add --json for agent workflows.
  • Add --timeout 30s by default; use --timeout 90s for heavy archive fallback reads.
  • Prefer explicit --source archive|live|both instead of relying on defaults.
  • Never use --since; tgcli uses --after and --before with ISO timestamps.
  • Never use tgcli sync --chat...; top-level sync only runs workers via --once / --follow.
  • To sync a specific chat: tgcli channels sync --chat <id|@username> --enable and/or tgcli sync jobs add --chat <id|@username>, then run tgcli sync --once or tgcli sync --follow.
  • If command shape is uncertain, verify it first with tgcli <command> --help instead of guessing flags.
  • For sending format control:

- --parse-mode markdown|html|none (case-insensitive) - for send photo and send file, --parse-mode requires --caption - --reply-to <messageId> replies to a specific message; if both --reply-to and --topic are passed, --reply-to wins - --silent sends without notification sound - --no-forwards protects message from forwarding/saving - --schedule <iso> schedules message for future delivery (ISO 8601, must be in the future, within 365 days) - --caption-above shows caption above media (send photo/send file, requires --caption) - --spoiler blurs media until tapped (send photo/send file) - --retries <n> retries transient network/transport failures for send photo - --retry-backoff <ms|constant|linear|exponential> controls retry delay for send photo - --force-document sends photo/video as uncompressed document (send file only) - --retries <n> retry on failure with exponential backoff (default 0); JSON output includes retry_log and attempts when retries occurred

  • Telegram markdown formatting (when --parse-mode markdown):

- Bold: **text** - Italic: __text__ (double underscores, NOT single _) - Bold+Italic: **__text__** (bold wraps italic) - Single _text_ does NOT work for italic — renders as literal underscores - Single *text* does NOT work for bold — renders as literal asterisks - Monospace inline: ` text ` - Code block: triple backticks - Telegram markdown differs from standard Markdown — always use double markers

  • Never delete lock files (LOCK, database is locked): wait and retry.

Core Command Patterns

Read

tgcli messages list --chat <id|@username> --limit 50 --source archive --json --timeout 30s
tgcli messages list --chat <id|@username> --chat <id2> --limit 50 --source archive --json --timeout 30s
tgcli messages list --chat <id|@username> --topic <topicId> --after 2025-01-01T00:00:00Z --limit 100 --source archive --json --timeout 30s
tgcli messages show --chat <id|@username> --id <msgId> --source archive --json --timeout 30s
tgcli messages context --chat <id|@username> --id <msgId> --before 5 --after 5 --source archive --json --timeout 30s

Never use --since here; the correct flag is --after.

Search

tgcli messages search "Claude Code" --chat <id|@username> --source archive --json --timeout 30s
tgcli messages search --query "Claude Code" --chat <id|@username> --source archive --json --timeout 30s
tgcli messages search --regex "claude\\s+(code|agent)" --chat <id|@username> --source archive --json --timeout 30s
tgcli messages search --tag ai --chat <id|@username> --source archive --json --timeout 30s
tgcli messages search --tags "ai,dev" --chat <id|@username> --source archive --json --timeout 30s
tgcli messages search "release" --chat <id|@username> --after 2025-06-01T00:00:00Z --before 2025-06-30T00:00:00Z --source archive --json --timeout 30s
tgcli messages search "Release" --case-sensitive --chat <id|@username> --source archive --json --timeout 30s

Both positional query and --query flag work. --chat accepts multiple values. Use --regex for pattern matching, --tag/--tags to filter by channel tags, --after/--before for date range, --case-sensitive to disable case-insensitive search.

Send Text/Photo/File

⚠ send uses --to (alias --chat) for the destination; then --message (alias --text) for text body, --photo for photo uploads, and --file for generic files.

tgcli send text --to <id|@username> --message "Hello" --json --timeout 30s
tgcli send text --to <id|@username> --topic <topicId> --message "**Hello**" --parse-mode markdown --json --timeout 30s
tgcli send text --to <id|@username> --message "Done" --reply-to <messageId> --json --timeout 30s
tgcli send text --to <id|@username> --message "https://example.com check this" --no-preview --json --timeout 30s
tgcli send text --to <id|@username> --message "Nightly report" --silent --json --timeout 30s
tgcli send text --to <id|@username> --message "Confidential" --no-forwards --json --timeout 30s
tgcli send text --to <id|@username> --message "Good morning!" --schedule "2025-01-15T09:00:00+03:00" --json --timeout 30s
tgcli send text --to <id|@username> --message "Hello" --retries 3 --json --timeout 30s

tgcli send photo --to <id|@username> --photo /path/to/image.png --caption "Report" --json --timeout 30s
tgcli send photo --to <id|@username> --photo /path/to/image.png --caption "**Report**" --parse-mode markdown --json --timeout 30s
tgcli send photo --to <id|@username> --photo /path/to/image.png --reply-to <messageId> --json --timeout 30s
tgcli send photo --to <id|@username> --photo /path/to/image.png --caption "Breaking news" --caption-above --json --timeout 30s
tgcli send photo --to <id|@username> --photo /path/to/image.png --spoiler --json --timeout 30s
tgcli send photo --to <id|@username> --photo /path/to/image.png --retries 3 --retry-backoff exponential --json --timeout 30s

tgcli send file --to <id|@username> --file /path/to/file --caption "Report" --json --timeout 30s
tgcli send file --to <id|@username> --file /path/to/file --caption "<b>Report</b>" --parse-mode html --json --timeout 30s
tgcli send file --to <id|@username> --file /path/to/file --filename custom-name.pdf --json --timeout 30s
tgcli send file --to <id|@username> --file /path/to/file --reply-to <messageId> --json --timeout 30s
tgcli send file --to <id|@username> --file /path/to/file --caption "Breaking news" --caption-above --json --timeout 30s
tgcli send file --to <id|@username> --file /path/to/photo.jpg --spoiler --json --timeout 30s
tgcli send file --to <id|@username> --file /path/to/photo.jpg --force-document --json --timeout 30s

Photo Preview vs Document Upload

  • Use tgcli send photo for local PNG/JPG when Telegram should render a photo preview.
  • Use tgcli send file for generic uploads and explicit document-style attachments.
  • For draft/approval flow, send to Saved Messages first, review in Telegram, then resend to the target chat.

Media Download

tgcli media download --chat <id|@username> --id <msgId> --json --timeout 30s
tgcli media download --chat <id|@username> --id <msgId> --output /path/to/save --json --timeout 30s

Channels

tgcli channels list --query "ai" --limit 20 --json --timeout 30s
tgcli channels show --chat <id|@username> --json --timeout 30s
tgcli channels sync --chat <id|@username> --enable --json --timeout 30s
tgcli channels sync --chat <id|@username> --disable --json --timeout 30s

Topics

tgcli topics list --chat <id|@username> --limit 50 --json --timeout 30s
tgcli topics search --chat <id|@username> --query "release" --limit 20 --json --timeout 30s

Contacts

tgcli contacts search "alex" --limit 20 --json --timeout 30s
tgcli contacts show --user <id> --json --timeout 30s
tgcli contacts alias set --user <id> --alias "Alex" --json --timeout 30s
tgcli contacts alias rm --user <id> --json --timeout 30s
tgcli contacts tags add --user <id> --tag coworker --tag ai --json --timeout 30s
tgcli contacts tags rm --user <id> --tag ai --json --timeout 30s
tgcli contacts notes set --user <id> --notes "Met at meetup" --json --timeout 30s

Groups

tgcli groups list --query "dev" --limit 20 --json --timeout 30s
tgcli groups info --chat <id|@username> --json --timeout 30s
tgcli groups rename --chat <id|@username> --name "New Name" --json --timeout 30s
tgcli groups members add --chat <id|@username> --user <userId> --user <userId2> --json --timeout 30s
tgcli groups members remove --chat <id|@username> --user <userId> --json --timeout 30s
tgcli groups invite get --chat <id|@username> --json --timeout 30s
tgcli groups invite revoke --chat <id|@username> --json --timeout 30s
tgcli groups join --code <invite-code> --json --timeout 30s
tgcli groups leave --chat <id|@username> --json --timeout 30s

Tags (Channel Classification)

tgcli tags list --chat <id|@username> --json --timeout 30s
tgcli tags set --chat <id|@username> --tag ai --tag dev --json --timeout 30s
tgcli tags search --tag ai --limit 20 --json --timeout 30s
tgcli tags auto --limit 50 --json --timeout 90s            # AI-powered: generates tags from channel metadata/content
tgcli tags auto --chat <id|@username> --source manual --json --timeout 90s
tgcli tags auto --limit 50 --no-refresh-metadata --json --timeout 90s

Metadata (Channel Cache)

tgcli metadata get --chat <id|@username> --json --timeout 30s
tgcli metadata refresh --chat <id|@username> --force --json --timeout 30s
tgcli metadata refresh --only-missing --limit 50 --json --timeout 90s

Folders

tgcli folders list --json --timeout 30s
tgcli folders show <name|id> --json --timeout 30s
tgcli folders show <name|id> --resolve --json --timeout 30s
tgcli folders create --title "Name" --emoji "🤖" --json --timeout 30s
tgcli folders edit <name|id> --title "New Name" --json --timeout 30s
tgcli folders delete <name|id> --json --timeout 30s
tgcli folders order <id1> <id2> <id3> --json --timeout 30s
tgcli folders add-chat <folder> --chat <id> --json --timeout 30s
tgcli folders remove-chat <folder> --chat <id> --json --timeout 30s
tgcli folders join --link "https://t.me/addlist/slug" --json --timeout 30s

Use --resolve with folders show to resolve peer IDs to readable channel/user names (slower, requires API calls per peer). Without --resolve, peers are shown as typed IDs (e.g., channel:123).

Sync Jobs

tgcli sync status --json --timeout 30s
tgcli sync jobs list --json --timeout 30s
tgcli sync jobs list --status error --json --timeout 30s
tgcli sync jobs list --channel <id|@username> --json --timeout 30s
tgcli sync jobs add --chat <id|@username> --depth 500 --json --timeout 30s
tgcli sync jobs add --chat <id|@username> --min-date 2025-01-01T00:00:00Z --json --timeout 30s
tgcli sync jobs retry --all-errors --json --timeout 30s
tgcli sync jobs retry --job-id <id> --json --timeout 30s
tgcli sync jobs retry --channel <id|@username> --json --timeout 30s
tgcli sync jobs cancel --job-id <id> --json --timeout 30s
tgcli sync jobs cancel --channel <id|@username> --json --timeout 30s

Do not write tgcli sync --chat...; queue work with sync jobs add --chat..., then process it with tgcli sync --once or tgcli sync --follow.

Service (Background Sync Daemon)

tgcli service status --json --timeout 30s
tgcli service install --json --timeout 30s
tgcli service start --json --timeout 30s
tgcli service stop --json --timeout 30s
tgcli service logs --json --timeout 30s

Config & Auth

tgcli auth --json --timeout 30s
tgcli auth --qr --json --timeout 30s
tgcli auth status --json --timeout 30s
tgcli auth logout --json --timeout 30s
tgcli config list --json --timeout 30s
tgcli config get <key> --json --timeout 30s
tgcli config set <key> <value> --json --timeout 30s
tgcli config unset <key> --json --timeout 30s
tgcli doctor --json --timeout 30s
tgcli doctor --connect --json --timeout 30s

Archive + Analysis Workflow

For tasks like "analyze chat history", "what happened this week", "digest/news":

  1. Resolve chat:

- tgcli channels list --query "<name>" --json --timeout 30s - optionally tgcli groups list --query "<name>" --json --timeout 30s

  1. Ensure archive flow:

- tgcli channels sync --chat <id> --enable - tgcli sync jobs add --chat <id> --depth 500 - tgcli service status --json --timeout 30s — check if running - tgcli service install --json --timeout 30s — if not installed yet - tgcli service start --json --timeout 30s — start daemon

  1. Read archive first:

- tgcli messages list --chat <id> --source archive --limit 500 --json --timeout 30s

  1. If archive is still empty, fallback to live:

- tgcli messages list --chat <id> --source live --limit 500 --json --timeout 90s

  1. Build digest/synthesis from JSON payload.

Continuous Sync Workflow

For tasks like "monitor these channels", "keep syncing my subscriptions":

Architecture: channels sync --enable marks channels for watching → sync jobs add creates backfill tasks → service start runs a persistent daemon that processes jobs and pulls realtime updates.

  1. Enable sync for each channel:

- tgcli channels sync --chat <id|@username> --enable --json --timeout 30s - repeat for each channel to monitor

  1. Add backfill jobs (optional, pulls history):

- tgcli sync jobs add --chat <id|@username> --depth 1000 --json --timeout 30s

  1. Start the background daemon:

- tgcli service install --json --timeout 30s — first time only - tgcli service start --json --timeout 30s

  1. Verify it's running:

- tgcli service status --json --timeout 30s - tgcli sync status --json --timeout 30s — shows per-channel sync progress

  1. Check for errors:

- tgcli sync jobs list --status error --json --timeout 30s - tgcli sync jobs retry --all-errors --json --timeout 30s

  1. Stop monitoring a channel:

- tgcli channels sync --chat <id|@username> --disable --json --timeout 30s

Alternative without systemd service (one-shot or foreground):

  • tgcli sync --once — run one sync pass and exit
  • tgcli sync --follow — keep syncing in foreground (ctrl-c to stop)
  • tgcli sync --follow --idle-exit 5m — auto-exit after 5 minutes idle

Sync Semantics

  • "My channels/subscriptions" -> tgcli channels list...
  • "Monitored/synced channels" -> tgcli sync status --json --timeout 30s

Trigger Examples

Should trigger

  • "read messages in "
  • "search telegram for "
  • "send this text/file to telegram"
  • "download file from telegram message"
  • "summarize what was discussed this week"
  • "what's new in?"
  • "show my mentions in "
  • "tag channels by topic"
  • "add user to telegram group"
  • "get invite link for group"
  • "reply to a specific telegram message"
  • "start syncing this channel"
  • "monitor my telegram channels"
  • "прочитай сообщения в канале"
  • "найди в телеграме про релиз"
  • "отправь сообщение в канал"
  • "дай сводку по чату"
  • "скачай файл из сообщения"
  • "опубликуй пост с картинкой"
  • "отправь фото с подписью в канал"
  • "post with cover image"

Should not trigger

  • "edit/delete/forward telegram message"
  • "react with emoji to message"
  • "click inline button in bot"
  • "ban/kick/promote user with granular permissions"

Use telegram-mcp for those operations.

平台分布

Codex

36.67%
按下载量换算232

Claude

32.34%
按下载量换算204

Cursor

17.93%
按下载量换算113

Gemini CLI

9.83%
按下载量换算62

安全审计

Gen Agent Trust Hub

未通过

Socket

可疑

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

继续浏览同类 Skills