A Claude Code skill for parsing documents with the MinerU API
Convert PDF, DOC, DOCX, PPT, PPTX, and images into clean Markdown/JSON
with OCR, formula recognition, table extraction, and batch processing.
| Feature | Description |
|---|---|
| Cloud API | No GPU needed — uses mineru.net hosted service |
| Local API | Self-hosted with mineru-api for full control |
| Smart Models | hybrid (default), pipeline, vlm, MinerU-HTML |
| Rich Extraction | OCR (109 languages), LaTeX formulas, cross-page tables |
| Batch Processing | Parse up to 200 files per request |
| Extra Formats | Export to DOCX, HTML, or LaTeX alongside Markdown |
| CLI Script | mineru-parse.sh for quick command-line usage |
| Auto-Extract | Download + unzip + display markdown in one step |
cd ~/.claude/skills
git clone https://github.com/LeoLin990405/mineru-skill.git mineruGet a free token at mineru.net/apiManage/token, then:
mkdir -p ~/.config/mineru
echo "YOUR_TOKEN" > ~/.config/mineru/token
chmod 600 ~/.config/mineru/tokenIn Claude Code — just ask naturally:
Parse this PDF to markdown: https://arxiv.org/pdf/2301.00001.pdf
Extract tables from report.pdf using the vlm model with OCR
Via CLI script:
# Parse from URL
./scripts/mineru-parse.sh https://example.com/paper.pdf --output ./parsed --extract
# Parse local file with VLM model
./scripts/mineru-parse.sh report.pdf --model vlm --ocr --output ./out
# Extra output formats
./scripts/mineru-parse.sh slides.pptx --format docx --format htmlmineru-parse.sh <url_or_file> [options]
| Option | Description | Default |
|---|---|---|
--model <m> |
Model version | hybrid |
--ocr |
Enable OCR | off |
--no-formula |
Disable formula recognition | on |
--no-table |
Disable table recognition | on |
--output <dir> |
Download results to directory | - |
--extract |
Auto-extract zip, show markdown | off |
--pages <range> |
Page ranges, e.g. "1-5,8" |
all |
--format <fmt> |
Extra format: docx/html/latex |
- |
--callback <url> |
Webhook for async notification | - |
--data-id <id> |
Custom tracking identifier | - |
--quiet |
Suppress progress output | off |
| Variable | Default | Description |
|---|---|---|
MINERU_TOKEN_FILE |
~/.config/mineru/token |
Token file path |
MINERU_API_BASE |
https://mineru.net/api/v4 |
API base URL |
MINERU_POLL_INTERVAL |
5 |
Poll interval (seconds) |
MINERU_MAX_POLL |
360 |
Max poll attempts |
| Model | Best For | Speed | Notes |
|---|---|---|---|
hybrid |
General use | Medium | Default since v2.7.0, recommended |
pipeline |
CPU-only environments | Fast | No GPU required |
vlm |
Complex layouts, scanned docs | Slower | Needs 10GB+ VRAM |
MinerU-HTML |
Preserving HTML structure | Medium | Web content |
| Item | Limit |
|---|---|
| File size | 200 MB |
| Pages per file | 600 |
| Daily priority pages | 2,000 / account |
| Batch upload | 200 files / request |
| Token validity | 90 days |
See the examples/ directory for:
- parse_single.sh — Parse a single PDF from URL
- parse_local.sh — Upload and parse a local file
- parse_batch.py — Batch parse multiple documents (Python)
mineru-skill/
├── SKILL.md # Claude Code skill definition (full API reference)
├── scripts/
│ └── mineru-parse.sh # CLI helper script
├── examples/
│ ├── parse_single.sh # Single URL parsing example
│ ├── parse_local.sh # Local file parsing example
│ └── parse_batch.py # Batch processing example (Python)
├── .github/
│ ├── ISSUE_TEMPLATE/ # Bug report & feature request templates
│ └── PULL_REQUEST_TEMPLATE.md
├── CONTRIBUTING.md
├── CHANGELOG.md
├── LICENSE # MIT
└── README.md
Full API reference including all endpoints, request/response formats, error codes, and Python/curl examples is in SKILL.md.
Contributions are welcome! Please read the Contributing Guide before submitting a PR.
- MinerU — The document parsing engine by OpenDataLab
- Claude Code — Anthropic's CLI for Claude
MIT © 2026 LeoLin990405