Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

virgiliojr94/book-to-skill

AI Engineering

Convert technical books, docs folders and other prose sources into on-demand agent skills for Claude Code and compatible hosts.

38,344
4,080
Python
MIT
6 months old

What it does

book-to-skill turns a technical book or a folder of structured documents into a host-agent skill: a compact SKILL.md with core mental models and a chapter index, per-chapter Markdown files, a glossary, a patterns file and a cheatsheet. The agent loads the chapter it needs on demand, so a question can be answered from the book's actual content instead of the model guessing.

The README's benchmark claim is that answering a query this way uses 24–51× fewer tokens than putting the whole book in context; the measurement method and per-book tables are in the performance documentation. Inputs are not limited to books: internal runbooks, design-system docs, papers and standards are also supported.

How it works

A deterministic Python extractor converts documents into clean text and metadata; a spec-driven generator then has the host agent build the structured skill. Extraction is local, and no book content ships with the repository. Optional dependencies such as pdftotext, docling, pypdf and ebooklib affect format support and quality; a scanned PDF with no text layer must be OCR'd first (for example with ocrmypdf).

Quick start

  1. Install the skill through the cross-agent CLI:

    npx skills add virgiliojr94/book-to-skill
    

    Alternatively, clone the repository into your host's skills folder, e.g. git clone https://github.com/virgiliojr94/book-to-skill.git ~/.claude/skills/book-to-skill; other paths are listed in the installation guide.

  2. Check which extractors are available:

    python3 scripts/extract.py --check
    
  3. In the host agent, run the converter on a file, folder or glob:

    /book-to-skill ./my-book.pdf
    

    The skill asks whether the source is technical or text-heavy and chooses the extractor accordingly. It writes the generated skill under ~/.agents/skills/<slug>/, with host-specific handling for Claude Code, Hermes Agent, OpenCode and OpenClaw as described in the README.

  4. Query the generated skill by topic, e.g. /my-book-slug replication.

All modes (analyze-only, generate-from-analysis, update/fold-in) are documented in the usage guide.

Constraints

  • The source folder uses ~/.claude/skills/book-to-skill for manual installation, while generated skills normally land in ~/.agents/skills/<slug>/; hosts that do not scan that root need their own paths.
  • Format coverage depends on installed tools: PDF text extraction needs poppler/pypdf/pdfminer or docling; technical PDFs with code, tables and formulas use docling at roughly 1.5 s/page; MOBI/AZW/AZW3 require Calibre's ebook-convert.
  • Scanned/image-only PDFs must be OCR'd before conversion; plain text, Markdown, reStructuredText and AsciiDoc need no extra dependencies.
  • The MIT license covers the converter and skill definition, not the documents processed. Generated skills of copyrighted books should stay private; redistribution may infringe the source rights.
  • Cloud-hosted agents send the extracted text to their model provider under that provider's data terms, even though extraction itself runs locally.

HotRepo's take

Recorded snapshots show sustained rather than one-off attention: the repository gained 1,428 and 1,421 stars on 2026-07-29 and 2026-07-30, and on 2026-11-17 it appeared in the Python daily list at position 10 with 161 stars gained that day. Those are separate snapshot dates and list scopes, not a single cumulative ranking. What stands out relative to the star count is the amount of engineering detail behind the pitch — a modular extractor package, tests, a skill validator and a token-cost measurement tool — which makes the on-demand chapter loading and token claim concrete enough to inspect in the repository rather than take on faith.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

Hacker News

Book-to-skill: Turn a technical book PDF into a Claude Code skill
▲ 3 · 1 comment · June 23, 2026

You might also like

  1. bookleme/booklemeCompiles books into installable Agent Skills with dual engines, genre plugins and verbatim fidelity checks.Python217
  2. agentskills/agentskillsAn open folder-based format for packaging agent instructions, scripts and reference files so skills can be reused across compatible agents.Python26,580
  3. headroomlabs-ai/headroomCompress agent tool outputs, logs, files, and RAG chunks locally before they reach the LLM, cutting input tokens.Python79,529
  4. affaan-m/ECCA shared layer of skills, memory and guardrails that makes coding agents behave consistently across different CLI harnesses.JavaScript287,735
  5. langchain-ai/langgraphLow-level Python framework for building long-running stateful agents with durable execution and human oversight.Python44,895