Book-to-Skill: Compile Any PDF Into Native Claude Knowledge
An open-source compiler that turns any technical book into a structured Claude Code skill. Pay 4,000 tokens per session instead of 200,000.
Technical books have a reading problem. Not a knowledge problem.
You buy a 500-page engineering book with every intention of mastering it. You read it once. Maybe twice. Then it joins the stack of books you can see from your desk but no longer consult. Three months later, chapter 7 might as well not exist.
The usual fix is search. But search gives you pages, not answers. It finds where the word appears, not how the author thinks about the problem.
**The context tax**
The AI workaround is to upload the book directly. Drop the PDF into your Claude project and now Claude has access to the whole thing. Except a 400-page technical book burns roughly 200,000 tokens. That debt hits your context budget on every single prompt, before you type a word. You pay for the index, the appendix, the acknowledgements, and the three chapters that have nothing to do with what you are building.
**What book-to-skill does**
book-to-skill is an open-source tool that compiles any PDF, EPUB, or folder of documents into a native Claude Code skill. Instead of reading raw files at runtime, it processes the book once at compile time and produces a small set of structured files that live at `~/.claude/skills/`.
The output is not a vector database. It is a set of markdown files: a dense `SKILL.md` index of roughly 4,000 tokens, on-demand chapter summaries around 1,000 tokens each, a pattern library, and a glossary.
**Lazy loading in practice**
The core index is always present but light. When your query touches a specific topic, Claude loads the relevant chapter file. When you ask about something else, that chapter stays on disk. A 400-page book that used to cost 200,000 tokens per prompt now costs 4,000 tokens for the index plus 1,000 tokens for whichever chapters your question touches.
**Why not just use RAG?**
Standard retrieval-augmented generation finds document chunks close to your keywords. It does not know that chapter 4 introduces the author's core mental model, or that the anti-patterns in chapter 9 directly contradict the advice in chapter 3.
book-to-skill extracts structure: the frameworks the author builds, the recurring design patterns, the explicit anti-patterns, and the vocabulary the author uses consistently throughout. Claude gets to reason with the author's actual thinking, not keyword-adjacent fragments.
**Two extraction engines**
For heavy technical books with dense tables and code blocks, the tool routes through Docling, which preserves markdown structure. For standard prose, it switches to poppler text extraction, which is faster. The routing is automatic.
**In your terminal**
Everything happens inside the terminal where you already code. Run the compile command once. The skill registers at `~/.claude/skills/`. From then, trigger it by slug: `/design-patterns ch08` loads chapter 8 into context, or `/design-patterns replication` pulls everything the book says about replication.
No browser tab. No external API. No third party has read your book.
Check out virgiliojr94/book-to-skill on GitHub. Pick the technical book collecting dust on your desk and turn it into something you actually use.
Related Reads
iii: The End of Backend Fragmentation
A WebSocket-based engine that replaces API gateways, message queues, cron daemons and AI agent scaffolding with one unified runtime.
Agent Memory That Actually Sticks
A fully local engine that cuts token usage by 61% and boosts agent task pass rates by 51%, without calling a single external API.
Markdown With Superpowers
One text file. Four output formats. No export pipelines, no tool switching, no compromises. Quarkdown turns plain Markdown into a Turing-complete typesetting language.