book-to-skill

Turns a technical book or a folder of documents into a structured skill with chapters, a glossary and a cheatsheet

SkillMedium risk

virgiliojr94/book-to-skill

Install

npx skills add virgiliojr94/book-to-skill

Install for any host.

This is third-party code. Review the repository files before installing.

What it does

The /book-to-skill command takes a file, folder or glob (PDF, EPUB, DOCX, HTML, Markdown, RTF, MOBI) and builds a skill: SKILL.md with core mental models and a chapter index, per-chapter files, a glossary, patterns and a cheatsheet. Chapters load on demand, so the skill stays small in context. A local Python extractor pulls the text, and the agent generates the structure following the spec in SKILL.md. Beyond books it works for internal docs, brand books, paper collections and specs.

Who it is for. Developers, technical writers and teachers who repeatedly consult the same books or documents.

Good fit when

  • You want to consult a technical book you own while working with the agent
  • You need to fold a docs folder into a single skill
  • You are building study material from papers and notes

Not a fit when

  • You want to share a skill built from a book you do not have rights to
  • A scanned PDF with no text layer and no prior OCR

Example request

/book-to-skill ./designing-data-intensive-applications.pdf

Limitations

PDFs need pdftotext, pypdf, pdfminer.six or docling; MOBI needs the external Calibre app. Scanned PDFs require OCR first, for example ocrmypdf. The text is sent to your agent's model, so a cloud model's data terms apply. The author asks you not to publish skills built from third-party books.

How to disable. Remove the book-to-skill folder from your skills directory. Generated skills live in ~/.agents/skills/<slug>/ and are removed separately.

Security check

  • Runs a local Python extractor and may suggest installing dependencies
  • Can publish a generated skill to GitHub on request

README in short

book-to-skill converts books and documents into Agent Skills for GitHub Copilot CLI, Amp, Claude Code and Hermes Agent. Output goes to ~/.agents/skills, with a verified symlink for Claude Code. The README explains the token savings, lists formats and extractors, and describes analyze, generate and fold-in modes. A copyright section notes the tool ships no book content and never copies raw passages. MIT licensed, with a Russian README.

SKILL.md

---
name: book-to-skill
description: "Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent skills, extracting frameworks, mental models, principles, techniques, and anti-patterns. Use when the user wants to study a document through GitHub Copilot CLI, Amp, Claude Code, or Hermes Agent, apply an author's frameworks while working, or build a reusable knowledge base from a file."
---

<!--
Cross-agent notes (informational; ignored by host agents):
  - Compatible skill roots: GitHub Copilot CLI (~/.copilot/skills, ~/.agents/skills,
    .github/skills, .claude/skills, .agents/skills), Amp (.agents/skills,
    ~/.config/agents/skills, ~/.config/amp/skills), Claude Code (~/.claude/skills),
    Hermes Agent ($HERMES_HOME/skills, .hermes/skills, .agents/skills).
  - `allowed-tools` is intentionally omitted to stay agent-neutral: Copilot CLI uses
    `shell`/MCP-server names, Claude uses `Bash`/`Read`/`Write`/`Glob`/`Grep`, Amp
    adds `shell_command`. The skill needs shell (to run extract.py) and file
    read/write — each host will prompt for those on first use.
  - Argument hint: <path-to-document-folder-or-glob>... [skill-name-slug]
-->

# Book-to-Skill Converter

Transform written knowledge into actionable agent skills by extracting structure — not producing summaries.

## Philosophy

Books contain crystallized expertise: frameworks, principles, and techniques that took years to develop. This skill extracts that knowledge into a format GitHub Copilot CLI, Amp, Claude Code, Hermes Agent, or another compatible agent can leverage repeatedly.

**Extract structure, not summaries.** A skill isn't a book report. It's a toolkit of:
- Named frameworks (mental models with clear application)
- Actionable principles (rules that guide decisions)
- Techniques (step-by-step methods)
- Anti-patterns (what to avoid and why)
- Voice calibration (how the author thinks and communicates)

**Preserve the author's precision.** Frameworks often have specific names for reasons. "The 5 Whys" isn't interchangeable with "ask why multiple times." Capture the exact formulation.

**Layer depth appropriately.** Simple books → simple skills. Complex books with 10+ frameworks → skills with reference files and on-demand chapters.

---

## Modes of Operation

Four paths available. Route based on what the user asks:

### 1. Full Conversion (Default)
**Trigger:** User provides one or more document/directory/glob paths without special instructions
**Action:** Run all steps below (Steps 0–9)
**Output:** Complete skill with SKILL.md, chapters/, glossary, patterns, cheatsheet

### 2. Analyze Only
**Trigger:** User says "analyze", "just extract", or "I want to review before generating"
**Action:** Run Steps 0–3, then produce a structured extraction report (frameworks, principles, techniques found). Stop — do NOT generate skill files.
**Output:** Analysis report for user review

### 3. Generate from Prior Analysis
**Trigger:** User has existing analysis notes or previously ran analyze-only
**Action:** Skip Steps 0–3, use the provided analysis as input, run Steps 4–9
**Output:** Skill files from the provided analysis

### 4. Update / Fold-in (Existing Skill)
**Trigger:** User provides one or more new source paths and indicates they want to update an existing skill (either by pointing to the existing skill folder, providing a skill slug that already exists in `SKILLS_HOME`, or explicitly requesting an update).

FAQ

Does it upload my files anywhere?

No, extraction and analysis run locally. Only your agent's model receives the text.

How many tokens does it save?

The author measured 24x to 51x fewer tokens on real books than dumping the whole book into context to answer one question.

Editors’ pick

Anthropic's official skill examples: docx, pdf, pptx and xlsx documents, design, MCP builder and the Agent Skills spec

SkillMedium risk176.3K

Claude Code skills for the academic pipeline: research, paper drafting, peer review and citation checks

SkillMedium risk48K

A skill for editable draw.io diagrams from text, code, Terraform, Kubernetes, SQL and OpenAPI, with export and self-checks

SkillMedium risk9.3K

NotebookLM skill for Claude Code

NotebookLM Claude Code Skill

Lets Claude Code query your Google NotebookLM notebooks and get answers grounded only in your uploaded documents

SkillHigh risk7.8K