← 返回 Skills 市场
ntsnail

Book Processor

作者 ntsnail · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
104
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install book-processor
功能描述
自动化处理 EPUB 电子书,提取全文、封面、概要和框架解读,支持案例库、每日清单、5-Why 分析、思维模型速查卡、流程图和 FAQ 等多种资产生成。
使用说明 (SKILL.md)

Book Processor Skill

功能概览

本技能自动化处理 EPUB 电子书,将书籍转化为结构化内容与实用工具。

核心输出文件

文件 说明
cover.jpeg 从 EPUB 提取的封面图片
full_text.txt 全书纯文本(若 EPUB 以图片为主,该文件内容可能极少)
summary.txt 书籍简要概要(若文字不足需手动补充)
framework_article.txt 将书中核心方法映射为“认知‑对抗‑重塑‑持久”四阶段框架的解读文章
examples.md 精选案例库(可根据书中实际人物/案例修改)
daily_combat_checklist.md 每日对抗清单模板(适用于需要每日练习的书籍)
5why_sheet.md 5‑Why 根因分析工作表
thinking_models_summary.md 思维模型速查卡(通用列表)
framework_flow.mmd Mermaid 流程图(可视化四阶段关系)
faq.md 常见问题与答案
process_config.json 本次处理所使用的配置(若未提供则使用默认值)

触发条件

当用户发送 .epub 文件时自动触发。


工作流程

  1. 接收 EPUB:从用户消息中提取 EPUB 文件
  2. 创建书籍文件夹:在 ~/workspace/books/ 下创建以书名命名的文件夹
  3. 保存文件:将 EPUB 放入对应文件夹
  4. 读取配置:如果文件夹中存在 process_config.json,则使用它;否则使用默认配置
  5. 执行处理:运行 scripts/process_book.sh \x3Cbook_folder>(相对于技能目录)
  6. 返回结果:向用户报告生成的文件列表和简要概览

配置选项

在书籍文件夹中创建 process_config.json 来控制生成的资产:

{
  "generate_examples": true,
  "generate_daily_checklist": false,
  "generate_5why": false,
  "generate_thinking_models": true,
  "generate_flowchart": true,
  "generate_faq": true
}

说明

  • true 表示生成对应文件
  • false 或省略表示跳过
  • 默认配置:仅生成 cover.jpegfull_text.txtsummary.txtframework_article.txt 四个必需文件

安装与依赖

必需工具

工具 用途 安装命令
jq JSON 配置解析 sudo apt-get install -y jq
python3 文本提取 sudo apt-get install -y python3
unzip EPUB 解压 sudo apt-get install -y unzip

验证安装

jq --version
python3 --version
unzip -v

使用方法

方式 1:自动触发(推荐)

直接将 EPUB 文件发送给福德,技能会自动处理。

方式 2:手动执行

# 处理指定书籍文件夹
/home/haifeng/workspace/scripts/process_book.sh /home/haifeng/workspace/books/《书名》

目录结构示例

books/
├── 一生之敌/
│   ├── 一生之敌.epub
│   ├── cover.jpeg
│   ├── full_text.txt
│   ├── summary.txt
│   ├── framework_article.txt
│   ├── examples.md
│   ├── daily_combat_checklist.md
│   ├── 5why_sheet.md
│   ├── thinking_models_summary.md
│   ├── framework_flow.mmd
│   ├── faq.md
│   └── process_config.json
└── 人本教练/
    └── ...

注意事项

  1. EPUB 文件命名:建议使用简化的文件名(如 《书名》.epub),避免特殊字符
  2. 图片为主的书:如果 EPUB 内容主要为图片,full_text.txt 可能非常少,需要手动补充 summary.txtframework_article.txt
  3. 重复处理:重新运行脚本时,会覆盖已有文件(除原始 EPUB 外)
  4. 编码:所有输出文件使用 UTF‑8 编码

故障排查

问题 原因 解决
jq 未安装 缺少依赖 sudo apt-get install -y jq
unzip: command not found 缺少解压工具 sudo apt-get install -y unzip
未找到 epub 文件 文件夹内无 .epub 文件 确保 EPUB 文件已放入书籍文件夹
生成文件为空 EPUB 为图片格式 手动补充 summary.txtframework_article.txt

扩展开发

如需自定义生成内容,可以修改 .skills/book-processor/scripts/process_book.sh 脚本。

自动化集成
该技能已被集成到 OpenClaw 的自动化流程中,当检测到 .epub 文件时会自动触发。


最后更新:2026‑03‑14

安全使用建议
This skill appears coherent for processing EPUB files. Before installing or enabling it: 1) review the included scripts yourself (scripts/process_book.sh) so you’re comfortable with the file writes under ~/workspace/books/ and temporary extraction under /tmp; 2) be aware the script will try to install jq via sudo apt-get if jq is missing (it requires network access and sudo privileges); 3) the skill does not request credentials or external endpoints and does not appear to exfiltrate data, but it will process any EPUB you upload — only upload files you trust; 4) if you want tighter control, disable automatic triggering and run the processing script manually; and 5) if you run in a restricted environment (no sudo, no network), pre-install required binaries (jq, python3, unzip) to avoid the script attempting package installation.
功能分析
Type: OpenClaw Skill Name: book-processor Version: 1.0.0 The skill automates EPUB processing but includes high-risk system operations in `scripts/process_book.sh`, such as calling `sudo apt-get install` for dependency management. It also lacks input validation when unzipping user-provided files, creating a potential Zip Slip vulnerability. While no intentional malice like data exfiltration was detected, these behaviors exceed standard safety boundaries for a document processing tool.
能力评估
Purpose & Capability
Name/description, required binaries (jq, python3, unzip), and the included processing script all align with extracting text and generating summaries/assets from EPUB files. No unrelated credentials, tools, or configuration paths are requested.
Instruction Scope
SKILL.md limits actions to receiving an EPUB, creating a folder under ~/workspace/books/, reading an optional process_config.json in that folder, and running scripts/process_book.sh. The script only reads files from the extracted EPUB and the per-book config, writes generated assets back into the book folder, and cleans up /tmp; it does not attempt to read or exfiltrate other system files.
Install Mechanism
The skill is instruction-only (no external download). The script will attempt to install jq via 'sudo apt-get update && sudo apt-get install -y jq' if jq is missing — this performs network package installation and requires sudo. That is not inherently malicious but is an installation action users should be aware of.
Credentials
No environment variables, credentials, or unrelated config paths are requested. All filesystem writes are confined to the book folder under ~/workspace/books/ and /tmp for extraction. No external API keys or secrets are required.
Persistence & Privilege
Skill is not marked 'always:true'. It is user-invocable and can be auto-triggered on receiving .epub as described, which is consistent with its purpose. The skill does not modify other skills or global agent configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install book-processor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /book-processor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of book-processor skill. - Automates EPUB processing: extracts full text, cover, summary, and framework analysis. - Supports generating case studies, daily checklists, 5-Why worksheets, thinking model quick cards, flowcharts, and FAQ. - Allows custom output control via `process_config.json`; defaults to 4 main files. - Triggered automatically when an `.epub` file is received. - Lists required dependencies: `jq`, `python3`, and `unzip`. - Provides detailed usage, sample output structure, troubleshooting, and extension guidance.
元数据
Slug book-processor
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Book Processor 是什么?

自动化处理 EPUB 电子书,提取全文、封面、概要和框架解读,支持案例库、每日清单、5-Why 分析、思维模型速查卡、流程图和 FAQ 等多种资产生成。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 104 次。

如何安装 Book Processor?

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

Book Processor 是免费的吗?

是的,Book Processor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Book Processor 支持哪些平台?

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

谁开发了 Book Processor?

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

💬 留言讨论