Agent skill

Book To Skill

by alirezarezvani in alirezarezvani/claude-skills

Converts books, documentation folders, and source collections (PDF, EPUB, DOCX, HTML, Markdown, RST, AsciiDoc, RTF, MOBI/AZW) into structured agent skills — extracting named frameworks, principles…

MITAuto-check passedDocuments & Office

Install Book To Skill

skills CLI
$ npx skills add alirezarezvani/claude-skills --skill book-to-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alirezarezvani/claude-skills book-to-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/book-to-skill/skills/book-to-skill .claude/skills/book-to-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
book-to-skill
GitHub stars
28k
Token cost
~2.9k tokens
SKILL.md length
1,260 words
Files
28 (incl. scripts, references, assets)
Skills in repo
342
Repo updated
First seen
Licence
MIT

At a glance

Converts books, documentation folders, and source collections (PDF, EPUB, DOCX, HTML, Markdown, RST, AsciiDoc, RTF, MOBI/AZW) into structured agent skills — extracting named frameworks, principles…

  • Works in 7 steps: Never convert a source the user cannot… → Pre-flight the cost before generating… → Never dump a large source into context.… → …
  • The user wants to study a document with an agent
  • SKILL.md covers Philosophy, Modes, Hard rules and Pipeline, plus 5 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Book To Skill is an agent skill from alirezarezvani/claude-skills. Converts books, documentation folders, and source collections (PDF, EPUB, DOCX, HTML, Markdown, RST, AsciiDoc, RTF, MOBI/AZW) into structured agent skills — extracting named frameworks, principles, techniques, and anti-patterns into a master SKILL.md plus on-demand chapter files, a glossary, a patterns file, and a decision cheatsheet. Use when the user wants to study a document with an agent, apply an author's frameworks while working, turn internal docs or standards into a reusable knowledge base, or package a…

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 32 other files, including scripts, reference files and assets (for example `assets/chapter_template.md`, `assets/cheatsheet_template.md` and `assets/master_skill_template.md`).

It sits in Documents & Office, covering Word documents and Knowledge bases. It works with Microsoft Word. The repository describes itself as: 380 Claude Code skills & agent skills & plugins (30+ Agents, 70+ custom commands, 380+ skills, customizable references, scripts)for Claude Code, Codex, Gemini CLI, Cursor, and 8… The licence is MIT.

When your agent uses it

  • The user wants to study a document with an agent
  • Apply an authors frameworks while working
  • Turn internal docs
  • Standards into a reusable knowledge base

Example prompts

  • “Use the book-to-skill skill to convert books, documentation folders, and source collections (PDF, EPUB, DOCX, HTML, Markdown, RST, AsciiDoc, RTF…”
  • “/book-to-skill”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Never convert a source the user cannot show you. No web-scraping a book, no
  2. Pre-flight the cost before generating (Step 2.5). Generation is the expensive part;
  3. Never dump a large source into context. Over ~50k tokens, probe with grep/sed
  4. Validate before anyone loads it (Step 9.5). A generated skill is untrusted text that
  5. Never widen the generated skill's authority. Generated frontmatter carries name and
  6. Rights before redistribution. Compiled notes from a copyrighted work are personal
  7. State what the skill does not cover. Every compiled skill's Scope section names its

What it can do on your machine

Read from SKILL.md and the folder at commit 19392f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 7 files in scripts/ (Python, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Book To Skill loads about 2.9k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 144 tokens; SKILL.md has 1,260 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~144
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~16k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from alirezarezvani/claude-skills at commit 19392f7, republished under its MIT licence (© alirezarezvani). 1,260 words, ~2,925 tokens.

Download SKILL.mdSave it as .claude/skills/book-to-skill/SKILL.md (or your agent's skills folder). This skill also uses 27 other files; get the full folder from GitHub.
name
book-to-skill
description
Converts books, documentation folders, and source collections (PDF, EPUB, DOCX, HTML, Markdown, RST, AsciiDoc, RTF, MOBI/AZW) into structured agent skills — extracting named frameworks, principles, techniques, and anti-patterns into a master SKILL.md plus on-demand chapter files, a glossary, a patterns file, and a decision cheatsheet. Use when the user wants to study a document with an agent, apply an author's frameworks while working, turn internal docs or standards into a reusable knowledge base, or package a compiled book skill as a claude-skills plugin.
license
MIT
metadata.version
1.0.0
metadata.author
Alireza Rezvani
metadata.category
engineering
metadata.updated
2026-08-05

Book-to-Skill Converter

Turn written knowledge into an agent skill by extracting structure, not summaries.

A book is crystallized expertise: frameworks, principles, techniques that took years to develop. Read once, forgotten. The workarounds all fail — PDF search returns page numbers instead of answers, an agent handed the raw file hallucinates or drowns, reading notes rot. This skill compiles a source into a knowledge base the agent loads on demand: a small resident core, one chapter file at a time, and never the whole book again.

What it produces:

FileContentsBudget
SKILL.mdCore frameworks + chapter index + topic index< 4,000 tokens (resident)
chapters/chNN-*.mdOne summary per chapter800–3,000 tokens, on demand
glossary.mdEvery significant term, alphabetized, with chapter< 1,500 tokens
patterns.mdTechniques and design patterns with trade-offs< 2,000 tokens
cheatsheet.mdDecision rules, thresholds, trade-off matrices< 1,200 tokens

Beyond books: anything referenced often enough to be worth memorizing — internal documentation, brand systems, standards, specs, research clusters, a folder of RFCs.


Philosophy

Extract structure, not summaries. A skill is not a book report. It is a toolkit of named frameworks, actionable principles, step-by-step techniques, anti-patterns, and the author's voice.

Preserve the author's precision. Framework names are interfaces. "The 5 Whys" is not interchangeable with "ask why a few times" — the exact formulation is what makes lookup work.

Layer depth appropriately. A thin book gets a thin skill. A book with fifteen frameworks gets chapter files and a real topic index.

Never reproduce the source at length. These are structured notes. Synthesize, compress, name — do not copy passages. See references/rights_and_provenance.md.


Modes

ModeTriggerRuns
1. Full conversion (default)One or more paths, no special instructionSteps 0–10
2. Analyze only"analyze", "just extract", "let me review first"Steps 0–3, then stop with an extraction report
3. Generate from analysisUser supplies prior analysis notesSteps 4–10
4. Update / fold-inNew sources + an existing compiled skillSteps 0–2, then the Update Workflow
5. Package as plugin"make it a plugin", "add it to the repo"Step 11

Mode 5 is this repository's addition. Upstream stops at a bare folder in a personal skills home; Step 11 wraps that folder in a plugin package other skills and agents can route to.


Hard rules

  1. Never convert a source the user cannot show you. No web-scraping a book, no reconstructing a title from memory. This tool converts files that are already on disk.
  2. Pre-flight the cost before generating (Step 2.5). Generation is the expensive part; the user approves it with numbers in front of them.
  3. Never dump a large source into context. Over ~50k tokens, probe with grep/sed and bounded reads (Step 2.6). Re-reading a 200-page book once per chapter costs more than everything else in this workflow combined.
  4. Validate before anyone loads it (Step 9.5). A generated skill is untrusted text that an agent will later read as instructions.
  5. Never widen the generated skill's authority. Generated frontmatter carries name and description only — no allowed-tools, no model-invocation flags.
  6. Rights before redistribution. Compiled notes from a copyrighted work are personal study notes. Packaging one as a shareable plugin requires a stated basis (Step 11).
  7. State what the skill does not cover. Every compiled skill's Scope section names its boundary, so the agent says "the source doesn't cover this" instead of improvising.

Pipeline

extract_document.py  →  analyze  →  chapter files  →  supporting files  →  SKILL.md
      (Step 2)          (Step 3)      (Step 7)          (Step 8)          (Step 9)
                                                                              ↓
                                       skill_plugin_emitter.py  ←  book_skill_validator.py
                                              (Step 11)                  (Step 9.5)

All four tools live in scripts/ and run on the standard library alone.


Run it

bash
SKILL_ROOT=engineering/book-to-skill/skills/book-to-skill
SKILLS_HOME=~/.claude/skills        # Step 5 picks this; see the workflow reference
WORKDIR=$(mktemp -d)                # or omit --workdir and capture the path it prints
SLUG=<author-lastname>-<concept>

# 1. extract → $WORKDIR/full_text.txt + metadata.json
#    --mode technical when tables, code or formulas carry meaning
python3 "$SKILL_ROOT/scripts/extract_document.py" <paths> --mode text --workdir "$WORKDIR"

# 2. pre-flight: is this worth converting at all? Wait for approval before generating.
python3 "$SKILL_ROOT/scripts/token_budget_estimator.py" --full-text "$WORKDIR/full_text.txt"

# 3. generate — the agent's work: chapters/, glossary, patterns, cheatsheet, SKILL.md

# 4. gate — errors block. Fix and re-run; never rewrite around a finding.
python3 "$SKILL_ROOT/scripts/book_skill_validator.py" "$SKILLS_HOME/$SLUG"
python3 "$SKILL_ROOT/scripts/token_budget_estimator.py" --skill-dir "$SKILLS_HOME/$SLUG"

# 5. optional: wrap as a claude-skills plugin so the library can route to it
python3 "$SKILL_ROOT/scripts/skill_plugin_emitter.py" --skill-dir "$SKILLS_HOME/$SLUG" \
    --dest ./engineering --source-note "<Title> by <Author>" --dry-run

Every path above is a real variable, not a placeholder: run the block as written (with <paths> and $SLUG filled in) and it works end to end. Without --workdir the extractor creates a private temp directory and prints it — capture that instead.

extract_document.py --check reports which extractors are installed and prints the install command for what is missing. Every tool supports --help, --sample and --output json.

The full step-by-step procedure — what to ask at each step, the file templates, the per-chapter budget matrix, and the update/fold-in workflow — is in references/conversion_workflow.md. Read it before running a conversion. Summary of the eleven steps:

StepDoes
0–1Scope check; resolve paths; detect an update/fold-in against an existing skill
1.5Ask content type → BOOK_TYPE (technical vs. text), which picks the extractor
2Extract → full_text.txt + metadata.json
2.5Pre-flight cost estimate and worth-converting verdict — wait for approval
2.6Over ~50k tokens, probe with grep/sed instead of reading the source
3Analyze structure (title, author, chapters, themes). Mode 2 stops here.
4Ask purpose → DEPTH (reference vs. study). Never ask a second budget question.
5Skill name and destination root; offer update / overwrite / rename on a collision
6–8Create the structure; write chapter files; write glossary, patterns, cheatsheet
9Write the master SKILL.md — under 4,000 tokens, indexes intact
9.5Validate. Errors block.
10Clean up the workdir and report
11Optionally package as a plugin, behind the rights gate
Show full SKILL.md (464 more words)Show less

Validator findings worth knowing

RuleMeans
index.dead_linkThe chapter index links a file that was never written
index.topic_danglingA topic points at a chapter that does not exist
budget.over_cap on SKILL.mdCompaction will truncate the indexes — navigation is the first thing lost
unicode.invisibleExtraction should have stripped this; investigate the source
frontmatter.allowed_toolsThe generated skill is trying to grant itself tool authority

Safety-family warnings are deliberately broad — a source about prompt injection legitimately trips them. Read each in context; do not auto-silence them.

Forcing-question library

Walk these one at a time, with a recommended answer, before running a conversion.

  1. "Is this source worth converting, or should I just read it?" Recommended: convert when it is > 3× the compiled skill's size and you will return to it. One-shot reads are cheaper unconverted. (Step 2.5 verdict.)

  2. "Reference or study?" Recommended: reference, unless you intend to internalize the author's reasoning. Study depth roughly doubles generation cost and is only worth it with real worked examples. (Step 4.)

  3. "Technical or text?" Recommended: technical only when tables, code, or formulas carry meaning. Docling costs ~1.5s/page; picking it for a prose book buys nothing. (Step 1.5.)

  4. "What will you actually ask this skill?" Recommended: name three real questions before generating. They tell you what belongs in Core Frameworks and what the topic index must resolve. A skill nobody queries is a summary nobody reads.

  5. "Do you have the right to redistribute this?" Recommended: assume not. Keep it local unless the source is public-domain, openly licensed, your organisation's own documentation, or you have written permission. (Step 11 rights gate.)

  6. "Does this belong beside an existing skill?" Recommended: check for an existing compiled skill on the same subject first — folding new sources into one skill (Mode 4) beats two skills that half-cover a topic and give the agent no way to choose. (Step 0.)


References

  • references/conversion_workflow.md — the full procedure: Steps 0–11, the file templates, the per-chapter budget matrix, and the update/fold-in workflow
  • references/knowledge_extraction_canon.md — why structure beats summary; the extraction taxonomy; what makes a framework survive compression
  • references/progressive_disclosure_budgets.md — where the token budgets come from and what breaks when they are exceeded
  • references/document_extraction_pipeline.md — per-format extractor chains, fallbacks, and the failure modes that produce silently bad text
  • references/rights_and_provenance.md — copyright posture, the rights gate, and what provenance a compiled skill must carry
  • engineering/write-a-skill — authoring a skill from your own expertise. Use that when the knowledge is in your head; use this when it is in a document.
  • engineering/skill-security-auditor — full security audit of a skill package. Step 9.5 is the converter's own gate; the auditor is the repo-wide one.
  • engineering/llm-wiki — an incrementally-grown, interlinked vault across many sources. This skill compiles one bounded source set into one skill.

Adapted from virgiliojr94/book-to-skill (MIT). See ../../README.md for the full list of deviations.

© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 27 other files (scripts, references, assets) in engineering/book-to-skill/skills/book-to-skill of alirezarezvani/claude-skills.

  • SKILL.md
  • assets/chapter_template.md
  • assets/cheatsheet_template.md
  • assets/master_skill_template.md
  • references/conversion_workflow.md
  • references/document_extraction_pipeline.md
  • references/knowledge_extraction_canon.md
  • references/progressive_disclosure_budgets.md
  • references/rights_and_provenance.md
  • scripts/book_skill_validator.py
  • scripts/book_to_skill/__init__.py
  • scripts/book_to_skill/config.py
  • scripts/book_to_skill/dependencies.py
  • scripts/book_to_skill/exceptions.py
  • scripts/book_to_skill/parsers/__init__.py
  • scripts/book_to_skill/parsers/calibre.py
  • … and 12 more

Open the folder on GitHubat commit 19392f7

Compare with similar skills

Book To Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Book To Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Book To Skill this skillalirezarezvani/claude-skills28k—~2.9kAutomated safety check: PassMIT
Mineru Document Exploreropendatalab/MinerU-Document-Explorer638—~6.2kAutomated safety check: NotesMIT
Knowledge Ingestevolution-foundation/evo-nexus545—~922Automated safety check: PassCustom licence
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
DOCXrvdbreemen/OTGW-firmware20733 repos~4.3kAutomated safety check: PassProprietary
Word Document Reader and WriterHKUDS/DeepTutor41k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Mineru Document Explorer

    opendatalab/MinerU-Document-Explorer

    MinerU Document Explorer — Agent-native knowledge engine. An agent skill from opendatalab/MinerU-Document-Explorer.

    638 GitHub stars~6.2k tokensUpdated 5 mo ago
    Documents & OfficeAuto-check: notes
  • Knowledge Ingest

    evolution-foundation/evo-nexus

    Upload a file (PDF, DOCX, PPTX, XLSX, HTML, EPUB, image) or URL to the Knowledge base.

    545 GitHub stars~922 tokensUpdated 4 mo ago
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • DOCX

    rvdbreemen/OTGW-firmware

    A skill your agent uses whenever the user wants to create, read, edit, or manipulate Word documents (.docx files).

    207 GitHub starsUsed in 33 repos~4.3k tokens
    Documents & OfficeAuto-check passed
  • Reads, creates and edits Word .docx files with python-docx, and drops to raw OOXML for tracked changes, comments and byte-exact edits.

    41k GitHub stars~2.5k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    4k GitHub stars~2.2k tokensUpdated yesterday
    Documents & OfficeAuto-check passed

More from alirezarezvani/claude-skills

All 342 skills in this repo
  • Agile Product Owner

    alirezarezvani/claude-skills

    Writes INVEST-checked user stories with acceptance criteria, splits epics, plans sprints from velocity and ranks the backlog with a weighted score.

    28k GitHub starsUsed in 3 repos~3.2k tokens
    Auto-check passed
  • Product Strategist

    alirezarezvani/claude-skills

    OKR cascade toolkit for product leaders: generates aligned company-to-team OKRs from five strategy types and scores how well they line up.

    28k GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • App Store Optimization

    alirezarezvani/claude-skills

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store.

    28k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • AWS Solution Architect

    alirezarezvani/claude-skills

    Design AWS architectures for startups using serverless patterns and IaC templates.

    28k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Campaign Analytics

    alirezarezvani/claude-skills

    Calculates attribution, funnel and ROI figures for marketing campaigns with three Python scripts that need only the standard library.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Code to PRD

    alirezarezvani/claude-skills

    Reverse-engineers a frontend, backend or fullstack codebase into a product requirements document with per-page docs, an enum dictionary and an API inventory.

    28k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed

Works with

Questions about Book To Skill

What does Book To Skill do?

Converts books, documentation folders, and source collections (PDF, EPUB, DOCX, HTML, Markdown, RST, AsciiDoc, RTF, MOBI/AZW) into structured agent skills — extracting named frameworks, principles…. Book To Skill is an agent skill from alirezarezvani/claude-skills.md plus on-demand chapter files, a glossary, a patterns file, and a decision cheatsheet.

When should I use Book To Skill?

Book To Skill fits situations like: the user wants to study a document with an agent; apply an authors frameworks while working; turn internal docs; standards into a reusable knowledge base.

How do I install Book To Skill in Claude Code?

Run `npx skills add alirezarezvani/claude-skills --skill book-to-skill -a claude-code`. Or copy the skill folder (engineering/book-to-skill/skills/book-to-skill in alirezarezvani/claude-skills) into .claude/skills/book-to-skill in your project. Claude Code loads it when a task matches its description.

How do I install Book To Skill in Codex?

Run `npx skills add alirezarezvani/claude-skills --skill book-to-skill -a codex`. Or copy the skill folder (engineering/book-to-skill/skills/book-to-skill in alirezarezvani/claude-skills) into .agents/skills/book-to-skill in your project. Codex loads it when a task matches its description.

Can I use Book To Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-skills --skill book-to-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/book-to-skill, .gemini/skills/book-to-skill, .github/skills/book-to-skill and .opencode/skills/book-to-skill in your project.

What does Book To Skill need to run?

Going by SKILL.md and its folder, Book To Skill needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Book To Skill access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Book To Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Book To Skill use?

Book To Skill is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Book To Skill use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Book To Skill?

Skills that share tags, products or a category with Book To Skill: Mineru Document Explorer (opendatalab/MinerU-Document-Explorer, 638 stars), Knowledge Ingest (evolution-foundation/evo-nexus, 545 stars), Markitdown (ImCa0/just-laws, 781 stars) and DOCX (rvdbreemen/OTGW-firmware, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Book To Skill?

alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-skills, which has 27,938 GitHub stars. The repository holds 342 skills in this directory. The repository was last updated on August 30, 2026.

Source: alirezarezvani/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.