with one click
read-book
读书 Skill - 基于《如何阅读一本书》的分析阅读法,深度分析书籍并生成专属 AI Skill 助手
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
读书 Skill - 基于《如何阅读一本书》的分析阅读法,深度分析书籍并生成专属 AI Skill 助手
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | read-book |
| description | 读书 Skill - 基于《如何阅读一本书》的分析阅读法,深度分析书籍并生成专属 AI Skill 助手 |
| argument-hint | [书籍文件名] |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
| use_case | 当用户需要深度分析一本书并生成结构化读书笔记和 RIA++ 格式的 AI Skill 时调用。 支持 PDF / EPUB / DOCX / TXT / Markdown 格式。 包含成本预估、章节检测、三重验证等质量控制步骤。 |
本 Skill 基于《如何阅读一本书》的分析阅读法,帮助你深度分析书籍,输出 RIA++ 结构化读书笔记,并生成专属 AI Skill。
当用户说以下内容时启动:
/read-book.pdf / .epub / .docx / .txt / .md 文件当用户想继续基于已分析的书籍进行问答时:
/book-xxx)| 任务 | 使用工具 |
|---|---|
| 读取书籍内容 | Bash + uv run python scripts/extract.py --file "{path}" --output "./temp/{slug}.txt" |
| 成本估算 | Bash + uv run python scripts/cost_estimator.py (读取提取后的文本) |
| 章节检测 | Bash + uv run python scripts/chapter_detector.py |
| 写入读书笔记 | Write 工具 |
| 追加评价/思考 | Edit 工具 |
| 创建 Skill 目录 | Bash 工具 |
| 生成专属 Skill | Bash + uv run python scripts/skill_generator.py |
| 列出已分析书籍 | Bash + uv run python scripts/skill_generator.py --action list |
| 大文件探测 | 优先用 Grep / Glob 而非 Read 全文(>5000 行时) |
输出目录:生成的读书笔记和 Skill 写入 ~/.config/opencode/skill/books/{slug}/
本 skill 当中的所有的引用及运行脚本的路径请优先从当前 skill 目录查找,例如:
references/analysis_rules.mduv run python scripts/extract.pyuv run python scripts/chapter_detector.pyuv run python scripts/cost_estimator.py根据文件类型选择读取方式:
格式 命令
─── ───
.pdf uv run python scripts/extract.py --file "{path}" --output "./temp/{slug}.txt" [--technical]
.epub uv run python scripts/extract.py --file "{path}" --output "./temp/{slug}.txt"
.docx uv run python scripts/extract.py --file "{path}" --output "./temp/{slug}.txt"
.txt/.md uv run python scripts/extract.py --file "{path}" --output "./temp/{slug}.txt"
PDF 参数说明:
--technical:技术类书籍,优先使用 docling(需安装)--start N:从第 N 页开始--end N:到第 N 页结束回退链(自动降级):
目标:预估处理成本,避免超长文档意外消耗过多 token
步骤:
uv run python scripts/cost_estimator.py --file "./temp/{slug}.txt"
GLM-5.2 定价:
输出:成本估算摘要
目标:快速了解书籍结构,识别章节边界
步骤:
uv run python scripts/chapter_detector.py --file "./temp/{slug}.txt"
输出:章节列表 + 目录检测结果
目标:判断书籍类型,确定分析方法
步骤:
prompts/step1_classify.md 获取分类指导输出:记录书籍类型,后续分析以此为依据调整方法
目标:理解书籍整体结构
步骤:
prompts/step2_skeleton.md 获取骨架指导输出:骨架摘要(一句话概括 + 结构拆解 + 作者要解决的问题)
目标:与作者达成共识,理解核心概念
步骤:
prompts/step3_keywords.md 获取提取指导输出:核心概念表格 + 核心主旨列表
目标:对提取的核心概念/方法论候选进行质量过滤
步骤:
输出:验证记录列表
目标:形成自己的观点
步骤:
prompts/step4_evaluate.md 获取评价指导输出:评价与思考段落
目标:将分析结果整理为可复用的笔记,按方法论单元组织
步骤:
prompts/step5_note.md 获取笔记模板输出路径:~/.config/opencode/skill/books/{slug}/note.md
笔记结构:
## 方法论拆解
### {方法论1} → R / I / A1 / A2 / E / B / 验证记录
### {方法论2} → R / I / A1 / A2 / E / B / 验证记录
## 核心概念 → 概念表格
## 我的评价 / 与我何干
## 精彩摘录
## 附录:分析过程记录
目标:将书籍方法论封装为 RIA++ 结构的可执行 Skill
步骤(推荐使用脚本自动生成):
uv run python scripts/skill_generator.py \
--book-title "{书名}" \
--note-path "~/.config/opencode/skill/books/{slug}/note.md"
脚本执行流程:
## 方法论拆解 部分)输出路径:
~/.config/opencode/skill/books/{slug}/
├── SKILL.md # 核心触发入口(~4K tokens)
├── glossary.md # 术语表(~1.5K tokens)
├── patterns.md # 技术/模式表(~2K tokens)
├── cheatsheet.md # 决策规则速查(~1K tokens)
└── rejected/ # 被过滤的方法论单元
触发词:/book-{slug}
目标:确保生成的 RIA++ Skill 结构完整
步骤:
~/.config/opencode/skill/books/{slug}//book-{slug} 测试uv run python scripts/skill_generator.py --action list
cat ~/.config/opencode/skill/books/{slug}/note.md
ls ~/.config/opencode/skill/books/{slug}/rejected/
/book-{slug}
生成的专属 Skill 目录:
~/.config/opencode/skill/books/{slug}/
├── SKILL.md # 核心:frontmatter + 方法论卡片 + 索引
├── glossary.md # 术语表:书中关键概念定义
├── patterns.md # 模式表:技术、算法、设计模式
├── cheatsheet.md # 速查表:决策规则、快速参考
├── note.md # 原始读书笔记
├── metadata.json # 元数据:提取统计、验证统计
└── rejected/ # 未通过三重验证的方法论
├── {method}.md
└── ...
| 文件 | 预算 | 用途 |
|---|---|---|
| SKILL.md | ~4K tokens | 核心框架 + 方法论索引 + 第一屏方法论卡片 |
| glossary.md | ~1.5K tokens | 所有术语定义(按需加载) |
| patterns.md | ~2K tokens | 技术/模式描述(按需加载) |
| cheatsheet.md | ~1K tokens | 决策表(按需加载) |
references/analysis_rules.mdreferences/read_level.md