Converts books and documents into structured agent skills.
Run in your terminal
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionbook-to-skillExecute the skills CLI command in your project's root directory to begin installation:
https://github.com/virgiliojr94/book-to-skill/tree/masterFetches book-to-skill from OWNER/REPO and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate book-to-skill. Access via /book-to-skillin your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
https://github.com/virgiliojr94/book-to-skill/tree/masterWorks with
0
total installs
0
this week
0
upvotes
| 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, or Claude Code, apply an author's frameworks while working, or build a reusable knowledge base from a file." |
Transform written knowledge into actionable agent skills by extracting structure — not producing summaries.
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, or another compatible agent can leverage repeatedly.
Extract structure, not summaries. A skill isn't a book report. It's a toolkit of:
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.
Four paths available. Route based on what the user asks:
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
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
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
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).
Action: Run Step 0 (out-of-scope check), Step 1 (validate inputs), Step 1.5 (identify book type), and Step 2 (extract new files). Then skip to Step 5 (identify/detect existing skill path) and run the Update / Fold-in Workflow to merge the new content into the existing skill files.
Output: Updated existing skill with new/revised chapter summaries and merged indexes/glossaries.
This converter can run from multiple skill systems. When looking for this converter's helper script or writing the generated book skill, prefer these locations in order:
~/.copilot/skills/~/.agents/skills/~/.claude/skills/.github/skills/.claude/skills/.agents/skills/~/.config/agents/skills/~/.config/amp/skills/For generated book skills, pick a destination that the user's host agent can actually discover (see Step 5). When more than one valid root exists, ask the user once and remember the answer for the session — do not silently default.
If no arguments are provided, stop and respond:
"book-to-skill requires a supported document path, folder, or glob pattern. Usage:
book-to-skill <path-to-document-folder-or-glob>... [skill-name-slug]"
Throughout the workflow:
SKILL_NAME.INPUT_PATHS.SKILL.md and a chapters/ sub-folder), or if SKILL_NAME matches an existing skill slug in SKILLS_HOME, flag this run as an Update/Fold-in operation (Mode 4).Verify that there is at least one supported file, directory, or glob pattern among the INPUT_PATHS.
For directories and globs, expand them to find matching supported files (.pdf, .epub, .docx, .txt, .md, .markdown, .rst, .adoc, .html, .htm, .rtf, .mobi, .azw, .azw3).
If no supported files are found, stop with a clear error message.
Before extracting, ask the user:
"What kind of content do these sources have? This helps me choose the best extraction method.
- Technical — has code blocks, tables, formulas, diagrams (e.g. programming books, academic papers, architecture guides)
- Text-heavy — mostly prose, few or no tables/code (e.g. management, productivity, narrative non-fiction)
- Not sure — I'll use the fast method and warn you if quality seems limited"
Store the answer as BOOK_TYPE:
BOOK_TYPE=technicalBOOK_TYPE=textBOOK_TYPE=textIf BOOK_TYPE=technical, inform the user before proceeding:
"📐 Technical mode selected — using Docling for structure-aware extraction (tables, code blocks, formulas preserved as markdown). This takes ~1.5s per page, so expect a few minutes for longer sources. Starting now…"
If BOOK_TYPE=text, inform:
"📄 Text mode selected — using the fastest suitable extractor for each file type. Plain text/Markdown/HTML are usually ready in seconds; PDFs use pdftotext when available."
Run the extraction script, passing the input paths:
SCRIPT_PATH=""
for candidate in \
"$HOME/.copilot/skills/book-to-skill/scripts/extract.py" \
"$HOME/.agents/skills/book-to-skill/scripts/extract.py" \
"$HOME/.claude/skills/book-to-skill/scripts/extract.py" \
".github/skills/book-to-skill/scripts/extract.py" \
".claude/skills/book-to-skill/scripts/extract.py" \
".agents/skills/book-to-skill/scripts/extract.py" \
"$HOME/.config/agents/skills/book-to-skill/scripts/extract.py" \
"$HOME/.config/amp/skills/book-to-skill/scripts/extract.py"
do
if [ -f "$candidate" ]; then
SCRIPT_PATH="$candidate"
break
fi
done
if [ -z "$SCRIPT_PATH" ]; then
echo "Could not find scripts/extract.py for book-to-skill" >&2
exit 1
fi
PYTHON_BIN="${PYTHON_BIN:-python3}"
if ! command -v "$PYTHON_BIN" >/dev/null 2>&1; then
PYTHON_BIN="python"
fi
"$PYTHON_BIN" "$SCRIPT_PATH" $INPUT_PATHS --mode <BOOK_TYPE> --install-missing ask
Before extraction, the script checks optional Python packages needed for the detected format. If a better extractor is missing, it prompts the user with the available fallback. Non-interactive sessions default to fallback unless install mode is explicitly yes.
Tip — preflight the environment: run "$PYTHON_BIN" "$SCRIPT_PATH" --check to print a per-format report of which extractors are installed and the exact command to install whatever is missing, without processing any file. Useful when a user reports a setup or quality problem.
This creates:
<tempdir>/book_skill_work/full_text.txt — combined extracted text of all sources with clear visually demarcated boundaries.<tempdir>/book_skill_work/metadata.json — overall combined size, words, pages, token counts, and a detailed list of individual processed sources.Read <tempdir>/book_skill_work/metadata.json to inspect the results.
Read <tempdir>/book_skill_work/metadata.json and present the user with an estimate before doing any generation:
📖 Sources detected: <total_sources> source(s)
<list each source filename and format from the sources metadata list>
📄 Combined Pages/Sections: ~<N> | Words: ~<N> | Total tokens: ~<N>K
💰 Estimated token cost (Full Conversion / Update):
Input (reading + prompts): ~<N>K tokens
Output (skill files generated/updated): ~<N>K tokens
Total: ~<N>K tokens
Reference prices (as of 2025):
Claude Sonnet 4.5 → ~$<X> USD
Claude Haiku 4.5 → ~$<X> USD
⏱ Estimated time: ~<N> minutes
📁 Files to be generated/updated:
SKILL.md + chapter files + glossary + patterns + cheatsheet
➡ Proceed with Full Conversion / Update? (or type "analyze only" to preview first)
How to estimate:
estimated_tokens from metadata × 1.3 (prompts overhead per chapter pass)BOOK_TYPE (DEPTH is decided later in Step 4 and can raise it): text ≈ 1,000, technical ≈ 1,800. If the user has already indicated reference-only vs deep study, use the matching row of the Step 7 matrix.Wait for the user to confirm before proceeding. If they say "analyze only", switch to Mode 2.
Inspired by the Recursive Language Model (RLM) paradigm: treat full_text.txt as a queryable corpus, not a single read. Loading the whole file into context burns budget you will need later for generation.
For books over ~50k tokens, prefer programmatic probes over Read(full_text.txt) without bounds:
# Size check before any Read
wc -w "$FULL_TEXT_PATH"
# Find chapter offsets without loading the whole file
grep -n -E "^\s*(Chapter|CHAPTER)\s+[0-9]+" "$FULL_TEXT_PATH" | head -40
# Pull only the chapter you need (lines start..end inclusive)
sed -n '<start>,<end>p' "$FULL_TEXT_PATH"
# Verify a framework is actually mentioned before claiming it in SKILL.md
grep -c -i "westrum\|dora" "$FULL_TEXT_PATH"
# Targeted Read with offset/limit avoids dumping the full file
# Read(file_path=full_text.txt, offset=<line>, limit=<lines>)
Use this approach for Step 3 (structure analysis), Step 7 (per-chapter summaries), and Step 8 (glossary / patterns extraction). On books under 50k tokens, a single Read is fine.
Why this matters: a 200-page book is ~75k tokens. Re-reading it once per chapter (28 passes) costs ~2M input tokens; using grep + sed to pull only relevant slices keeps generation cost proportional to the output, not the source.
Read the first 8,000 characters of the extracted full_text.txt to identify:
Then read the Table of Contents section if present to map all chapters.
If mode is "Analyze Only": produce the extraction report now and stop. Structure:
## Extraction Report — <Title>
### Author's Core Frameworks
- **<Framework Name>**: <what it is and when to apply>
### Key Principles
- <Principle>: <actionable rule>
### Techniques & Methods
- <Technique>: <step-by-step or how-to>
### Anti-patterns
- <What to avoid>: <why>
### Suggested Skill Name
`{author-lastname}-{core-concept}` — e.g. `cialdini-influence`
### Chapters Detected
| # | Title | Main Frameworks |
Before generating, ask the user:
"What should this skill help you do? (Pick one or more)
- Apply the author's frameworks while working
- Think with the author's mental models
- Reference specific chapters and concepts
- All of the above"
Use the answer to weight what gets highlighted in the SKILL.md Core section.
Derive DEPTH from the answer (no extra prompt):
DEPTH=reference — lean, fast-lookup chapters.DEPTH=study — deeper chapters with more worked detail, examples, and reasoning.DEPTH and BOOK_TYPE together set the per-chapter token budget in Step 7. Do not ask a separate "study vs reference" question — it is inferred here. (In Modes 2/3, where Step 4 is skipped, default DEPTH=study.)
If SKILL_NAME was provided, use it as the skill slug.
Otherwise, propose two options and let the user choose:
{author-lastname}-{core-concept} (e.g. cialdini-influence, meadows-systems)designing-data-intensive-apps)Default to author-concept format if the book has a strong methodological identity.
Choose the destination skill root (SKILLS_HOME). Probe the user's filesystem for existing skill homes and pick by the host the user is running in:
| Host agent | Personal skill root (probe in order) | Project-local root |
|---|---|---|
| GitHub Copilot CLI | ~/.copilot/skills → ~/.agents/skills | .github/skills → .claude/skills → .agents/skills |
| Amp | ~/.agents/skills → ~/.config/agents/skills → ~/.config/amp/skills | .agents/skills |
| Claude Code | ~/.claude/skills | .claude/skills |
Selection rules:
Set SKILLS_HOME to the selected root and check if $SKILLS_HOME/<skill_name>/ already exists.
If it does, prompt the user to choose:
-2 or use a different custom slug.If the user selects Update / Fold-in, proceed immediately to the Update / Fold-in Workflow section after Step 2.5 (skipping Steps 3, 4, 6, 7, 8, 9).
mkdir -p "$SKILLS_HOME/<skill_name>/chapters"
TOKEN BUDGET RULE — CRITICAL (adaptive):
The per-chapter budget scales with BOOK_TYPE and DEPTH. Technical chapters need room for code and tables; study depth needs room for worked reasoning. Pick the budget from this matrix:
DEPTH=reference | DEPTH=study | |
|---|---|---|
BOOK_TYPE=text | 800–1,200 tokens | 1,000–1,800 tokens |
BOOK_TYPE=technical | 1,200–1,800 tokens | 2,000–3,000 tokens |
DEPTH=study is earned with content, not a bigger number. The standard section template (Core Idea → Connects To) naturally lands a dense prose chapter around 700–900 tokens. To reach the study budget honestly — not by padding — a study-depth chapter must add concrete material:
## Worked Example section. This is the single biggest lever and the main thing a learner returns for.If a chapter genuinely has no worked example and resists expansion, let it land below the study floor rather than padding — and note that the chapter is thin in its Core Idea. A reference-depth chapter, by contrast, deliberately omits worked examples and keeps only the decision-ready essentials.
For EACH chapter/major section identified in Step 3:
Read the corresponding section of the extracted full_text.txt (use character offsets or grep for chapter headings).
Create $SKILLS_HOME/<skill_name>/chapters/ch<NN>-<slug>.md using the structure below.
Adapt emphasis based on BOOK_TYPE:
technical → prioritize "Code Examples", "Reference Tables", and "Commands & APIs" sections; preserve exact syntaxtext → prioritize "Frameworks Introduced", "Mental Models", and "Key Takeaways"; skip empty technical sections# Chapter N: <Full Title>
## Core Idea
<1–2 sentences: the single most important thing this chapter teaches>
## Frameworks Introduced
- **<Framework Name>**: <exact formulation — preserve the author's naming>
- When to use: <specific situation>
- How: <steps or criteria>
## Key Concepts
- **<Term>**: <precise definition in 1 sentence>
(5–10 most important terms from this chapter)
## Mental Models
<2–4 frameworks or thinking tools. Write as "Use X when Y" or "Think of X as Y">
## Anti-patterns
- **<What to avoid>**: <why it fails>
## Code Examples *(technical books only — omit if BOOK_TYPE=text)*
<!-- Copy the most instructive snippet from the chapter. Preserve indentation exactly. -->
```<language>
<key code example from this chapter>
(3–7 takeaways a practitioner must remember)
---
## Step 8 — Generate supporting files
### glossary.md
Create `$SKILLS_HOME/<skill_name>/glossary.md`:
- Every significant term from the book, alphabetically sorted
- Format: `**Term** — definition (Ch N)`
- Max 1,500 tokens
### patterns.md
Create `$SKILLS_HOME/<skill_name>/patterns.md`:
- All concrete techniques, design patterns, algorithms from the book
- Format: `## Pattern Name\n**When to use**: ...\n**How**: ...\n**Trade-offs**: ...`
- Max 2,000 tokens
### cheatsheet.md
Create `$SKILLS_HOME/<skill_name>/cheatsheet.md`:
**This is the most differentiated layer of the skill — treat it as a reasoning aid, not a keyword list.** Anyone can grep the glossary for a term. The cheatsheet captures the author's *judgment*: the decisions they'd make and why. It's the file that turns "I know the words" into "I'd act the way the author would".
Prioritize, in order:
1. **Decision rules** — "When X, do Y, because Z." The if/then logic the author applies, stated so the reader can apply it without re-reading the book.
2. **Decision trees / flowcharts** (as nested bullets or a small table) — for choices with more than two branches.
3. **Trade-off matrices** — competing options scored on the dimensions the author cares about, so the reader can pick under their own constraints.
4. **Thresholds & defaults** — the specific numbers, ratios, or rules of thumb the author commits to (e.g. "keep functions under ~20 lines", "alert when error budget < 10%").
5. **Tells & smells** — fast heuristics for recognizing a situation ("if you see X, you're probably in trouble Y").
Avoid: bare term→definition rows (that's the glossary), and prose paragraphs (that's the chapters). Every line should help the reader *decide* something.
- Format mostly as compact tables and decision rules; the content you'd want on a single printed page kept beside you while working.
- Max 1,200 tokens.
---
## Step 9 — Generate the master SKILL.md
**CRITICAL TOKEN BUDGET: Keep SKILL.md body under 4,000 tokens.**
Compaction truncates from the END — put the most important content FIRST.
Create `$SKILLS_HOME/<skill_name>/SKILL.md`:
```markdown
---
name: <skill_name>
description: "Knowledge base from \"<Full Title>\" by <Author(s)>. Use when applying <author>'s frameworks for <key topics, 3–6 terms>, studying the book, or referencing its concepts."
---
<!-- argument-hint: [topic, framework name, or chapter number] -->
# <Full Title>
**Author**: <Author(s)> | **Pages**: ~<N> | **Chapters**: <N> | **Generated**: <YYYY-MM-DD>
## How to Use This Skill
- **Without arguments** — load core frameworks for reference
- **With a topic** — ask about `replication`, `pricing`, or another indexed topic; I find and read the relevant chapter
- **With chapter** — ask for `ch05`; I load that specific chapter
- **Browse** — ask "what chapters do you have?" to see the full index
When you ask about a topic not covered in Core Frameworks below, I will read
the relevant chapter file before answering.
---
## Core Frameworks & Mental Models
<!-- ~2,000 tokens: the author's most important named frameworks and principles.
Preserve exact names. Write as "Use X when Y", "Prefer X over Y because Z".
This is a toolkit, not a summary. -->
<generate 2,000 tokens of the most critical frameworks and insights here>
---
## Chapter Index
| # | Title | Key Frameworks |
|---|-------|----------------|
| [ch01](chapters/ch01-<slug>.md) | <Title> | <framework1>, <framework2> |
| [ch02](chapters/ch02-<slug>.md) | <Title> | <framework1>, <framework2> |
...
## Topic Index
<!-- Alphabetical. Major terms/frameworks → chapter(s) that cover them. -->
- **<Term>** → ch<N>[, ch<N>]
- **<Term>** → ch<N>
## Supporting Files
- [glossary.md](glossary.md) — all key terms with definitions
- [patterns.md](patterns.md) — all techniques and design patterns
- [cheatsheet.md](cheatsheet.md) — quick reference tables and decision guides
---
## Scope & Limits
This skill covers the book content only. For hands-on implementation in your codebase,
combine with project-specific tools. For topics beyond this book, check related skills
or ask the agent directly.
Before reporting success, loading
Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
JuliusBrussee/caveman
JuliusBrussee/caveman
whyashthakker/agent-skills-marketing
kimyx0207/findskill
vercel-labs/skills
JuliusBrussee/caveman
book-to-skill is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
We added book-to-skill from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Keeps context tight: book-to-skill is the kind of skill you can hand to a new teammate without a long onboarding doc.
Solid pick for teams standardizing on skills: book-to-skill is focused, and the summary matches what you get after install.
book-to-skill has been reliable in day-to-day use. Documentation quality is above average for community skills.
book-to-skill has been reliable in day-to-day use. Documentation quality is above average for community skills.
Solid pick for teams standardizing on skills: book-to-skill is focused, and the summary matches what you get after install.
Registry listing for book-to-skill matched our evaluation — installs cleanly and behaves as described in the markdown.
We added book-to-skill from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
book-to-skill reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 34