← All articles
Jul 30, 2026

book-to-skill Turns Any Technical Book Into a Claude Code Skill You Can Actually Query

book-to-skill converts a PDF, EPUB, or a whole docs folder into a structured Claude Code skill, 24 to 51 times cheaper per question than dumping the book into context. Here's how it actually works and where it falls short.

You buy a good technical book, read it once, and three months later you can't remember chapter 7 existed. Asking an AI assistant about it usually goes one of two ways: it hallucinates an answer, or it says it doesn't have the content. book-to-skill is a Claude Code skill built specifically to fix that gap: point it at a PDF, EPUB, or a folder of documents, and it turns the source into a structured skill your agent can load on demand instead of a file you never reopen.

What it actually does

Running /book-to-skill your-book.pdf (or a folder, a glob, or a list of files) produces a full skill written to your agent's skills directory: ~/.claude/skills/<slug>/ for Claude Code, with equivalent paths for GitHub Copilot CLI and Amp, since all three read the same open Agent Skills standard. The output isn't one giant file. It's a small core SKILL.md (roughly 4,000 tokens) holding the book's mental models and a chapter index, plus one file per chapter (about 1,000 tokens each) that only loads when you actually ask about that topic, a glossary, a table of decision rules, and a patterns reference.

The name says "book," but the input is any structured prose you re-read often: internal documentation, brand and design-system guidelines, a stack of research papers, specs you reference but never memorize. If you open a document often enough to wish you'd memorized it, it's a candidate.

Why this is cheaper than it sounds

The project's own benchmark, run with its included discovery_tax.py script, measures what it calls the "discovery loop tax." A PDF-reading agent doesn't just read once, it navigates: it fetches a table of contents, hits a term it can't define, pulls more pages, backtracks, and every one of those hops gets re-processed on every later turn in the conversation. Measured on three real books, answering a single targeted question costs 119,264 tokens as a raw context dump for "Think Python 2," versus about 5,000 tokens through book-to-skill's resident core plus one compiled chapter, a 24x reduction. On a book with larger chapters ("AI Engineering," 256K tokens), the gap widens to 51x against the dump and 15.6x against a well-run discovery loop.

The project is upfront about the limits of that number: the discovery-loop comparison is a model of a well-tuned agent using the book's actual table of contents, not a worst case, and the context-dump cost recurs every single turn while the discovery cost is one-time. On real conversions the project measured directly, a 244-page technical book (Think Python 2) cost about $0.88 to convert on Claude Sonnet 4.5, a 501-page book (Pro Git) about $1.23. Roughly a dollar per book, once, against re-reading the source every session.

How the extraction actually works

Before touching the book, the skill asks whether it's technical (code, tables, formulas) or text-heavy (prose, few tables), then picks the right extractor: docling for technical books, since it preserves markdown tables and code blocks at about 1.5 seconds per page, or pdftotext/pypdf for prose, which run near-instantly. EPUB, DOCX, HTML, RTF, and MOBI each have their own extraction path with a fallback if the preferred library isn't installed, and python3 scripts/extract.py --check reports exactly what's missing before you run anything for real.

One real constraint worth knowing before you rely on it: chapter auto-detection needs explicit "Chapter N" or "Capítulo N" headings. Books that use section titles instead (the project's own test case was Pro Git) or roman numerals (Moby-Dick) don't auto-segment, so you point the tool at sections manually. Extraction and conversion still work either way, the chapter index just isn't automatic.

Where it fits and where it doesn't

This is a genuinely good match for the AI-operating-system idea: a second brain that doesn't just store a file, but hands your agent the exact 1,000-token chapter it needs instead of forcing a re-read of the whole source every session. It's the same principle behind writing a CLAUDE.md instead of pasting your whole codebase into every prompt, applied to a book instead of a project.

It's a bad fit for a single one-off read. If you're only going to reference a document once, a plain PDF agent handles that fine, the setup cost of a structured skill only pays off once you come back to the same material repeatedly. And it needs Python plus format-specific extractors installed locally, so budget a few minutes of setup the first time you run it.

Free and open source under the MIT license, built by virgiliojr94, 13,500-plus GitHub stars as of this writing.

Join the newsletter

AI workflows and systems, straight to your inbox. Free.