distill-book

distill-book is a skill for Claude Code from fanyty/claude-distill-book. It costs 113 tokens per session (1,979 once invoked), scanned A, original, MIT.

A workflow for turning a PDF book into a structured Claude Code skill. It identifies whether the book is a manual, theory book, narrative, or practical guide, then extracts its usable knowledge with source-quality checks.

In plain words
What is it for?
Use it to convert a PDF or Markdown book into a skill directory, extract facts and methods by chapter, combine several books, and run the included quality checks.
Why use it?
It provides a repeatable way to turn long books into instructions an agent can use. It also helps avoid treating every kind of book as if it were a step-by-step manual.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it to convert a PDF or Markdown book into a skill directory, extract facts and methods by chapter, combine several books, and run the included quality checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fanyty/claude-distill-book/distill-book
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fanyty/claude-distill-book --skill distill-book
Clone the repo
git clone --depth 1 https://github.com/fanyty/claude-distill-book

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for distill-book

README.md
[![agentmods](https://agentmods.dev/badge/skills/fanyty/claude-distill-book/distill-book/github.svg)](https://agentmods.dev/skills/fanyty/claude-distill-book/distill-book)
Your own site
<a href="https://agentmods.dev/skills/fanyty/claude-distill-book/distill-book"><img src="https://agentmods.dev/badge/skills/fanyty/claude-distill-book/distill-book/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for distill-book

Your own site · 80×15
<a href="https://agentmods.dev/skills/fanyty/claude-distill-book/distill-book"><img src="https://agentmods.dev/badge/skills/fanyty/claude-distill-book/distill-book.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,979 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.01979
Opus 5 $0.00056 $0.00989
Sonnet 5 $0.00023 $0.00396
Haiku 4.5 $0.00011 $0.00198

Measured 11d ago against content hash 04ac6fdb5aee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

distill-book scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/eval_skill.py, scripts/pdf_to_md.py, scripts/quality_check.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

distill-book/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

书籍蒸馏 Skill

将 PDF 书籍蒸馏为一个结构化、可验证的 Claude Code Skill 目录。本 Skill 整合了 book-distill、daizhouchen/book-distiller、bookforge-ai、edgarmrueda-alt 等社区 优秀实践。

蒸馏流程(7 步)

Step 1: 收集输入信息

向用户确认:

  • 源路径:PDF 文件或已转换的 Markdown 目录
  • Skill 名称:英文,小写+连字符(如 system-design-guide
  • 安装位置
    • 全局:~/.claude/skills/<name>/(推荐)
    • 项目本地:.claude/skills/<name>/
  • 是否多书合成:如果是追加到已有 Skill,需做 overlap 分析

Step 2: 解析源文件

# 优先 marker-pdf(保留结构和表格)
marker_single "$PDF_PATH" --output_dir /tmp/book-markdown

# 备选 pdfplumber(marker 不可用时)
python3 ${CLAUDE_SKILL_DIR}/scripts/pdf_to_md.py "$PDF_PATH" /tmp/book-markdown

Step 3: 原型识别(关键新增)

阅读目录、前言、前 2-3 章,判定书籍原型,不同原型采用不同提取策略和 SKILL.md 骨架

原型 特征 提取策略 SKILL.md 骨架
工具书 (Tool) 教程、手册、参考 工作流 + 决策树 + 常见陷阱 概述/原则/工作流/决策/陷阱/参考
思想书 (Philosophy) 哲学、理论、 manifesto 核心论点 + 心智模型 + 反直觉洞察 概述/论点/模型/反思/参考
叙事书 (Narrative) 传记、案例、故事 关键事件 + 决策点 + 教训 概述/时间线/决策/教训/参考
技能书 (Skill) 实操、练习、方法论 步骤 + 检查点 + 反模式 概述/方法/步骤/检查点/反模式/参考

特别提醒:思想书禁止"4 周行动计划"——思想是内化不是执行。叙事书禁止抽象原则堆砌——保留具体情节。

Step 4: 事实系统化四步法(关键新增)

对每章按以下四步提取,避免挑选事实导致以偏概全

4.1 维度分类(穷尽式提取)

收集五类事实,包括沉默性事实

  • 情节 - 发生了什么
  • 言论 - 作者/人物说了什么
  • 数据 - 数字、统计、引用
  • 结构 - 组织方式、分类框架
  • 沉默 - 作者没说什么、避开了什么、盲区在哪里(最重要,揭示作者局限
4.2 模式识别

跨章节找重复出现的模式、对比、因果链。

4.3 跨维度交织

将不同维度的事实交叉验证:言论是否与情节一致?数据是否支持结构?

4.4 可视化

用表格、决策树、时间线呈现交织结果。

Step 5: 信源分级(关键新增)

每条知识标注信源等级,产出文件头部声明信源构成

等级 来源 置信度
A 原书直接引用
B 学术文献/论文
C 书评/二手解读
D 模型补充知识 低(需标注)

Fidelity Statement 模板(放在 SKILL.md 概述之后):

## 信源声明
- A 级(原书直接提取):XX%
- B 级(学术补充):XX%
- C 级(解读):XX%
- D 级(模型知识):XX%
- 编辑编译:全部 / 部分

Step 6: 结构化决策点(关键新增)

根据书籍规模和内容,决定输出结构:

书籍 < 10 章 且 主题单一?
├── 是 → 单一 SKILL.md + reference/chXX.md
└── 否 → 评估以下决策:
    ├── 主题跨多个子领域? → router + modules/ 结构
    │   (SKILL.md 只做索引路由,每个子领域一个 module)
    ├── 多个独立情境集合? → 拆分为多个 standalone skills
    └── 单一深框架? → 单 SKILL.md + 多层 reference/

Read the full file on GitHub · 180 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 180 lines · 113 tokens per session scan A 04ac6fdb5aee

Subscribe to this mod's changes

distill-book is a skill published in the GitHub repository fanyty/claude-distill-book (5 stars, last pushed 2mo ago), licensed MIT. It adds 113 tokens to every session and 1,979 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pptx-import

A method for adding an uploaded PowerPoint presentation to an existing classroom as extra pages while keeping the slides' original layout. PowerPoint is Microsoft's presentation file format.

THU-MAIC/OpenMAIC · 125 tokens

exam-study-guide

A study-guide builder for a completed exam chapter that has not yet passed its required checks. It creates a structured teaching checklist and, in full mode, a self-contained HTML and printable PDF guide with readable formulas, visible images, explanations, examples, and answers.

ZeKaiNie/universal-examprep-skill · 113 tokens

brief-compliance-check

Check a LaTeX coursework submission against the requirements in a supplied PDF assessment brief. Use when verifying format, required sections, word limits, or deliverables before submission. Not for general prose proofreading; use $proofread.

flonat/flonat-research · 50 tokens

textbook-to-md

Convert PDF/EPUB textbooks to searchable markdown files for an AI agent's own reference. Use this skill whenever: (1) the user asks to convert a textbook/PDF chapter to markdown, (2) you need to search textbook content and no markdown version exists yet, (3) batch-converting a set of reference books into a knowledge…

drpwchen/textbook-to-note · 90 tokens

scan-to-practice

A complete methodology for turning scanned or image-based learning materials into high-quality desktop, web, or mobile practice products. Covers visual transcription, data assembly, answer-key-driven controls and grading, product design, animation, validation, and long-term maintenance. Use when a user wants to…

parz0val0/scan-to-practice · 89 tokens

svg-press

Teaches agents how to hand-craft self-contained SVG diagrams that render correctly in browsers, tags, and Playwright PDF/PNG. Covers containment math, viewBox sizing, arrow construction, text hierarchy, KDCube brand color tokens, semantic zone fills, badges, the PNG inspection loop, writepng parameters, multi-diagram…

kdcube/kdcube · 87 tokens