Book to skill distillation
End-to-end workflow for rewriting a book, long PDF, EPUB, or manual into an agent-native LingTai skill/knowledge structure; covers source triage, scanned/image-only PDF OCR, page maps, topic splitting, progressive-disclosure outline design, daemon fan-out, copyright-safe transformation, validation, and publishing.From its SKILL.md
npx -y skills add huangzesen/book-to-skill-distillationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.1 KB, 597 tokens by cl100k_base, as published. Nobody here has run it
book-to-skill-distillation
Convert a linear human text into a branching agent-native skill. Distillation here is not a summary and not a compressed copy: it is a rewrite into the forms an agent can call while working — routers, decision trees, checklists, schemas, prompts, scripts, validation gates, worked examples, and reference modules.
Keep SKILL.md as the router; put depth in reference/, reusable forms in assets/, deterministic helpers in scripts/, and project-private extraction substrate under work/book-distill/<slug>/.
Lifecycle
Scout source → Recover structure → Extract/OCR substrate → Design target skill → Split by agent-native units → Rewrite in parallel → Reconcile → Validate & publish
Router
| Situation | Read next |
|---|---|
| understand the core transformation | reference/agent-native-rewrite.md |
| classify PDF/EPUB/source | reference/source-triage.md |
| scanned PDF / blank pdftotext / full OCR | reference/scanned-pdf-recipe.md |
| recover table of contents | reference/toc-recovery.md |
| map book to skill tree | reference/outline-design.md |
| use daemons in parallel | reference/daemon-orchestration.md, assets/daemon-task-template.md |
| copyright concern | reference/copyright-discipline.md |
| validate/publish | reference/validation-checklist.md, reference/publishing.md |
| calibrate on this run | reference/worked-example-legal-dd.md |
Quick start
- Create
work/book-distill/<slug>/and keep source-derived OCR/transcripts there, not inside the published skill. - Run
scripts/scout.sh <source.pdf> work/book-distill/<slug>or equivalent inspection; decide whether the source has a text layer. - Recover the source structure: TOC, headings, page offsets, chapter boundaries, appendices, and repeated schemas.
- If scanned/image-only, build full-text OCR as private substrate, then split it into topic files by page range.
- Design the target skill tree before rewriting: trigger, exclusions, primary routing axis, reference modules, assets, scripts, caveats, and validation plan.
- Fan out daemons: each daemon rewrites one topic or coherent topic group into agent-native structures, not into a chapter summary.
- Parent reconciles, removes duplication, verifies current-law/current-fact deltas, and enforces copyright-safe abstraction.
- Validate, refresh, and smoke-test realistic prompts.
Output test
A good distilled skill lets an agent answer: “What do I do next on this task?” without rereading the book. If the output mostly says what the book said in the same order, it is not yet agent-native.
What ships with it: 22 files
21.3 KB alongside SKILL.md, 5 of them executable
assets/
reference/
- agent-native-rewrite.md2.5 KB
- copyright-discipline.md182 B
- daemon-orchestration.md192 B
- outline-design.md1.5 KB
- publishing.md177 B
- scanned-pdf-recipe.md2.5 KB
- source-triage.md179 B
- toc-recovery.md188 B
- validation-checklist.md178 B
- worked-example-legal-dd.md2.3 KB
scripts/
- extract_bookmarks.pyruns169 B
- fanout_daemons.pyruns112 B
- quality_check.pyruns357 B
- render_pages.shruns211 B
- scout.shruns496 B
- .gitignore183 B
- LICENSE1.1 KB
- README.md8.1 KB
Gives 0 of the 12 instructions most pdf office docs skills give in 597 tokens
Counted across 636 of the 690 authors here whose files we hold, read 2026-08-07
- Extract text or tables using pdfplumber or pdftotextin 89 of 636, across 23 files
- Create new PDFs using reportlabin 83 of 636, across 16 files
- Read forms.md before filling out PDF formsin 80 of 636, across 13 files
- OCR scanned PDFs using pytesseract and pdf2imagein 77 of 636, across 10 files
- Use qpdf to merge or split PDFs or large filesin 70 of 636, across 3 files
- Use Excel formulas instead of hardcoded calculated values or Python calculationsin 68 of 636, across 13 files
- Unpack, edit, and repack XML for existing documents or presentationsin 63 of 636, across 8 files
- Document sources for all hardcoded valuesin 61 of 636, across 9 files
- Write minimal, concise Python code without unnecessary commentsin 59 of 636, across 7 files
- Run the recalculation script (recalc.py) after adding or modifying formulasin 59 of 636, across 7 files
- Fix all identified formula errors and recalculate before finishingin 58 of 636, across 6 files
- Format years as text stringsin 57 of 636, across 5 files
Said here and by no other author read
- keep source-derived OCR transcripts outside the published skill
- inspect the source to determine if it has a text layer
- recover source structure including TOC and chapter boundaries
- build full-text OCR for scanned or image-only sources
- split OCR text into topic files by page range
- design the target skill tree before rewriting
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.