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