← 返回
效率工具 中文

file-browser

Read-only file browsing and reading in the OpenClaw workspace (/home/alfred/.openclaw/workspace). Use for listing directories or reading text files (up to 10...
在OpenClaw工作区(/home/alfred/.openclaw/workspace)中进行只读文件浏览与读取,支持列出目录或读取文本文件(最多10...
nagilem
效率工具 clawhub v1.0.0 1 版本 99788.1 Key: 无需
★ 0
Stars
📥 1,884
下载
💾 15
安装
1
版本
#latest

概述

File Browser Skill

Quick Start

Resolve all paths relative to WORKSPACE=/home/alfred/.openclaw/workspace. Sanitize inputs to prevent escapes or absolutes.

  • To list directory: exec("scripts/list_files.sh", [rel_path]) → JSON {success: bool, data: array of names, error: string}
  • To read file: exec("scripts/read_file.sh", [rel_path]) → JSON {success: bool, data: string (text content), error: string}
  • Handle errors: For binary/large/non-text files, return error JSON.

Step-by-Step Workflow

  1. Parse user query for action (list/read) and relative path.
  2. Call appropriate script with sanitized rel_path.
  3. Parse JSON output; respond to user with results or error message.
  4. If path invalid or outside workspace, reject immediately.

Safety Guidelines

  • Enforce read-only: No writes, deletes, or exec beyond scripts.
  • Log accesses if verbose mode enabled.
  • For large files (>10k chars), truncate or summarize.

Edge Cases

  • Empty path: Default to "." (workspace root).
  • Binary file: Return error "Non-text file".
  • See references/examples.md for more (if added).

Bundled Resources

  • scripts/list_files.sh: Bash wrapper for ls.
  • scripts/read_file.sh: Bash wrapper for cat with limits.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 06:08 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,485

File Writer

nagilem
安全地将文本内容写入或追加到文件,仅限 /home/alfred/.openclaw/workspace/scratch 目录。覆盖前自动创建备份 ({filename}.bak, .bak.1 等)
★ 0 📥 649
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,802