← Back to Skills Marketplace
zhouhouqing

Local File

by zhouhouqing · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
420
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install local-file
Description
Read, summarize, and search contents of local text, markdown, JSON, DOCX, and PDF files within authorized paths under 10MB.
README (SKILL.md)

Local File Reader\r

\r 读取本地文件内容(支持 .txt, .md, .json, .docx, .pdf 等)\r \r

触发条件\r

用户提到:读取文件、查看文件、打开文件、读一下 xxx 文件\r \r

用法\r

  • 读取:read \x3C文件路径>\r
  • 总结:summarize \x3C文件路径>\r
  • 搜索:search \x3C关键词> \x3C文件路径>\r \r

限制\r

  • 只能读取工作区和用户明确授权的路径\r
  • 大文件(>10MB)会拒绝
Usage Guidance
This skill partially implements a local-file reader but has several mismatches with its documentation. Before installing or enabling it: - Ask the author to explain and remove or parameterize the hardcoded path 'D:\个人' (it appears author-specific). - Require the skill to declare OPENCLAW_WORKSPACE in its metadata if it depends on that env var. - Require the code to enforce the documented 10MB size limit and to implement (or remove) summarize and search functionality described in SKILL.md. - Request path normalization and canonicalization (use path.resolve and fs.realpath) and stronger checks (not startsWith) to prevent accidental access outside allowed roots. - Audit npm dependencies (mammoth, pdf-parse) and consider running the skill in a sandboxed environment until the above fixes are made. If the author cannot justify the hardcoded path and undeclared env usage or cannot implement the documented safeguards, treat this skill as unsafe to grant file-access to.
Capability Analysis
Type: OpenClaw Skill Name: local-file Version: 1.0.0 The skill provides legitimate file-reading functionality but contains a significant path traversal vulnerability in `index.js`. The path validation logic uses `startsWith` against allowed roots without first normalizing the input path, which could allow an attacker to access sensitive files outside the intended directories (e.g., using `../` sequences). Additionally, the code contains a hardcoded absolute Windows path (`D:\个人`), which is atypical for a generic skill. No evidence of intentional data exfiltration or malicious backdoors was found.
Capability Assessment
Purpose & Capability
Name/description promise: read, summarize, and search local text/markdown/JSON/DOCX/PDF under authorized paths and <10MB. The code implements text extraction for .txt/.md/.json/.docx/.pdf which aligns with the reading capability, but it does not implement 'summarize' or 'search' features. The presence of a hardcoded Windows path ('D:\个人') is author-specific and may be inappropriate for other users.
Instruction Scope
SKILL.md documents read/summarize/search commands and a 10MB file-size limit. index.js only reads and extracts text; it lacks any summarize or search logic and does not check file size. The code checks allowedRoots using a simple startsWith() test without normalizing/realpath resolution, which is a weak path restriction and could be bypassed or behave inconsistently across platforms.
Install Mechanism
There is no install spec (instruction-only style), which is low-risk for arbitrary downloads. package.json lists mammoth and pdf-parse as dependencies and package-lock.json is included. No install URLs or extract-from-URL steps are present.
Credentials
requires.env is empty in registry metadata and SKILL.md, but index.js reads process.env.OPENCLAW_WORKSPACE as an allowed root — an undeclared environment dependency. No credentials are requested, which is appropriate, but the undeclared env var and the hardcoded 'D:\个人' path are disproportionate/unexpected and should be declared and documented.
Persistence & Privilege
always is false and there are no install hooks or code that modifies agent/system configuration. The skill does not request persistent privileges beyond reading files when invoked.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install local-file
  3. After installation, invoke the skill by name or use /local-file
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Local File Reader 1.0.0 - Introduced ability to read local file contents (.txt, .md, .json, .docx, .pdf, etc). - Supports reading, summarizing, and searching file contents using simple commands. - Only reads files in the workspace or user-authorized paths. - Refuses to process large files (>10MB).
Metadata
Slug local-file
Version 1.0.0
License
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Local File?

Read, summarize, and search contents of local text, markdown, JSON, DOCX, and PDF files within authorized paths under 10MB. It is an AI Agent Skill for Claude Code / OpenClaw, with 420 downloads so far.

How do I install Local File?

Run "/install local-file" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Local File free?

Yes, Local File is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Local File support?

Local File is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Local File?

It is built and maintained by zhouhouqing (@zhouhouqing); the current version is v1.0.0.

💬 Comments