Skip to content
cccskills
FreePublished on GitHub

mineru-pdf-parser

用 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格式解析、只需读几页内容的场景(直接读即可,不必转换)。

The English summary is being prepared. Showing the original description.

See how to install

Files included (5)

  • SKILL.md3.8 KB
  • references/api_reference.md3.0 KB
  • references/best_practices.md5.5 KB
  • references/output_formats.md3.1 KB
  • scripts/mineru_parse.py8.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

MinerU PDF Parser

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

安装

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

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

快速使用

命令行

# 解析单个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

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

最佳实践

学术论文

mineru -p paper.pdf -o output --backend vlm

批量处理

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数据准备

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 进行解析,支持错误处理和日志记录。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

A股分析研究助手,提供行情数据获取与技术面/基本面分析框架(仅供研究参考,不构成投资建议)。适用于:(1) 获取A股行情和历史数据,(2) 技术面分析(K线形态、MACD、KDJ、RSI、布林带等),(3) 基本面分析(财务指标、估值分析),(4) 板块热点追踪,(5) 选股策略筛选与量化因子分析,(6) 生成股市分析报告。当用户询问"帮我分析股票"、"今日选股"、"A股行情分析"、"技术分析"、"量化选股"时触发。不用于:预测明日涨跌或给出确定性买卖指令、代客决策、港股美股(数据源不同)、加密货币。

The English summary is being prepared. Showing the original description.

staruhub/ClaudeSkills728Updated Aug 13, 2026

AI咨询/销售的对话策略助手。当用户需要准备AI方案沟通、跟业务部门聊AI落地、写AI提案、应对客户异议、做AI培训破冰时使用。触发场景:"怎么跟老板聊AI"、"客户说AI不靠谱"、"准备一个AI方案汇报"、"帮我想想怎么推AI"、"业务部门不配合"、"AI项目怎么卖"、"demo之后怎么跟进"。也适用于AI咨询师、技术合伙人、CTO做内部AI推广。

The English summary is being prepared. Showing the original description.

staruhub/ClaudeSkills728Updated Aug 13, 2026

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

The English summary is being prepared. Showing the original description.

staruhub/ClaudeSkills728Updated Aug 13, 2026

PPT 生产 Agent:理解场景 → 推荐风格 → 先出大纲 → 定义页面 → 双通路交付(PPT 内容稿 / 逐页视觉图 / 信息图组图)。当用户要做汇报、路演、培训课件、提案、咨询报告的演示文稿,或要把大纲/文章做成 slides、deck、PPT、信息图、小红书图文、可视化传播图时使用。支持指定风格或从风格库推荐,支持 image 模型逐页出视觉稿。前身为 notion-infographic(v2)并吸收 ppt-designer 的设计原则。不用于:pptx 文件的纯技术操作(拆分/合并/提取,用宿主 pptx skill)、演讲稿或文章本体的写作(用 wechat-article-writer)、需要先做研究的内容调研(先走 deep-research 再回来)、单张海报或 logo 设计。

The English summary is being prepared. Showing the original description.

staruhub/ClaudeSkills728Updated Aug 13, 2026

Use this skill 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 clear conclusion. Best for tasks that need synthesis across multiple external sources, iterative follow-up research, or a reusable written artifact. Do not use for quick factual lookups, single-source summaries, simple Q&A, summarizing one document the user already provided, plan-only requests where the user explicitly defers the actual research, or when the user wants a short answer with no need for cited evidence (a short but evidence-backed conclusion is still a brief memo, which this skill covers). Chinese trigger examples: "帮我调研", "深度研究", "综述报告", "技术选型分析", "竞品研究", "政策分析".

The English summary is being prepared. Showing the original description.

staruhub/ClaudeSkills728Updated Aug 13, 2026

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

The English summary is being prepared. Showing the original description.

staruhub/ClaudeSkills728Updated Aug 13, 2026

See all skills by staruhub

Report a problem with this skill