Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work.
$ npx -y skills add virgiliojr94/book-to-skill --agent claude-code
What's inside
How it works, in 3 steps:
/book-to-skill ./my-book.pdf/my-book replication and it reads the right chapter and answers from the real content, no hallucination.You buy a great technical book. You read it once. Three months later you can't remember chapter 7 existed.
The usual workarounds don't help:
book-to-skill solves this by turning the book into a structured skill your agent loads on demand.
Once installed, you just type /your-book-slug replication and the agent reads the right chapter and answers from the actual content. No hallucination. No digging through PDFs. The book becomes part of your workflow.
Works with any host that supports the open Agent Skills standard — GitHub Copilot CLI, Amp, Claude Code, Hermes Agent, and OpenClaw all read the same SKILL.md format.
Running /book-to-skill your-book.pdf (or a folder, glob, or list of files) creates a full skill in the user-level cross-agent skills directory ~/.agents/skills/<slug>/ — one copy that Copilot CLI, Amp, and Codex discover natively; OpenClaw also discovers it when using its default state directory. With a non-default OPENCLAW_STATE_DIR, use the active state's skills/ root or a workspace/extra directory instead. When run under Claude Code, the converter also attempts a verified symlink at ~/.claude/skills/<slug>/ — Claude Code sees the skill when the link read-back confirms it; otherwise the run report says so. Hermes Agent partitions its personal skills by category and does not scan the cross-agent root, so a Hermes install lands in $HERMES_HOME/skills/<category>/<slug>/ instead. OpenClaw-managed and project-local destinations remain available when explicitly requested:
| File | Purpose | Size |
|---|---|---|
SKILL.md | Core mental models + chapter index | ~4,000 tokens |
chapters/ch01-*.md … | One file per chapter, loaded on-demand | ~1,000 tokens each |
glossary.md | Every key term, alphabetically sorted with chapter refs | ~1,500 tokens |
patterns.md | All techniques, algorithms, and design patterns | ~2,000 tokens |
cheatsheet.md | Decision tables and quick-reference rules | ~1,000 tokens |
Chapter files are loaded on-demand — they don't count against the skill budget until you ask about that topic.
The name says "book", but the input is any structured prose. The same extraction works on knowledge you own and re-read constantly:
docs/ folder into one skill and ask it while you code.If you re-open a document often enough to wish you'd memorized it, it's a candidate.
A PDF-reading agent doesn't just read — it navigates: it re-fetches the ToC, backtracks, and re-processes all of it on every turn. book-to-skill pays that structuring cost once, at conversion, so queries stay proportional to the answer — 24×–51× fewer tokens than dumping the book into context, measured on real books.
📊 Full methodology, numbers, and per-book tables → docs/performance.md
Two halves: a deterministic Python extractor (document → clean text + metadata) and a spec-driven generator (your agent follows SKILL.md to turn that into a structured skill). On-demand chapter files keep the loaded skill small.
🔧 Full walkthrough (Steps 0–10, extraction modes, token budgets) → docs/how-it-works.md
/book-to-skill <path|folder|glob> [skill-name] — plus analyze-only, generate-from-analysis, and update/fold-in modes. After a conversion, the converter can publish the skill to GitHub (private by default) so any host installs it with npx skills add.
▶️ All modes and examples → docs/usage.md
💬 In practice → use cases — a DevEx book became a survey of 300+ engineers; a scanned PDF that stalled became #130. Add yours: the account lives in your own Gist, the index takes a one-line PR.
# One command, any host — via the cross-agent skills CLI:
npx skills add virgiliojr94/book-to-skill
# Or manually — clone into your skills folder (registers /book-to-skill):
git clone https://github.com/virgiliojr94/book-to-skill.git ~/.claude/skills/book-to-skill
# (Copilot CLI: ~/.copilot/skills/ · Amp/cross-agent: ~/.agents/skills/)
# (Hermes Agent: ${HERMES_HOME:-$HOME/.hermes}/skills/<category>/)
# (OpenClaw: ${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/skills/; ~/.agents/skills/ only with default state)
📥 All hosts, optional extractors, and the standalone CLI → docs/install.md
Common questions — "why not just dump the PDF?", cost, privacy, non-book inputs, multi-file books.
❓ Answers → docs/faq.md
The extractor tries tools in order per format and uses the first available. If nothing is installed, it tells you which command to run. Plain text, Markdown, reStructuredText and AsciiDoc need no extra deps.
Check your setup in one command:
python3 scripts/extract.py --checkprints which extractors are installed for every format and the exact command to install anything missing — no file needed.
PDF — choose by book type:
| Book type | Tool | Install | Speed |
|---|---|---|---|
| Text-heavy (prose, few tables) | pdftotext (poppler) | sudo apt install poppler-utils | ⚡ instant |
| Text-heavy fallback | pypdf | pip3 install pypdf | ⚡ instant |
| Text-heavy fallback | pdfminer.six | pip3 install pdfminer.six | ⚡ instant |
| Technical (code, tables, formulas) | docling | pip3 install docling | ~1.5s/page |
Before extraction begins, the skill asks you whether the book is technical or text-heavy and picks the right tool automatically. Docling preserves markdown tables and code blocks; pdftotext is faster for prose-only books.
Scanned PDFs need OCR first. A PDF that is page images with no text layer — a photographed or scanned book — has nothing for these tools to extract. The extractor checks the first pages and stops immediately with an explanation, rather than working through the whole book to produce an empty skill. Run OCR yourself, then convert the result:
ocrmypdf input.pdf output.pdf
EPUB:
| Tool | Install | Quality |
|---|---|---|
ebooklib + beautifulsoup4 | pip3 install ebooklib beautifulsoup4 | ⭐⭐⭐ Best |
stdlib zipfile | built-in — no install needed | ⭐⭐ Always available |
Other formats:
| Format | Tool | Install |
|---|---|---|
| DOCX | python-docx (fallback: stdlib ZIP/XML) | pip3 install python-docx |
| HTML | beautifulsoup4 (fallback: stdlib html.parser) | pip3 install beautifulsoup4 |
| RTF | striprtf (fallback: regex) | pip3 install striprtf |
| MOBI / AZW / AZW3 | Calibre ebook-convert (external app, not pip) | https://calibre-ebook.com/download |
| TXT / Markdown / reStructuredText / AsciiDoc | built-in | — |
FAQ
book-to-skill is a Claude Code plugin with 1 hand-picked skill for skill authoring work, indexed on Flowy. Install it with the command on its page. It includes book-to-skill. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it