Turning textbooks into agent memory without the token bloat
It turns technical books into structured agent skills so Claude Code or Copilot can reference actual content on demand instead of guessing.

What it does
book-to-skill is a Python converter that ingests PDFs, EPUBs, DOCX files, and other long-form documents, then emits a structured agent skill in the open Agent Skills format. The output splits a book into a central SKILL.md index, per-chapter files, a glossary, a patterns file, and a cheatsheet — all loaded on demand so only the relevant section hits the context window. It runs entirely offline and claims to use 24×–51× fewer tokens than feeding a whole book to an LLM for a single question.
The interesting bit
Instead of summarizing, it distills structure — frameworks, decision rules, anti-patterns, and per-chapter references — so the agent reads the real text when queried rather than hallucinating from training data. The generator is spec-driven: your agent follows the SKILL.md instructions to navigate the skill, making the format portable across any host that supports the standard, including Claude Code, GitHub Copilot CLI, and Amp.
Key highlights
- Supports PDF, EPUB, DOCX, Markdown, HTML, RTF, and MOBI inputs, with fallback extractors if optional dependencies are missing.
- Emits a standard
SKILL.mdskill with on-demand chapter files that stay out of the context window until requested. - Processing is local; the tool never uploads your documents anywhere.
- Based on the original
book-to-skillby virgiliojr94, expanded into a multi-format, multi-host converter.
Caveats
- Scanned PDFs require pre-processing with OCR before the extractor can handle them.
- Heavy technical layouts with code and tables lean on optional dependencies like
docling; fallback extractors may lose formatting. - The 24×–51× token savings figure is self-reported on unnamed “real books,” so treat it as a directional claim rather than a benchmark.
Verdict
Worth a look if you own a shelf of technical books you can never remember at 2 a.m. and want your agent to cite them instead of confabulating. Skip it if you already have perfect recall or only read thin pamphlets.
Frequently asked
- What is Leutenegger/book-to-skill?
- It turns technical books into structured agent skills so Claude Code or Copilot can reference actual content on demand instead of guessing.
- Is book-to-skill open source?
- Yes — Leutenegger/book-to-skill is open source, released under the MIT license.
- What language is book-to-skill written in?
- Leutenegger/book-to-skill is primarily written in Python.
- How popular is book-to-skill?
- Leutenegger/book-to-skill has 1.2k stars on GitHub.
- Where can I find book-to-skill?
- Leutenegger/book-to-skill is on GitHub at https://github.com/Leutenegger/book-to-skill.