Skip to content
SkillScript-led14,177 tokens in use

book-to-skill

Converts books and documents in PDF, EPUB, DOCX and more into structured agent skills with chapter summaries, a glossary, patterns and a cheatsheet.

38,557 stars on the repository MIT Licensevirgiliojr94/book-to-skill
npx skills add virgiliojr94/book-to-skill
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing book-to-skill costs

104tokens idle
14,177tokens in use
22,960tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Script-led

Script-ledMixedModel-led

Most of this skill is scripts, so it behaves much the same whichever model runs it.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: book_to_skill/__init__.py, book_to_skill/__main__.py, book_to_skill/cli.py, book_to_skill/config.py, book_to_skill/dependencies.py, book_to_skill/exceptions.py, book_to_skill/parsers/__init__.py, book_to_skill/parsers/calibre.py, book_to_skill/parsers/docx.py, book_to_skill/parsers/epub.py, book_to_skill/parsers/html.py, book_to_skill/parsers/pdf.py, book_to_skill/parsers/rtf.py, book_to_skill/parsers/text.py, book_to_skill/pdf_inspector_integration.py, book_to_skill/remote/__init__.py, book_to_skill/remote/checkpoint.py, book_to_skill/remote/coverage.py, book_to_skill/remote/discovery.py, book_to_skill/remote/policy.py, book_to_skill/remote/provenance.py, book_to_skill/remote/reader.py, book_to_skill/sanitize.py, book_to_skill/utils.py, scripts/extract.py, tests/evals/test_manifest.py, tests/evals/test_paper_flat.py, tests/evals/test_replay.py, tests/evals/test_score.py, tests/evals/test_score_robustness.py, tests/fixtures/generate_pdf_page_provenance.py, tests/remote/mock_mcp.py, tests/remote/test_checkpoint.py, tests/remote/test_discovery.py, tests/remote/test_e2e_mock_mcp.py, tests/remote/test_incremental_generation.py, tests/remote/test_policy.py, tests/remote/test_provenance_coverage.py, tests/remote/test_reader.py, tests/remote/test_security_boundaries.py, tests/test_batch_resilience_unreadable.py, tests/test_book_to_skill.py, tests/test_calibre_stale_output.py, tests/test_chapter_content_split.py, tests/test_chapter_method_reported.py, tests/test_chapter_numeric_false_positives.py, tests/test_cjk_radical_normalization.py, tests/test_cjk_supplementary_plane.py, tests/test_code_fence_closers.py, tests/test_corpus_newlines.py, tests/test_dependency_install_semantics.py, tests/test_discovery_tax.py, tests/test_docling_fallback.py, tests/test_docs_host_lists.py, tests/test_docx_cell_paragraphs.py, tests/test_epub_container_entities.py, tests/test_epub_image_reporting.py, tests/test_epub_utf16.py, tests/test_epub_xml_attribute_spacing.py, tests/test_fingerprint.py, tests/test_hermes_host_support.py, tests/test_html_block_boundaries.py, tests/test_html_boilerplate_extraction.py, tests/test_intro_and_support_note.py, tests/test_isolated_install_hint.py, tests/test_letter_spaced_outline_headings.py, tests/test_malformed_text_bom.py, tests/test_md_sentence_case_chapters.py, tests/test_metadata_encoding.py, tests/test_multi_source_structural_chapters.py, tests/test_multi_source_toc.py, tests/test_no_bytecode_pollution.py, tests/test_numbered_headings.py, tests/test_openclaw_host_support.py, tests/test_opencode_host_support.py, tests/test_outline_title_wrapped_three_lines.py, tests/test_output_dir_security.py, tests/test_part_chapter_count.py, tests/test_pdf_chapter_opening_at_page_top.py, tests/test_pdf_inspector_integration.py, tests/test_pdf_outline_chapters.py, tests/test_pdf_page_count_confidence.py, tests/test_pdf_page_number_detection.py, tests/test_pdf_page_sidecar.py, tests/test_pdf_sidecar_reuse.py, tests/test_pdftotext_edge_only_boilerplate.py, tests/test_per_run_workdir.py, tests/test_publish_visibility_gate.py, tests/test_range_end_title_prose_line.py, tests/test_repo_hygiene.py, tests/test_rerun_guard.py, tests/test_rtf_destination_groups.py, tests/test_rtf_escaped_controls.py, tests/test_rtf_line_break.py, tests/test_rtf_surrogate_pairs.py, tests/test_sanitize_annotation_controls.py, tests/test_sanitize_bidi_controls.py, tests/test_sanitize_extracted_text.py, tests/test_scan_coverage.py, tests/test_scan_generated_skill.py, tests/test_scope_selection_contract.py, tests/test_search_and_read_spec.py, tests/test_setext_punctuation_guard.py, tests/test_skill_template_full_text.py, tests/test_source_chapter_samples.py, tests/test_structural_framing_sections.py, tests/test_technical_epub.py, tests/test_tilde_expansion.py, tests/test_tool_call_token_vs_prose.py, tests/test_translation_drift.py, tests/test_unbalanced_code_fence.py, tests/test_validate_skill.py, tools/discovery_tax.py, tools/evals/manifest.py, tools/evals/paper_flat.py, tools/evals/replay.py, tools/evals/score.py, tools/scan_generated_skill.py, tools/validate_skill.py.

Touches

shelldetectednetworkdetectedwrites filesdetectedgitdetectedcredentialsdetected

Declared tags come from the skill's frontmatter; detected ones from its scripts and code blocks. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter8/15
  • Structure25/25
  • Examples15/15
  • Output15/15
  • Size6/15
  • Resources0/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Needs attention
  • Hidden characters−20

    characters that render as nothing or reorder the text

    CHANGELOG.md, line 76
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 157
  • Writes files−8

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 255
  • Runs git commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 809
  • Reaches the network−10

    does this on the machine, and the frontmatter does not say so

    book_to_skill/dependencies.py, line 29
  • Hidden characters−20

    characters that render as nothing or reorder the text

    book_to_skill/utils.py, line 255
  • Hidden characters−20

    characters that render as nothing or reorder the text

    book_to_skill/utils.py, line 256
  • Hidden characters−20

    characters that render as nothing or reorder the text

    book_to_skill/utils.py, line 261
  • Hidden characters−20

    characters that render as nothing or reorder the text

    book_to_skill/utils.py, line 262
  • File that was not read−15

    a file the skill ships that was not read, so what it does is unknown

    docs/CNAME
  • Reads credentials−15

    does this on the machine, and the frontmatter does not say so

    tests/remote/mock_mcp.py, line 563
  • Overrides the user's instructions−25

    tells the model to ignore its instructions or to hide what it does from the user

    tests/test_scan_generated_skill.py, line 107

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Excellent
  • Development activity100
  • Maintenance100
  • Community72
  • Maturity28
  • Momentum40

book-to-skill turns a book or document into an agent skill. It extracts the author’s named frameworks, principles, techniques and anti-patterns rather than writing a summary, and saves them as a skill your agent can load while you work.

It reads local PDF, EPUB, DOCX, HTML, Markdown, TXT, RTF and MOBI/AZW files, or searches for a book through a connected book MCP server. It works with GitHub Copilot CLI, Amp, Claude Code, Hermes Agent, OpenCode and OpenClaw.

What You Get

  • A generated skill folder with a master SKILL.md, a chapters folder, glossary.md, patterns.md and cheatsheet.md
  • Chapter summaries that list the frameworks, key concepts, mental models, anti-patterns and takeaways of each chapter
  • A chapter index and a topic index in the master SKILL.md, so the agent reads only the chapter a question needs
  • An analyze-only report of frameworks, principles and techniques, for review before any skill files are generated

Common Use Cases

  • Turn a technical book PDF into a skill you can query while coding
  • Study a book by asking the agent questions answered from its chapters
  • Apply an author’s frameworks to a work task using the generated skill
  • Update an existing book skill with new source files or a revised edition

What Makes It Unique

The skill is built around extracting structure instead of producing a summary: named frameworks keep the author’s exact formulation, and large books get reference files and on-demand chapters. It supports five modes (full conversion, analyze only, generate from prior analysis, update of an existing skill, and search through an MCP book provider) and installs into the skill folders of several agent hosts from one converter. It also offers to publish the generated skill to GitHub, private by default.

Under The Hood

The master SKILL.md is a long step-by-step procedure the agent follows. It runs scripts/extract.py through python3, which imports the book_to_skill package and writes full_text.txt and metadata.json into a per-run work directory. Extractors depend on the format: pdftotext, pypdf, pdfminer.six or docling for PDFs, ebooklib or the standard zip library for EPUB, and optional packages for DOCX, HTML and RTF. The extractor can offer to install missing Python packages, which reaches the network, and it asks first. The agent then writes the skill files into your skills folder, creates a symlink under the Claude Code skills folder, scans the output with tools/scan_generated_skill.py and deletes its work directory. The search mode talks to a book MCP server such as libgen-mcp, reads book text through it, and only helps install that server after you confirm. The optional publish step uses the gh CLI and git to create a GitHub repository. The scan of this repository flagged that shell, file-write, git and network use is not declared in the SKILL.md frontmatter, and flagged characters that render as nothing in book_to_skill/utils.py and CHANGELOG.md. It also flagged credential handling in a test mock, text in a test for the scan tool that tells a model to ignore its instructions, and the file docs/CNAME, which was not read. The last three sit in test and docs files, not in the steps the skill runs.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers