pdf-to-markdown
Skill29 starsChanged 4 months agoApache-2.0View on GitHub
Convert a PDF (especially academic papers) to clean Markdown using MinerU — preserves reading order, LaTeX equations, tables, and figures, and runs on the GPU. Use when the user asks to convert/extract a PDF to markdown/text. Invoke directly — no need for the user to type the skill name.
- Installs packages
18 other projects use a version of this.
Adopted by
Most recently taken up by
- mikel-code/claude-skillstheir own version, first seen Nov 16, 2026
- troia-51/claude-skillstheir own version, first seen Nov 16, 2026
- yohei1126/agent-skillstheir own version, first seen Nov 15, 2026
- krishagel/geoffreytheir own version, first seen Nov 15, 2026
- pamelafox/presentation-skillstheir own version, first seen Nov 8, 2026
- neysofu/skillstheir own version, first seen Oct 30, 2026
Used with
Projects with it also use xlsx and docx.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkillxlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Also in 3 projects that use this
AnthropicSkilldocx
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
Also in 3 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- claesbackman/AI-research-feedback★ 594same name
- Azure-Samples/python-agentframework-demos★ 248same name
- pamelafox/presentation-skills★ 129same name
- aliceisjustplaying/claude-skill-pdf-to-markdown★ 49same name
- krishagel/geoffrey★ 9same name
- MoeenNehzati/famulus★ 4same name
- replynodes/replynodes-agent-skills★ 3same name
- abr4xas/skills★ 2same name
- paulmaunders/claude-skill-pdf-to-markdown★ 2same name
- yohei1126/agent-skills★ 2same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
The file
Files
PDF → Markdown (MinerU)
Converts PDFs to clean, structure-preserving Markdown using MinerU
(opendatalab/MinerU), the highest-fidelity open-source engine for academic
papers. Runs the pipeline backend on the GPU (CUDA). Output keeps
heading hierarchy, inline LaTeX math ($...$), figures, and tables (as HTML).
When to use
- The user asks to "convert / extract / turn this PDF into markdown (or text)."
- Best fit: academic papers — multi-column layouts, LaTeX math, tables, references.
- Also handles images,
.docx,.pptx,.xlsx(pass the file directly).
How to run
MinerU lives in a dedicated isolated env and is driven through the bundled
convert.py wrapper, which calls MinerU's Python API in-process.
Do not use the
mineruCLI here — in 3.4.0 it spins up a local API server that returns502 Bad Gatewayon Windows. The wrapper bypasses that.
"$MINERU_PYTHON" \
"<SKILLS_DIR>/pdf-to-markdown/convert.py" \
"<input.pdf>" "<output_dir>" --lang en
- Arg 1 — input file (pdf/image/docx/pptx/xlsx).
- Arg 2 — output directory.
- `--lang` — OCR language hint: `en` for English, `ch` for Chinese/mixed (default `ch`,
which also handles English). Only affects OCR'd (scanned) pages.
- The script prints `DONE -> <path to .md>` on success.
### Output layout
<output_dir>/<name>/auto/<name>.md # the markdown
<output_dir>/<name>/auto/images/ # extracted figures (referenced from the md)
<output_dir>/<name>/auto/<name>_*.json # layout/content metadata (can be ignored)
## After converting
1. Read the printed `DONE -> ...md` path and report it to the user.
2. Optionally show a short preview (title + first headings).
3. Note where extracted images were written.
4. Quality is normally high: headings as `#`, inline math as `$...$`, tables as
`<table>` HTML (with LaTeX inside cells). If a scanned PDF comes out garbled,
re-run with `--method ocr`.
## Preflight / setup (only if something is missing)
- Interpreter with MinerU (env `MINERU_PYTHON`, default `python`).
- Verify CUDA: `$MINERU_PYTHON -c "import torch; print(torch.cuda.is_available())"` → `True`.
- Models are pre-downloaded to `~/.cache/huggingface/hub/` (one-time).
If the env is missing, recreate it (install `uv` first if needed):uv venv --python 3.12 "<your-env>"
uv pip install --python "<your-env>/Scripts/python.exe" torch torchvision --index-url https://download.pytorch.org/whl/cu124
uv pip install --python "<your-env>/Scripts/python.exe" -U "mineru[core]"
"<your-env>/Scripts/mineru-models-download.exe" -s huggingface -m pipeline
Then set `MINERU_PYTHON` to `<your-env>/Scripts/python.exe` (Windows) or
`<your-env>/bin/python` (macOS/Linux). On macOS/Linux the models-download binary is
`mineru-models-download` (no `.exe` suffix).
## Troubleshooting
- **`cuda.is_available()` is False** → reinstall torch from the `cu124` index (see setup).
The pipeline still runs on CPU if needed, just slower.
- **Model download fails / slow** → re-run `mineru-models-download` with `-s modelscope`.
- **Scanned PDF garbled** → add `--method ocr` to the `convert.py` call.
- **`vlm-engine` / `hybrid-engine` backends** → these need vLLM/SGLang (Linux); they 502
on Windows. Stick with the default `pipeline` backend used by the wrapper.
## Lightweight fallback (simple / Office docs)
For non-paper files where layout fidelity doesn't matter, Microsoft's **MarkItDown**
is faster and simpler — but it mangles academic two-column PDFs and tables, so prefer
MinerU for papers:"$MINERU_PYTHON" -m pip install markitdown
"$MINERU_PYTHON" -m markitdown "<input>" > out.md
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.

