agentleFS
vosslabvosslab/vosslab-skills/skills/documentation/book-to-markdown/SKILL.md

book-to-markdown

Skill5 starsChanged 22 days agoMITView on GitHub

Use when converting technical/scientific books from PDF, EPUB, HTML, DOCX, ODT, Markdown, or text into one page-free Markdown file per title. Compare multiple formats as corroborating sources; use for extraction, cleanup, calibration, or repair.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before calling any script, set:

    line 20
  2. Very specific:

    Run from the book-to-markdown checkout with the repository tools and their dependencies.

    line 27
  3. Distinctive:

    Run a bounded sample first.

    line 31
  4. Distinctive:

    Run conversion/cleanup with the smallest validated switch set.

    line 34
  5. Distinctive:

    Use the referenced modules for detailed behavior:

    line 37
  6. Distinctive:

    If required by the evidence, validate and archive:

    line 58
  7. Distinctive:

    Do not create multiple canonical outputs for one title.

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Book to Markdown

Produce clean, greppable reference text for agents, not a visually faithful facsimile. Prioritize stable headings, semantic chunks, plain-text math, tables, captions, and bibliography entries.

Default workflow

measure -> hypothesize -> sample -> compare -> whole book -> verify

Before you start

Before calling any script, set:

book_repo="/absolute/path/to/book-to-markdown"
export PYTHONPATH="$book_repo:$PYTHONPATH"

Run from the book-to-markdown checkout with the repository tools and their dependencies.

Workflow split

  • Run a bounded sample first; do not pick extraction tools from word count alone.
  • Choose source and pass by evidence.
  • Merge corroborating sources only when they add confirmed omissions.
  • Run conversion/cleanup with the smallest validated switch set.
  • Validate, archive, and report before delivery.

Use the referenced modules for detailed behavior:

  • Source selection and acquisition
  • Conversion and cleanup details
  • Repair playbook
  • Verification and delivery

Fast start (typical)

python3 "$book_repo/tools/pdf_raw_text_extraction_to_markdown.py" book.pdf --measure

Then:

python3 "$book_repo/tools/pdf_raw_text_extraction_to_markdown.py" book.pdf -o /tmp/book.raw.md \
  --json-report /tmp/book.extract.json
python3 "$book_repo/tools/clean_markdown.py" -i /tmp/book.raw.md -o /tmp/book.clean.md

If required by the evidence, validate and archive:

python3 "$book_repo/tools/validate_markdown_v2.py" /path/to/delivery-directory
python3 "$book_repo/tools/archive_processed_sources.py" /path/to/book-root

Do not create multiple canonical outputs for one title.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.