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
累計下載
4787
星標
1
全站排名
#1,972
全站前 39% · 「知識管理」前 42%
平台累計安裝累計下載星標評論
ClawHub ↗14041821-
SkillHub ↗50947871—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

技能提供一個 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
分析文件並給出要點

月度資料趨勢

累計下載4787
2302363749712026-03 · 累計下載 24862026-05 · 累計下載 34532026-06 · 累計下載 36882026-07 · 累計下載 40282026-08 · 累計下載 43052026-09 · 累計下載 478726-0326-09
星標1
0112026-03 · 星標 -2026-05 · 星標 12026-06 · 星標 12026-07 · 星標 12026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094787—1
2026-084305+6.9%1
2026-074028+9.2%1
2026-063688+6.8%1
2026-053453—1
2026-032486—-

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),按月更新。口徑說明見資料方法。