Token导航 LogoToken导航

Agent Skill · 效率

telegram-file-browser(Telegram file 浏览器)

telegram-file-browser 用于处理浏览器自动化、网页检查和页面信息提取,适合在 OpenClaw 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

telegram-file-browser 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为操作浏览器;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 8,935。

总安装 6,558周安装 276GitHub Stars 公开资料未说明下载 2,296核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:telegram-file-browser(Telegram file 浏览器)
来源仓库:https://github.com/just-cj/telegram-file-browser
安装命令:
openclaw skills install telegram-file-browser
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install telegram-file-browser

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

构建或改进 Telegram 内联按钮文件浏览器和菜单式导航器。创建用于浏览目录、分页列表等的 Telegram 聊天 UI 时使用

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install telegram-file-browser;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

telegram-file-browser 怎么安装?

在终端执行 openclaw skills install telegram-file-browser。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

telegram-file-browser 支持哪些 AI 工具?

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

telegram-file-browser 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

telegram-file-browser 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

telegram-file-browser 用的人多吗?

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

telegram-file-browser 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

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

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
telegram-file-browser

Telegram file 浏览器 · 本页

6,558—操作浏览器MIT-0通过

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

SKILL.md 原文

name
telegram-file-browser
description
Build or improve Telegram inline-button file browsers and menu-style navigators. Use when creating Telegram chat UIs for browsing directories, paging lists, previewing files, returning to parent views, closing menus, or exposing copyable file paths. Especially useful when the interaction should stay inside one message via button state updates instead of spamming new messages.
⚠️ 🚨 CRITICAL BUTTON STRUCTURE WARNING 🚨 The buttons array from the script is a 2D array where each inner array = one row. ALWAYS pass it directly to the message tool without modification. - In OpenClaw context: use response['buttons'] directly - In Python scripts: use payload['buttons'] from build_message_payload() ❌ NEVER flatten, restructure, re-group, or stringify rows.

Zero-Footgun Protocol

When sending any browser menu, follow the correct workflow for your context:

If in OpenClaw (using exec + message tools):

  1. Run browser_dispatcher.py via exec tool
  2. Use response['messageToolCall'] as the complete payload for the message tool
  3. Don't touch the buttons — use them exactly as returned inside that payload
  4. If send succeeds and the response includes postSend, then update liveMessageId and optionally delete the previous menu

If in standalone Python script:

  1. Generate plan via run_browser_action.py or import functions
  2. Run build_message_payload(plan) and require ok: true
  3. Use payload['message'] and payload['buttons'] from the validated result

Common mistakes to avoid:

  • ❌ Don't rewrite buttons manually
  • ❌ Don't flatten buttons into one row
  • ❌ Don't pass buttons as a JSON string

Telegram File Browser

Build Telegram file-browsing flows around a single live menu plus optional side messages for previews, paths, and downloads.

Invocation

When the user explicitly invokes telegram-file-browser or asks to use this skill:

  1. Open an interactive browser immediately in the same turn.
  2. Default the root to ~/.openclaw/workspace unless the user gave a path.
  3. Do not reply with a conversational clarification like “你想让我做什么?” when the user already asked to browse.
  4. Ask a follow-up only when the target path or safety boundary is genuinely ambiguous.
  5. If the input is config, open the configuration flow instead of the browser tree.

Do not stop at describing the skill when you already have enough information to launch the UI.

Runtime Contexts

This skill can be used in two different contexts. Choose the one that matches your environment.

Context 1: OpenClaw Tool Calls (Most Common)

When you're running inside OpenClaw and using exec + message tools (like right now), use browser_dispatcher.py via exec, then call the message tool with the exact JSON from the script.

⚠️ The script already validates and returns the correct payload — use it directly, don't rewrite anything.

Step 1: Run the script via exec tool

# Run the dispatcher to get the final message-tool payload
result = exec(command="python3 ~/.openclaw/workspace/skills/telegram-file-browser/scripts/browser_dispatcher.py open-root")
response = json.loads(result)  # response contains messageToolCall, postSend, and compatibility fields

Step 2: Call message tool with the script's output

# ✅ CORRECT: pass the dispatcher payload through directly
message(**response['messageToolCall'])

# ❌ WRONG: don't rewrite buttons yourself
message(
    action='send',
    message=response['message'],
    buttons=[[{...}, {...}]]
)

# ❌ WRONG: don't stringify the payload either
message(action='send', message=response['message'], buttons=json.dumps(response['buttons']))

Complete example:

# 1. Get the complete message-tool payload
result = exec(command="python3 ~/.openclaw/workspace/skills/telegram-file-browser/scripts/browser_dispatcher.py open-root")
response = json.loads(result.stdout)

if response['ok'] and response.get('messageToolCall'):
    # 2. Send exactly what the dispatcher returned
    msg_result = message(**response['messageToolCall'])

    # 3. Update liveMessageId if requested
    post_send = response.get('postSend') or {}
    if msg_result.get('messageId') and post_send.get('updateLiveMessageId'):
        exec(command="python3 ~/.openclaw/workspace/skills/telegram-file-browser/scripts/browser_dispatcher.py update-message-id " + str(msg_result['messageId']))

    # 4. Delete the previous live menu only after the new one succeeds
    previous_id = post_send.get('previousMessageId')
    if previous_id and post_send.get('cleanupPreviousMessage'):
        message(action='delete', messageId=previous_id)

Callback handling:

# 1. Handle callback
result = exec(command="python3 ~/.openclaw/workspace/skills/telegram-file-browser/scripts/browser_dispatcher.py handle-callback " + callback_data)
response = json.loads(result.stdout)

# 2. Execute the exact tool payload returned by the script
if response.get('messageToolCall'):
    msg_result = message(**response['messageToolCall'])

    post_send = response.get('postSend') or {}
    if msg_result.get('messageId') and post_send.get('updateLiveMessageId'):
        exec(command="python3 ~/.openclaw/workspace/skills/telegram-file-browser/scripts/browser_dispatcher.py update-message-id " + str(msg_result['messageId']))

    previous_id = post_send.get('previousMessageId')
    if previous_id and post_send.get('cleanupPreviousMessage'):
        message(action='delete', messageId=previous_id)

Important for current Telegram/OpenClaw routing:

If a button click arrives as a plain inbound text message like tfb_root_v12_w8 instead of a native callback event, treat that text as the callback_data and run the exact same callback flow above. Do not ignore it just because it came in as a message.

Recommended detection rule:

  • if inbound text matches ^tfb_(root|dir|preview|path|download|back|close)_
  • treat it as a telegram-file-browser callback
  • run browser_dispatcher.py handle-callback <that_text> immediately
  • do not ask the user what they mean

Context 2: Standalone Python Script

When you're writing a standalone Python script (not inside OpenClaw), use the import-based approach with build_message_payload.

import sys
sys.path.insert(0, '~/.openclaw/workspace/skills/telegram-file-browser/scripts')
from run_browser_action import open_root, handle_callback
from send_plan import build_message_payload

STATE = '~/.openclaw/workspace/.openclaw/telegram-file-browser/state.json'
ROOT = '~/.openclaw/workspace'


def send_browser_plan(plan):
    """Send message using OpenClaw's message tool or Telegram API."""
    if plan['toolAction'] == 'noop':
        return None
    if plan['toolAction'] == 'delete':
        return {"action": "delete", "messageId": plan['messageId']}
    if plan['toolAction'] == 'send-file':
        return {"action": "send", "path": plan['path'], "caption": plan.get('caption')}

    # MUST validate through build_message_payload
    wrapped = build_message_payload(plan)
    if not wrapped['ok']:
        raise RuntimeError(wrapped['error'])
    
    payload = wrapped['payload']
    return {
        "action": payload['action'],
        "message": payload['message'],
        "buttons": payload['buttons'],
        "replyTo": payload.get('replyTo')
    }


# First open
send_browser_plan(open_root(STATE, ROOT))

# Handle callback
send_browser_plan(handle_callback(STATE, callback_data))

Why build_message_payload is required in Python scripts:

  • Validates button structure (2D array, one row per item)
  • Returns the exact payload to send
  • Prevents common mistakes like flattening buttons

Why it's NOT needed in OpenClaw context:

  • browser_dispatcher.py already returns a validated payload
  • Just use the JSON values directly
⚠️ For OpenClaw tool calls: Just use browser_dispatcher.py — see Context 1 above. The examples below are for standalone Python scripts only.

Tool Plan Contract

In OpenClaw context (most common): Use browser_dispatcher.py — it already validates and returns the correct payload. Just use the JSON values directly.

In standalone Python scripts: Use run_browser_action.py + build_message_payload(plan) as the guardrail.

Supported toolAction values:

Plans that send buttons should also include viewType (for example directory or file-actions) so the validator can enforce row-shape rules.

  • send
  • delete
  • send-file
  • noop

Map them to OpenClaw message actions like this:

  • send

- In OpenClaw context: Use browser_dispatcher.py — the response already contains validated message and buttons. Just pass them to the message tool:

    message(action='send', message=response['message'], buttons=response['buttons'])

- In Python scripts: Run build_message_payload(plan) first, then use:

    payload = wrapped["payload"]
    message(action=payload["action"], message=payload["message"], buttons=payload["buttons"])

- Pass buttons as a real 2D array (each inner array = one row) - Do not stringify or flatten buttons

⚠️ Common mistakes to avoid:

# ❌ WRONG — flatten all buttons into one row
buttons = [[{...item1...}, {...item2...}, {...item3...}]]

# ❌ WRONG — stringify buttons  
buttons = json.dumps(response['buttons'])

# ✅ CORRECT — use script output directly
buttons = response['buttons']
  • delete

- use message action=delete - pass messageId

  • send-file

- use message action=send - pass path or filePath - pass caption - if replyTo is present, pass it as replyTo

  • noop

- do not send any user-visible message unless debugging is explicitly needed

Important runtime note:

  • With the current OpenClaw message tool, Telegram inline buttons are reliably attached on send, not on edit.
  • Therefore navigation should be implemented as send a fresh menu, then optionally delete the previous one.
  • Treat edit-message mode as replace the prior menu with minimal chat noise, not as a literal button-preserving in-place edit.

Display Modes

Persist display mode in config.json.

edit-message

  • keep one logical live browser menu
  • because current OpenClaw tooling does not reliably preserve Telegram buttons on edit, implement this as:

1. send a fresh menu 2. update liveMessageId 3. delete the previous menu after send succeeds

  • best for low-noise chat history

new-message

  • navigation sends a fresh browser menu
  • old menus remain in history unless you intentionally delete them
  • update liveMessageId to the newly sent menu after success
  • previews, path replies, and downloads still reply to the current live menu

Core Interaction Rules

Keep callback payloads short

Never place full file paths in callback_data.

Use opaque ids and store the real mapping in state.

Split navigation from content

Use the menu for navigation only.

Use separate messages for:

  • file previews
  • copyable path output
  • file downloads
  • error notices that should not replace the current menu

File click behavior

When a user clicks a file from a directory listing:

  1. Open a file action menu.
  2. Do not immediately dump file contents.
  3. Offer at least 👁 预览, 📋 路径, ⬇️ 下载, ⬅️ 返回, ❌ 关闭.
  4. Prefer one button per row here as well unless a later UX change explicitly says otherwise.

Pagination

Keep pagination inside the same state machine.

Required behavior:

  • page buttons stay versioned like other callbacks
  • page changes rebuild the current directory view
  • pagination preserves root boundary and current path
  • item ids remain resolvable after changing pages

State Requirements

Persist at least:

  • root
  • current
  • stack
  • liveMessageId
  • menuVersion
  • views
  • the current view's page metadata

Recommended shape:

{
  "root": "/abs/root",
  "current": "/abs/root/subdir",
  "stack": ["/abs/root"],
  "liveMessageId": "2317",
  "menuVersion": 4,
  "views": {
    "/abs/root/subdir": {
      "path": "/abs/root/subdir",
      "page": 2,
      "pageSize": 12,
      "items": [
        { "id": "d12313", "name": "demo.py", "path": "/abs/root/subdir/demo.py", "type": "file" }
      ]
    }
  }
}

Callback Safety

Protect against replayed and stale callbacks.

Required behavior:

  • include menu version in interactive callbacks
  • reject callbacks whose version does not match current state
  • debounce duplicate callbacks received in a short window
  • prefer silent noop over noisy execution for stale callbacks

Failure Handling

Missing or stale target

If the resolved file or directory no longer exists:

  • keep the browser alive
  • send a short failure message or rebuild the nearest valid view
  • preserve a way back

Callback execution loop

When Telegram delivers a button click as a callback message such as callback_data: tfb_root_v2_w13, do this immediately:

  1. run scripts/run_browser_action.py handle-callback <state_path> <callback>
  2. inspect the returned tool plan
  3. if toolAction == "send", run it through send_plan.py / build_message_payload(plan) first
  4. execute the validated payload with the OpenClaw message tool
  5. if a fresh menu was sent successfully, write the returned messageId back into state as liveMessageId
  6. if the plan requests previous-menu cleanup, delete the previous menu only after the new menu send succeeds

Do not answer a callback message with a normal conversational reply when the callback belongs to the file browser. Do not ask a follow-up unless the callback cannot be resolved safely. Prefer silent noop over chatty recovery for stale callbacks.

Message edit failure

If an edit fails because the menu no longer exists or cannot be edited:

  • send a fresh menu
  • update liveMessageId
  • preserve current path and stack when possible

Oversized or invalid callbacks

If Telegram rejects callback payloads:

  • shorten callback ids
  • move real state into local storage
  • do not encode raw paths in buttons

Bundled Scripts

  • scripts/build_view.py — list a directory, sort entries, paginate, and emit view JSON
  • scripts/file_browser_state.py — initialize/load/save state and manage current path, back stack, menu version, and live message id
  • scripts/preview_file.py — generate safe file previews
  • scripts/render_buttons.py — build Telegram button matrices for directory and file-action views
  • scripts/resolve_callback.py — resolve callback payloads into browser actions
  • scripts/browser_controller.py — orchestrate open-root, open-dir, file actions, back, paging, and live-message state updates
  • scripts/browser_config.py — load and persist display config
  • scripts/run_browser_action.py — convert browser actions into concrete tool plans for messaging and file delivery
  • scripts/send_plan.py — validate send plans and build the only approved message(action="send", ...) payload
  • scripts/validate_buttons.py — CLI validator for plan JSON before sending
  • scripts/test_buttons_integrity.py — regression test for root/page/dir/file-action flows and flattened-button rejection
  • scripts/browser_dispatcher.py — ⭐ RECOMMENDED one-click wrapper: generates plan, validates, returns exact payload. Use this instead of hand-rolling the flow.

Runtime artifacts

Treat state/ as runtime-only scratch data. Do not commit it. Keep it ignored in git.

Pre-send Checklist

Before sending or replacing a browser menu, verify all of the following:

In OpenClaw context (using exec + message tools):

  • ✅ You used browser_dispatcher.py to get the plan
  • ✅ You passed response['buttons'] directly to the message tool — no manual rewriting
  • ✅ buttons is a real 2D array (each inner array = one row)

In standalone Python scripts:

  • ✅ You used build_message_payload(plan) to validate
  • ✅ You used payload['buttons'] from the validated result

General rules (always):

  • ⚠️ Never rewrite buttons yourself — use the script's output directly
  • ⚠️ Never flatten buttons into one row — keep 2D structure
  • ✅ Each directory/file item stays on its own row
  • ✅ Callback payloads are short opaque ids, not raw paths
  • ✅ replyTo is forwarded when the tool plan includes it
  • ✅ After a successful send, liveMessageId is updated
  • ✅ When replacing a live menu, send first and delete old menu only after send succeeds

Hard rule

Treat any manual rewrite of plan["buttons"] as a bug, not an optimization.

Notes

Read references/interaction-patterns.md when you need concrete UX guidance for:

  • single-message navigation
  • file action menus
  • pagination behavior
  • copyable path behavior
  • menu recovery after edit failures

平台分布

OpenClaw

90.19%
按下载量换算2,071

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

继续浏览同类 Skills