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.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agents-md-fixerSkill
- arch-docsSkill
- docset-updaterSkill
- humanizerSkill
- news-release-docsSkill
- pdf-guideSkill
- readme-docsSkill
- screenshot-docsSkill
- see-also-docsSkill
- setup-install-usage-docsSkill
- bptools-writer-expertSkill
- color-accessibility-expertSkill
- css-creative-expertSkill
- game-design-expertSkill
- geometry-expertSkill
- glass-expertSkill
- hic-human-interact-expertSkill
- openscad-3d-printing-expertSkill
- podman-expertSkill
- postgresql-expertSkill
- pyside6-engineerSkill
- rust-code-expertSkill
- solid-js-expertSkill
- svg-creator-expertSkill
- typescript-engineerSkill
- ui-ux-engineerSkill
- vision-expertSkill
- wasm-rust-expertSkill
- webwork-writer-expertSkill
- delegate-manager-to-subagentsSkill
- gas-town-workflowSkill
- hang-checkSkill
- html-game-parallel-builderSkill
- parallel-planSkill
- stay-busySkill
- repo-rules-readerSkill
- blueprint-plan-drafterSkill
- ideonomy-plainSkill
- ideonomy-richSkill
- make-goalSkill
- modest-plan-drafterSkill
- audit-code-reviewerSkill
- old-python-code-reviewSkill
- prune-testsSkill
- unit-test-starterSkill
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
- Distinctive: line 20
Before calling any script, set:
- Very specific: line 27
Run from the book-to-markdown checkout with the repository tools and their dependencies.
- Distinctive: line 31
Run a bounded sample first.
- Distinctive: line 34
Run conversion/cleanup with the smallest validated switch set.
- Distinctive: line 37
Use the referenced modules for detailed behavior:
- Distinctive: line 58
If required by the evidence, validate and archive:
- Distinctive: line 65
Do not create multiple canonical outputs for one title.
≈ “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.
Files
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 -> verifyBefore 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 --measureThen:
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.mdIf 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-rootDo not create multiple canonical outputs for one title.
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
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.

