微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📄

本地文档一键智能摘要

文件总结 File Summary & Analysis · v1.0.0
专业技能 安全 A 级 作者 leonthepro2012 公开目录收录
2.7k 下载 1 安装 8k 收藏 157 浏览

简介

本地文档智能摘要工具,支持 PDF/Word/Excel/TXT 等格式一键提取与总结,无需上传云端,保障数据隐私。

原始描述

Local document summary tool. Activate when user mentions "总结文件", "帮我总结", "总结文档", "分析文档" or provides a local file path (txt/docx/pdf/xlsx/xls).

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/file-summary-analysis/
其它 Agent解压到它自己的 skills 目录,目录名用 file-summary-analysis

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

技能正文


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.

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"

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

文档处理本地工具隐私保护pythonpdfofficetext-extractionsummarization

同类 Skill