
book-to-skill
github.com/virgiliojr94/book-to-skill- Category
- Developer Tools
- Rank
- No. 711Tools index
- Pricing
- Open Source
- Platform
- cli
- Type
- TOOL
- Builder
- virgiliojr94
- GitHub
- 31.6k stars
- Latest release
- v1.4.0
- Date
About
An open-source tool that converts technical books, docs, or document collections (PDF, EPUB, DOCX, etc.) into a structured Agent Skill for Claude Code, GitHub Copilot CLI, or Amp, generating per-chapter files, a glossary, and a cheatsheet that the agent loads on demand instead of dumping the whole book into context. Its own benchmarks claim 24x-51x fewer tokens than raw-context lookups for answering a single question.
What it does
book-to-skill treats document conversion like compilation. A local Python stage extracts and cleans text, detects structure, and records metadata. An agent then identifies frameworks, rules, examples, and anti-patterns, organizing them into a compact core plus topic-specific material fetched only when relevant.
Why it's ranked here
The design solves a real repeat-use problem with a clear split between deterministic extraction and agent-guided synthesis. It supports mixed source collections, local processing, several agent hosts, and incremental fold-ins. The efficiency case is documented with reproducible tooling, though the discovery comparison is explicitly a model rather than a live agent measurement.
What's good
Format handling degrades sensibly through optional extractors and built-in fallbacks. One failed source does not cancel a batch. Technical mode preserves tables and code that fast PDF extraction flattens. Chapter detection covers several writing systems, and generated material separates core concepts, chapter detail, terms, patterns, and decision aids.
Tradeoffs
The full conversion flow requires installation as an agent skill because the packaged command only extracts text. Scanned PDFs need a separate OCR pass, and text embedded in figures is not extracted. Technical PDF processing is much slower than prose extraction. Chapter detection can miss books whose headings lack recognizable chapter markers.
How to use it well
Use it for a book, standard, documentation set, or focused research cluster that you consult repeatedly while coding or writing. Choose technical extraction when tables and code matter, and fast text extraction for prose. It does not replace OCR, and it is not the best fit for shallow search across dozens of unrelated books.
Technical notes+
pyproject.toml defines a Hatchling package for Python 3.9 or newer, exposes book_to_skill.cli:main, and groups optional dependencies by format. scripts/extract.py remains a compatibility shim that configures UTF-8 streams and delegates to the packaged CLI. book_to_skill/utils.py contains multi-source orchestration, token estimation, multilingual chapter and table-of-contents detection, parser selection, and extraction error handling. book_to_skill/config.py centralizes supported extensions, temporary output locations, dependency names, and token heuristics. tools/discovery_tax.py can use tiktoken or a documented heuristic, reuses the extractor's structural detection, and labels its discovery-loop calculation as a model.
Observed
- License
- MIT
- Primary language
- Python
- Runtime
- Python 3.9 or newer
- Packaging
- Hatchling package with optional dependency groups for EPUB, PDF, DOCX, RTF, and technical extraction
- Interfaces
- Standalone extraction CLI and an Agent Skills workflow
- Agent hosts
- Claude Code, GitHub Copilot CLI, and Amp
- Platforms
- Linux, macOS, and Windows
- Input formats
- PDF, EPUB, DOCX, TXT, Markdown, reStructuredText, AsciiDoc, HTML, RTF, MOBI, AZW, and AZW3
Read from README.md, pyproject.toml, docs/404.md, docs/faq.md, docs/index.md, docs/usage.md, docs/install.md, docs/performance.md, docs/architecture.md, docs/how-it-works.md, scripts/extract.py, book_to_skill/cli.py, book_to_skill/utils.py, tools/discovery_tax.py, book_to_skill/config.py.
What it can do
Extract text from technical books or documents
PDF, EPUB, DOCX, or document collection → Extracted text
Generate a structured Agent Skill file (SKILL.md)
Extracted book/document text → SKILL.md file
Generate per-chapter files
Extracted book/document text → Per-chapter files
Generate a glossary
Extracted book/document text → Glossary file
Generate a cheatsheet/pattern file
Extracted book/document text → Cheatsheet or pattern file
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.