Agent skill

Mineru PDF Parser

by staruhub in staruhub/ClaudeSkills

用 MinerU 将复杂PDF文档转换为LLM友好的Markdown/JSON格式。适用于:(1) PDF转Markdown/JSON,(2) 提取PDF中的文本、表格、公式、图像,(3) 解析学术论文、技术文档、商业报告,(4) 为RAG应用准备文档数据,(5) 批量处理PDF。触发关键词:"PDF解析"、"PDF转Markdown"、"提取PDF表格/公式"、"MinerU"、"parse…

MITAuto-check passedDocuments & Office

Install Mineru PDF Parser

skills CLI
$ npx skills add staruhub/ClaudeSkills --skill mineru-pdf-parser -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install staruhub/ClaudeSkills mineru-pdf-parser --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/staruhub/ClaudeSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/Geek-skills-mineru-pdf-parser .claude/skills/mineru-pdf-parser && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mineru-pdf-parser
GitHub stars
728
Token cost
~671 tokens
SKILL.md length
105 words
Files
5 (incl. scripts, references)
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

用 MinerU 将复杂PDF文档转换为LLM友好的Markdown/JSON格式。适用于:(1) PDF转Markdown/JSON,(2) 提取PDF中的文本、表格、公式、图像,(3) 解析学术论文、技术文档、商业报告,(4) 为RAG应用准备文档数据,(5) 批量处理PDF。触发关键词:"PDF解析"、"PDF转Markdown"、"提取PDF表格/公式"、"MinerU"、"parse…

  • Tasks that involve PDF
  • SKILL.md covers 安装, 快速使用, 解析模式选择 and 输出文件, plus 4 more sections
  • Runs Python scripts from its folder; calls pip and uv
  • Tasks that involve Document parsing

What it does

Mineru PDF Parser is an agent skill from staruhub/ClaudeSkills. 用 MinerU 将复杂PDF文档转换为LLM友好的Markdown/JSON格式。适用于:(1) PDF转Markdown/JSON,(2) 提取PDF中的文本、表格、公式、图像,(3) 解析学术论文、技术文档、商业报告,(4) 为RAG应用准备文档数据,(5) 批量处理PDF。触发关键词:"PDF解析"、"PDF转Markdown"、"提取PDF表格/公式"、"MinerU"、"parse PDF"等。不用于:PDF的阅读/填表/签名/拆分合并(用宿主pdf工具)、Word/PPT等非PDF格式解析、只需读几页内容的场景(直接读即可,不必转换)。

Its SKILL.md is about 670 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/api_reference.md`, `references/best_practices.md` and `references/output_formats.md`).

It sits in Documents & Office, covering PDF, Document parsing and Retrieval-augmented generation. The repository describes itself as: 13 curated Agent Skills for research, product decisions, decks, publishing, audits, and more — portable across skills-compatible agents. The licence is MIT.

When your agent uses it

  • Tasks that involve PDF
  • Tasks that involve Document parsing
  • Tasks that involve Retrieval-augmented generation

Example prompts

  • “PDF转Markdown”
  • “提取PDF表格/公式”
  • “MinerU”
  • “/mineru-pdf-parser”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 66e02d2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip and uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mineru PDF Parser loads about 671 tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 74 tokens; SKILL.md has 105 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~671
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from staruhub/ClaudeSkills at commit 66e02d2, republished under its MIT licence (© staruhub). 105 words, ~671 tokens.

Download SKILL.mdSave it as .claude/skills/mineru-pdf-parser/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
mineru-pdf-parser
description
用 MinerU 将复杂PDF文档转换为LLM友好的Markdown/JSON格式。适用于:(1) PDF转Markdown/JSON,(2) 提取PDF中的文本、表格、公式、图像,(3) 解析学术论文、技术文档、商业报告,(4) 为RAG应用准备文档数据,(5) 批量处理PDF。触发关键词:"PDF解析"、"PDF转Markdown"、"提取PDF表格/公式"、"MinerU"、"parse PDF"等。不用于:PDF的阅读/填表/签名/拆分合并(用宿主pdf工具)、Word/PPT等非PDF格式解析、只需读几页内容的场景(直接读即可,不必转换)。
version
1.1.0

MinerU PDF Parser

将复杂PDF文档转换为机器可读的Markdown/JSON格式,适用于LLM和RAG应用。

安装

bash
# 推荐使用uv安装
pip install uv
uv pip install -U "mineru[all]"

# 下载模型(首次使用)
mineru-models-download

快速使用

命令行
bash
# 解析单个PDF
mineru -p input.pdf -o output_dir

# 批量解析
mineru -p pdf_folder/ -o output_dir

# 指定解析模式
mineru -p input.pdf -o output_dir --backend vlm      # VLM模式(高精度)
mineru -p input.pdf -o output_dir --backend pipeline # Pipeline模式(快速)
mineru -p input.pdf -o output_dir --backend hybrid   # 混合模式(平衡)
Python API
python
from mineru import MinerU

mineru = MinerU()
result = mineru.parse("document.pdf")

# 获取输出
markdown = result.to_markdown()
json_data = result.to_json()

详细API见 references/api_reference.md

解析模式选择

模式特点适用场景
pipeline快速、资源少简单文档、纯文本PDF
vlm高精度、复杂布局学术论文、公式表格文档
hybrid平衡速度精度通用场景

输出文件

  • {filename}.md - Markdown正文
  • {filename}_content_list.json - 结构化JSON
  • images/ - 提取的图像
  • {filename}_middle.json - 中间结果(调试)

格式详情见 references/output_formats.md

最佳实践

学术论文
bash
mineru -p paper.pdf -o output --backend vlm
批量处理
python
from mineru import MinerU
import os

mineru = MinerU(backend="hybrid")
for pdf in os.listdir("pdfs/"):
    if pdf.endswith(".pdf"):
        result = mineru.parse(f"pdfs/{pdf}")
        result.save(f"output/{pdf[:-4]}/")
RAG数据准备
python
sections = result.get_sections()
for section in sections:
    vector_db.add(section.title, section.content)
启用GPU加速

修改 ~/.mineru.json 中 device-mode 为 cuda。

更多见 references/best_practices.md

验收标准(解析任务完成前自查)

  • 输出目录里 .md 与 _content_list.json 都存在,把实际路径回报用户
  • 抽查 1-2 页对照原 PDF:表格/公式没有明显丢失或错乱;有问题主动告知而不是静默交付
  • backend 选择有依据(简单文本→pipeline;公式表格密集→vlm;拿不准→hybrid)
  • 批量任务报告成功/失败清单,失败的给原因

已知陷阱

陷阱具体表现应对
首次运行缺模型未执行 mineru-models-download 直接解析报错安装后先跑模型下载;下载体积大,提前告知用户耗时
无 GPU 硬跑 vlmCPU 上 vlm 模式极慢,像卡死无 GPU 时用 pipeline/hybrid;有 GPU 改 ~/.mineru.json 的 device-mode 为 cuda
扫描件预期过高低清晰度扫描 PDF 解析质量差提前告知扫描件效果取决于清晰度;结果差时换 backend 重试一次,仍差则如实报告
大文件内存压力数百页 PDF 单次解析内存暴涨大文件分批解析或按章节拆分

脚本

使用 scripts/mineru_parse.py 进行解析,支持错误处理和日志记录。

© staruhub, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/Geek-skills-mineru-pdf-parser of staruhub/ClaudeSkills.

  • SKILL.md
  • references/api_reference.md
  • references/best_practices.md
  • references/output_formats.md
  • scripts/mineru_parse.py

Open the folder on GitHubat commit 66e02d2

Compare with similar skills

Mineru PDF Parser next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mineru PDF Parser compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mineru PDF Parser this skillstaruhub/ClaudeSkills728—~671Automated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Huashu Markdown Publishing Pipelinealchaincyf/huashu-md-html910—~4.8kAutomated safety check: PassMIT
Lt2mdlibnyx/LT2MD109—~4.4kAutomated safety check: PassAGPL-3.0
MineruNebutra/MinerU-Skill123—~504Automated safety check: PassMIT
Doc To Markdowndaymade/claude-code-skills1.4k—~2.5kAutomated safety check: PassMIT

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Huashu Markdown Publishing Pipeline

    alchaincyf/huashu-md-html

    Converts files and web pages into clean Markdown, then turns Markdown into polished HTML, Word, PDF and EPUB using four templates.

    910 GitHub stars~4.8k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Lt2md

    libnyx/LT2MD

    Convert born-digital, scanned, or mixed PDFs into auditable Markdown while preserving reading order, equations, source-page anchors, and information-bearing images as adjacent non-original text…

    109 GitHub stars~4.4k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Mineru

    Nebutra/MinerU-Skill

    An AI-Native skill for parsing PDF / Office / image files into Markdown with MinerU — a fast, zero-config document parser for AI agents.

    123 GitHub stars~504 tokensUpdated 16 days ago
    Documents & OfficeAuto-check passed
  • Doc To Markdown

    daymade/claude-code-skills

    Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.

    1.4k GitHub stars~2.5k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Summarize

    mitsuhiko/agent-stuff

    Fetch a URL or convert a local file (PDF/DOCX/HTML/etc.) into Markdown using uvx markitdown, optionally it can summarize

    3.2k GitHub stars~524 tokensUpdated 12 days ago
    Documents & OfficeAuto-check passed

More from staruhub/ClaudeSkills

All 20 skills in this repo
  • Deep Research

    staruhub/ClaudeSkills

    A skill your agent uses when the user wants an evidence-based research memo, literature review, market/policy/technical landscape, or a multi-source decision brief with citations, trade-offs, and a…

    728 GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Wechat Article Writer

    staruhub/ClaudeSkills

    专业微信公众号文章助手,支持四个独立且可组合模式:article 写正文;image-prompts 从文章生成版本化、provider-neutral 的图片提示词 manifest 与稳定占位符,但不调用生图;layout 把文章和 manifest 确定性转换为微信安全的内联 HTML;full-pipeline…

    728 GitHub stars~1.8k tokensUpdated 1 mo ago
    Auto-check passed
  • A Share Analyst

    staruhub/ClaudeSkills

    A股分析研究助手,提供行情数据获取与技术面/基本面分析框架(仅供研究参考,不构成投资建议)。适用于:(1) 获取A股行情和历史数据,(2) 技术面分析(K线形态、MACD、KDJ、RSI、布林带等),(3) 基本面分析(财务指标、估值分析),(4) 板块热点追踪,(5) 选股策略筛选与量化因子分析,(6)…

    728 GitHub stars~871 tokensUpdated 1 mo ago
    Auto-check passed
  • C Drive Cleaner

    staruhub/ClaudeSkills

    Windows C盘清理和磁盘空间管理。当用户说C盘满了、磁盘空间不足、清理临时文件/缓存/回收站/系统日志、查找大文件、分析磁盘占用时使用。仅适用于 Windows 环境。不用于:macOS/Linux 磁盘清理、卸载软件(引导用户走系统卸载)、清理用户个人文件(只报告位置,删除决定权在用户)。

    728 GitHub stars~518 tokensUpdated 1 mo ago
    Auto-check passed
  • Gaokao Expert

    staruhub/ClaudeSkills

    资深高考命题专家助手,提供专业的命题指导和评审服务。适用于创作高考试题、评审试题质量、分析试卷结构、了解命题趋势等场景。结合文档工具提取解压文件,使用网络搜索了解当年最新命题趋势,使用分析工具评估题目质量和试卷结构。涵盖"一核四层四翼"评价体系、题型规范、评分标准、命题流程等多个维度。不用于:大学/考研/中考命题(体系不同,仅可借鉴)、日常作业题编写、直接替考生解题。

    728 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • LLM Wiki

    staruhub/ClaudeSkills

    Build and maintain a structured LLM-generated wiki for any codebase.

    728 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Mineru PDF Parser

What does Mineru PDF Parser do?

用 MinerU 将复杂PDF文档转换为LLM友好的Markdown/JSON格式。适用于:(1) PDF转Markdown/JSON,(2) 提取PDF中的文本、表格、公式、图像,(3) 解析学术论文、技术文档、商业报告,(4) 为RAG应用准备文档数据,(5) 批量处理PDF。触发关键词:"PDF解析"、"PDF转Markdown"、"提取PDF表格/公式"、"MinerU"、"parse…. Mineru PDF Parser is an agent skill from staruhub/ClaudeSkills.

When should I use Mineru PDF Parser?

Mineru PDF Parser fits situations like: tasks that involve PDF; tasks that involve Document parsing; tasks that involve Retrieval-augmented generation.

How do I install Mineru PDF Parser in Claude Code?

Run `npx skills add staruhub/ClaudeSkills --skill mineru-pdf-parser -a claude-code`. Or copy the skill folder (skills/Geek-skills-mineru-pdf-parser in staruhub/ClaudeSkills) into .claude/skills/mineru-pdf-parser in your project. Claude Code loads it when a task matches its description.

How do I install Mineru PDF Parser in Codex?

Run `npx skills add staruhub/ClaudeSkills --skill mineru-pdf-parser -a codex`. Or copy the skill folder (skills/Geek-skills-mineru-pdf-parser in staruhub/ClaudeSkills) into .agents/skills/mineru-pdf-parser in your project. Codex loads it when a task matches its description.

Can I use Mineru PDF Parser in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add staruhub/ClaudeSkills --skill mineru-pdf-parser -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mineru-pdf-parser, .gemini/skills/mineru-pdf-parser, .github/skills/mineru-pdf-parser and .opencode/skills/mineru-pdf-parser in your project.

What does Mineru PDF Parser need to run?

Going by SKILL.md and its folder, Mineru PDF Parser needs Python for the scripts in its folder and the command-line tools its instructions call (pip and uv). Our summary lists: Python 3.

Does Mineru PDF Parser access the network?

SKILL.md contains no URLs. Its commands use pip and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mineru PDF Parser safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Mineru PDF Parser use?

Mineru PDF Parser is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mineru PDF Parser use?

About 671 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3k tokens, read only when the agent opens those files.

What are the alternatives to Mineru PDF Parser?

Skills that share tags, products or a category with Mineru PDF Parser: Markitdown (ImCa0/just-laws, 781 stars), Huashu Markdown Publishing Pipeline (alchaincyf/huashu-md-html, 910 stars), Lt2md (libnyx/LT2MD, 109 stars) and Mineru (Nebutra/MinerU-Skill, 123 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mineru PDF Parser?

staruhub (a GitHub user) maintains it in staruhub/ClaudeSkills, which has 728 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on August 13, 2026.

Source: staruhub/ClaudeSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.