← 返回 Skills 市场
muhammadmuazzain

Summarize File

作者 Muhammad Muazzain · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1864
总下载
0
收藏
19
当前安装
1
版本数
在 OpenClaw 中安装
/install summarize-file
功能描述
Reads text files from workspace/paths and generates concise summaries. Handles logs, reports, CSVs, multi-line content.
安全使用建议
Do not install or enable this skill without changes. The code does not match the skill description: it reads a hard-coded Windows path using fs rather than the platform workspace.read API, performs no path validation (risk of reading files outside the workspace), and does not implement any LLM summarization — it just returns the first 500 characters. If you want to proceed, ask the author to (1) remove hard-coded absolute paths and use the declared workspace.read API, (2) add robust path normalization and enforce that files stay inside the workspace (no ../ traversal), (3) implement the actual summarization logic (or clearly document why it only returns an excerpt), and (4) make it cross-platform. Until these changes are made, run the skill only in an isolated environment and inspect/approve the source yourself.
功能分析
Type: OpenClaw Skill Name: summarize-file Version: 1.0.0 The skill contains a critical path traversal vulnerability in `index.js`. The `filename` parameter is directly concatenated into the file path without any sanitization, allowing an attacker to read arbitrary files outside the intended `workspace` directory (e.g., `../../../../etc/passwd`). This directly contradicts the `SKILL.md` documentation's claim of 'File paths validated (no ../ escapes)'. While the skill's core logic only reads and truncates the file content, this vulnerability allows unauthorized access to sensitive system files, making it a high-risk flaw.
能力评估
Purpose & Capability
SKILL.md and skill.json state the skill reads files via the workspace.read tool and returns LLM-generated summaries. The actual code (index.js) bypasses workspace.read and uses fs to directly open a hard-coded Windows path (C:\Users\user\.openclaw\workspace\${filename}). The code does not perform summarization, only slices the first 500 characters. This is not proportionate or coherent with the stated purpose.
Instruction Scope
The runtime instructions promise path validation, cross-platform behavior, and local-only workspace API access. The implementation lacks any path normalization/validation and concatenates user-supplied filenames into an absolute path, which likely permits path traversal (e.g., '..\') to access files outside the intended workspace. The code is also Windows-specific and contradicts the SKILL.md claims about using workspace.read and returning 2–3 sentence summaries.
Install Mechanism
There is no install script or remote download — the skill is instruction-only plus a small code file. That lowers installer risk (nothing is fetched from the network).
Credentials
The skill declares no environment or credentials (which is appropriate), but its implementation accesses an absolute user home path directly instead of using the declared workspace.read permission/API. That bypass can defeat sandboxing expectations: although no secrets are requested, direct fs access to C:\Users\user\... is broader than the declared surface and may expose unrelated local files.
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and has no install-time persistence. It appears not to escalate privileges or autonomously persist configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install summarize-file
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /summarize-file 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Summarize File skill. - Reads text files and generates concise 2–3 sentence summaries, highlighting key insights and ignoring boilerplate or empty lines. - Handles various formats including logs, reports, CSVs, and multi-line content. - Operates securely with read-only, local file access; no data leaves your machine. - Supports file path validation to prevent directory escapes.
元数据
Slug summarize-file
版本 1.0.0
许可证
累计安装 22
当前安装数 19
历史版本数 1
常见问题

Summarize File 是什么?

Reads text files from workspace/paths and generates concise summaries. Handles logs, reports, CSVs, multi-line content. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1864 次。

如何安装 Summarize File?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install summarize-file」即可一键安装,无需额外配置。

Summarize File 是免费的吗?

是的,Summarize File 完全免费(开源免费),可自由下载、安装和使用。

Summarize File 支持哪些平台?

Summarize File 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Summarize File?

由 Muhammad Muazzain(@muhammadmuazzain)开发并维护,当前版本 v1.0.0。

💬 留言讨论