# book-to-skill: turn a book into a skill (virgiliojr94/book-to-skill) — skill card for AI agents

> AgentGid skill card. Checked on 2026-10-31 against commit a24e62f (version 1.4.0).
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/virgiliojr94/book-to-skill/

> Note: the pack has changed since this check; re-read its files before relying on details.

## Explain it to a non-programmer
You point your AI assistant at a book or a folder of documents you own. It pulls the text out on your computer, then writes a new skill from it: the book's key ideas, a file per chapter, a glossary and a one-page cheat sheet. Later you ask that skill about a topic and the assistant reads the right chapter before it answers.

## Who it is for
- You own technical or business books and forget what is in them a few months later
- You want your assistant to answer from your own copy of a book, or from your team's docs, while you work
- You have a folder of papers, specs or runbooks you keep reopening
- You use Claude Code, GitHub Copilot, Codex, Amp, OpenCode, Hermes Agent or OpenClaw
- Not for: Your PDF is a scan with no text in it: run a text recognition tool on it first
- Not for: You want to search across a large shelf of dozens of books: the author points to search tools for that
- Not for: You want to share skills made from books you bought: the author says to keep those private

## What it is
- Kind: command, scripts
- License: MIT
- Repository: https://github.com/virgiliojr94/book-to-skill

## What it does
- Asks if the source is technical (code, tables, formulas) or mostly prose, and picks the extraction tool from that
- Runs its own Python extractor on your files and writes the plain text and a metadata file to a temporary folder
- Shows the size of the source and an estimate of tokens and time, then waits for your go-ahead
- Asks what the skill is for: apply the author's frameworks, think with their models, or look things up
- Writes one file per chapter, plus glossary.md, patterns.md and cheatsheet.md and an overview SKILL.md under 4,000 tokens
- Scans the new skill for hidden instructions before you load or publish it
- Can fold new documents into a skill it made before, instead of starting over
- Never cuts: Never copy raw book text: always synthesize, summarize, extract signal

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| book-to-skill | /book-to-skill <file, folder or pattern> [skill-name] | no | Turns a book or a folder of documents into a new skill your assistant can read from |

### book-to-skill
- Asks for: One or more files, a folder or a file pattern: PDF, EPUB, DOCX, TXT, Markdown, reStructuredText, AsciiDoc, HTML, RTF, MOBI, AZW
- Asks for: Whether the source is technical or mostly prose
- Asks for: What the skill should help you do: apply frameworks, think with the author's models, look up chapters, or all
- Asks for: A name for the skill, or a pick between two names it proposes
- Gives: SKILL.md: core frameworks and a chapter index
- Gives: chapters/: one summary file per chapter, loaded only when asked
- Gives: glossary.md: every key term, with chapter refs
- Gives: patterns.md: techniques and patterns
- Gives: cheatsheet.md: decision rules and quick-reference tables
- Gives: A report with file sizes and which assistants can see the skill
- Say: "/book-to-skill ~/books/my-book.pdf"

## Know before installing
- The pack ships no book content. Your copy stays your notes: the author says skills made from third-party copyrighted books must stay private, and the MIT license covers the converter, not your books.
- Publishing is opt-in and private by default: it makes a public GitHub copy only when you answer with the bare word public, and only if the source is your own, openly licensed, or you may share it.
- It writes outside your project by default: new skills go to ~/.agents/skills/<name>, and on Claude Code it also makes a link in ~/.claude/skills/. Ask it to save in the project to keep files there.
- It can install Python packages: when a better extractor is missing, the script asks before running pip install; in a session with no keyboard it uses the fallback unless install mode is set to yes.
- Text extraction runs on your machine, but the extracted text then goes to your assistant's model like any prompt.
- Only install from github.com/virgiliojr94/book-to-skill: the author warns about a malicious re-upload under another account that steals wallet data.

## Install (official commands)
- Any Agent Skills host (skills tool): `npx skills add virgiliojr94/book-to-skill` — Installs the whole skill, including scripts/extract.py and tools/, into the hosts you select.
- Claude Code: `git clone https://github.com/virgiliojr94/book-to-skill.git ~/.claude/skills/book-to-skill` — Project-local: clone into .claude/skills/book-to-skill instead. The docs also offer pasting the raw SKILL.md link into a session; the git clone fetches the extractor files too. Remove: `delete the folder ~/.claude/skills/book-to-skill`.
- GitHub Copilot CLI: `git clone https://github.com/virgiliojr94/book-to-skill.git ~/.copilot/skills/book-to-skill` && `/skills reload` Remove: `delete the folder ~/.copilot/skills/book-to-skill`.
- Codex, Amp, OpenCode: `git clone https://github.com/virgiliojr94/book-to-skill.git ~/.agents/skills/book-to-skill` Remove: `delete the folder ~/.agents/skills/book-to-skill`.
- Hermes Agent: `git clone https://github.com/virgiliojr94/book-to-skill.git "${HERMES_HOME:-$HOME/.hermes}/skills/productivity/book-to-skill"` — Start a new Hermes session. Project-local installs need hermes skills trust <project>.
- OpenClaw: `git clone https://github.com/virgiliojr94/book-to-skill.git "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/skills/book-to-skill"` && `openclaw skills list`
- Standalone extractor (pip, no skill): `pip install "book-to-skill[pdf,epub,docx] @ git+https://github.com/virgiliojr94/book-to-skill.git"` — Installs only the text extractor as a command; it does not add /book-to-skill to your assistant.

## What runs on the user's machine
- Code on the machine: yes (each /book-to-skill run (no hooks; nothing runs at install or session start))
- Network: optional
- Install: Markdown instructions plus a Python package. No hooks, nothing runs by itself.
- Each conversion: The assistant finds and runs scripts/extract.py with python3 on your files. It writes full_text.txt and metadata.json to a per-run temp folder (or BOOK_SKILL_WORKDIR) and removes that folder at the end.
- PDF and e-book extraction: Calls local programs when installed: pdftotext and pdfinfo (poppler), Calibre ebook-convert for MOBI/AZW; Python libraries pdf-inspector, pypdf, pdfminer.six, Docling (OCR switched off), ebooklib, python-docx, striprtf, trafilatura.
- A better extractor is missing: Asks, then runs python -m pip install for the missing package (network). With no keyboard it falls back unless BOOK_SKILL_INSTALL_MISSING / --install-missing is yes.
- After generation: Runs tools/scan_generated_skill.py over the new skill to flag hidden instructions; on findings it stops and asks a person.
- Claude Code personal install: Writes the skill to ~/.agents/skills/<name> and creates a link ~/.claude/skills/<name>.
- Optional publish (Step 11): On your yes, runs git init and gh repo create --private --push from the skill folder (network, your GitHub account).

## Settings
- `BOOK_SKILL_WORKDIR`: Exact folder for the extracted text instead of a per-run temp folder
- `BOOK_SKILL_INSTALL_MISSING`: ask | yes | no: whether the extractor may pip-install missing packages (default ask)
- `BOOK_TO_SKILL_SCOPE`: project | personal: where new skills are written
- `PYTHON_BIN`: Python used to run the extractor (default python3)
- `HERMES_HOME`: Hermes Agent profile folder (default ~/.hermes)
- `OPENCLAW_STATE_DIR`: OpenClaw state folder (default ~/.openclaw)

## Examples (from the pack's own files)
- The finished-run report: output format defined in SKILL.md

## Author's numbers (as reported, not run by AgentGid)
- 24x to 51x fewer tokens than dumping the whole book into context to answer one question (tiktoken counts on three books, a ~5,000-token core plus one chapter vs the full text). Source: virgiliojr94/book-to-skill/docs/performance.md
- Docling on a 103-page technical PDF took 164s and kept 48 tables and 36 code blocks; pdftotext took 0.1s and kept none. Source: virgiliojr94/book-to-skill/docs/performance.md

## Steps only the person can do
- Confirm the size, token and time estimate before generation starts (SKILL.md (Step 3)) Then: The agent writes the chapter files, glossary, patterns and cheat sheet
- Answer y or n when the extractor asks to pip-install a missing package (book_to_skill/dependencies.py) Then: The agent extracts with the better tool, or with the built-in fallback
- Run OCR on scanned PDFs yourself (https://ocrmypdf.readthedocs.io) Then: The agent converts the OCR output
- Install the Calibre app for MOBI, AZW or AZW3 files (https://calibre-ebook.com/download) Then: The agent converts e-books through ebook-convert
- Install the gh CLI and sign in with gh auth login, then reply private or public (only to publish) (https://cli.github.com) Then: The agent creates the GitHub repository (private unless the reply is the bare word public) and pushes the skill

## Mistakes to avoid
- Not: In Claude Code, install by pasting only the raw SKILL.md link. Instead: git clone the whole repository into ~/.claude/skills/book-to-skill. Why: The extractor lives in scripts/ and book_to_skill/; the clone fetches those files too
- Not: Install it with pip and expect the /book-to-skill command. Instead: Clone it into a skills folder (or use npx skills add); pip gives only the text extractor. Why: The pip package is the extraction engine alone
- Not: Feed it a scanned or photographed PDF. Instead: Run OCR first (for example ocrmypdf), then convert the OCR output. Why: Page images have no text layer; the extractor stops early instead of making an empty skill
- Not: Publish or share a skill made from a book you bought. Instead: Keep it private; share only skills made from your own writing or openly licensed material. Why: The generated chapters derive from the copyrighted book
- Not: Assume Claude Code sees the new skill because it was written to ~/.agents/skills. Instead: Check the report's Discoverable by line; if the link is missing, create it or relocate the skill. Why: Claude Code finds it only through a symlink in ~/.claude/skills, which some systems cannot create

## What leaves the machine
- The text extracted from your documents, as part of the conversation → Your assistant's model provider, Every conversion, when the assistant's model runs in the cloud. Opt out: Use an assistant with a local model; the extractor itself uploads nothing
- Requests for missing Python extractor packages → The Python package index pip is set to use, Only when a better extractor is missing and you answer y (or install mode is yes). Opt out: Answer n, or set BOOK_SKILL_INSTALL_MISSING=no
- The generated skill folder (SKILL.md, chapters, glossary, patterns, cheat sheet, a README) → A new GitHub repository on your account, Only at the optional publish step, after you say yes. Opt out: Answer skip to the publish offer

## Lines in the pack aimed at agents (ask the person first)
- "If `gh` is missing or unauthenticated, offer to set it up (`brew install gh` or https://cli.github.com, then `gh auth login`)" (SKILL.md): Installing a global CLI and signing in to GitHub are the person's steps; ask first and let them log in themselves
- "do not ask a mandatory scope question merely because both scopes are available" (SKILL.md): The default writes outside the project to ~/.agents/skills; tell the person the destination before writing
- "Install book-to-skill: https://raw.githubusercontent.com/virgiliojr94/book-to-skill/master/SKILL.md" (docs/install.md): This fetches an unpinned file from the master branch; prefer a git clone at a reviewed commit, from the official repository only

## May I use it like this?
- commercial-app: yes (MIT for the converter code; keep the license notice)
- redistribute-files: conditions (The converter's files: MIT with the notice. Skills generated from third-party copyrighted books: keep private, the MIT license does not cover them)
- client-work: yes (MIT allows use in work for others; the client's own documents stay under their terms)

## Which one to pick
- If You want to turn your own books or document folders into new skills: skill:virgiliojr94/book-to-skill
- If You want ready-made skills with frameworks from well-known business, UX and coding books, nothing to convert: skill:wondelai/skills
- If You want to write and test a skill by hand, with a guide that drafts it and compares runs with and without it: skill:anthropics/skills

## Works well with
- tool:ocrmypdf: The README tells you to run OCRmyPDF on scanned PDFs before converting
- tool:docling: The extractor uses Docling for technical PDFs to keep tables and code blocks
- tool:skills: npx skills add installs the whole skill into every host you select
- agent:claude-code: Claude Code runs /book-to-skill and gets a link to each generated skill

## Works in and needs
- Works in Claude Code: skills folder
- Works in GitHub Copilot CLI: skills folder
- Works in Codex: skills folder
- Works in Amp: skills folder
- Works in OpenCode: skills folder
- Works in Hermes Agent: skills folder
- Works in OpenClaw: skills folder
- Works in Any agent with a skills folder: skills CLI
- Needs Python 3.9+: The extractor is a Python script the assistant runs
- Needs Calibre: Only for MOBI
- Needs gh CLI signed in: Only for the optional publish to GitHub

## How to tell it works
Install it, then run /book-to-skill on a text PDF or EPUB you own and answer its two questions. It should show a size and token estimate and wait. After you agree, a new folder with chapters/, glossary.md and cheatsheet.md appears and /<slug> <topic> answers from the right chapter.

## Related
- agentskills/agentskills
- virgiliojr94/book-to-skill-use-cases

## Safety
Install only from github.com/virgiliojr94/book-to-skill (or npx skills add virgiliojr94/book-to-skill): the author reports a malicious re-upload under another account. The skill runs Python on your files and may offer to pip-install extractors; generated skills are scanned for hidden instructions, but that scan is advisory.
