LeonThePro

文件总结 File Summary & Analysis

知识管理v1.0.0
作者:LeonThePro更新于 2026-05-11file-summary@clawhub_leonthepro2012/file-summary
摘要总结文档问答#总结文档#Document#PDF#总结

据 AlphaMoat 统计,截至 2026-09,文件总结 File Summary & Analysis 累计下载 4,787 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 1,972 位,在「知识管理」分类(442 个)中排名第 182 位。

累计安装
509
累计下载
4,787
星标
1
全站排名
#1,972
全站前 39% · 「知识管理」前 42%
平台累计安装累计下载星标评论
ClawHub ↗1404,1821-
SkillHub ↗5094,7871—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

技能提供一个 file_summary 工具,支持 txt、docx、pdf、xlsx、xls 等多种格式:extract 动作返回文档纯文本,summary 动作返回由 OpenClaw LLM 生成的简明摘要,工作流是先抽取正文再让 OpenClaw LLM 总结。运行需要 Python 3.8+ 环境以及由脚本自行安装的解析包 python-docx、pypdf、openpyxl、xlrd==1.2.0;配置在 channels.local.tools 下开启 file_summary 与 python。权限方面要求用户授予本地文件读取权限,执行 Python 不需要额外系统权限。该技能 记录的风险是:脚本会读取用户选中的本地文档并把抽取出的文本送入 LLM 摘要流程,且可能自动安装版本未固定的 Python 解析包;其缓解建议是只处理已获批准的文件、优先采用需要显式确认的部署方式,并在受控环境中安装已审核且版本固定的依赖,或在受管部署中关闭自动安装。

资料发布于 2026-10-29

可以用来做什么

  • 抽取本地文档正文供后续处理
  • 为本地文档生成简明摘要
  • 按中文或英文提示生成文档摘要

什么时候用

  • 用户提到“总结文件”“帮我总结”“总结文档”“分析文档”时
  • 用户提供本地文档路径时
  • 需要把文档正文交给 OpenClaw LLM 生成摘要时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

帮我总结 D:\测试.pdf
总结文件 D:\数据\销售表.xlsx
分析文档并给出要点

月度数据趋势

累计下载4,787
2,3023,6374,9712026-03 · 累计下载 2,4862026-05 · 累计下载 3,4532026-06 · 累计下载 3,6882026-07 · 累计下载 4,0282026-08 · 累计下载 4,3052026-09 · 累计下载 4,78726-0326-09
星标1
0112026-03 · 星标 -2026-05 · 星标 12026-06 · 星标 12026-07 · 星标 12026-08 · 星标 12026-09 · 星标 126-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-094,787—1
2026-084,305+6.9%1
2026-074,028+9.2%1
2026-063,688+6.8%1
2026-053,453—1
2026-032,486—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

2.3 KB · ClawHub v1.0.0
---
name: file-summary
description: |
  Local document summary tool. Activate when user mentions "总结文件", "帮我总结", "总结文档", "分析文档" or provides a local file path (txt/docx/pdf/xlsx/xls).
---

# File Summary Tool

Single tool `file_summary` for local document text extraction and summary.

展开全部(共 81 行)
## Token Extraction

From user input `帮我总结 D:\测试.pdf` → `file_path` = `D:\测试.pdf`

## Actions

### Extract Document Content

{ "action": "extract", "file_path": "D:\\测试.pdf" }

Returns:
- Success: Plain text content of the document (txt/docx/pdf/xlsx/xls)
- Error: Error message starting with ❌ (e.g. ❌ File not found, ❌ Unsupported format)

### Generate Summary

{ "action": "summary", "file_path": "D:\\测试.pdf" }

Returns: Concise summary of the document content (integrated with OpenClaw LLM)

## Workflow

To summarize a local document:
1. Extract content: `{ "action": "extract", "file_path": "your_file_path" }` → returns plain text
2. Generate summary: OpenClaw LLM summarizes the extracted text automatically

## Configuration

channels:
  local:
    tools:
      file_summary: true # default: true
      python: true # required - need Python environment

## Dependency

### Required Environment
1. Python 3.8+ (added to system environment variables)
2. Required Python packages (auto-installed by script):
   - python-docx (for docx)
   - pypdf (for pdf)
   - openpyxl (for xlsx)
   - xlrd==1.2.0 (for xls)

### Tool Path Configuration
1. Place the tool files in OpenClaw's skill folder:
   OpenClaw/skills/file-summary/
   ├─ SKILL.md (this file)
   ├─ file2sum.py
2. Set the execution command in OpenClaw:
   ${skill_path}\\file2sum.py

## Permissions

Required:
- Local file read permission (user needs to grant file access)
- Python execute permission (no special system permissions required)

## Usage

### Local Deployment
1. Put the `file-summary` folder into OpenClaw's `skills` directory
2. Restart OpenClaw
3. User input example:
   - "帮我总结 D:\测试.pdf"
   - "总结文件 D:\数据\销售表.xlsx"

### Public Deployment
1. Upload the `file-summary` folder (include md/py) to a public platform (e.g. GitHub/Gitee, ClawHub)
2. Share the download link
3. Users import via OpenClaw "Skill Market → Import from URL"

「知识管理」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。