mineru-pdf

mineru-pdf is a skill for Claude Code, Codex from hawkongz/mineru-pdf. It costs 180 tokens per session (912 once invoked), scanned A, original, MIT.

Instructions for extracting text, formulas, tables, and images from difficult PDF files with MinerU, a document-reading tool. It is intended for papers, multi-column layouts, and scanned documents where basic PDF readers may produce poor results.

In plain words
What is it for?
Use it to parse academic papers and other complex PDFs, including scanned documents, mathematical formulas, tables, and embedded images.
Why use it?
It helps preserve reading order and recover content that can be missing, scrambled, or unreadable in simpler PDF extraction methods.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to parse academic papers and other complex PDFs, including scanned documents, mathematical formulas, tables, and embedded images.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hawkongz/mineru-pdf/zh-cn
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hawkongz/mineru-pdf --skill zh-cn
Clone the repo
git clone --depth 1 https://github.com/hawkongz/mineru-pdf

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mineru-pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/hawkongz/mineru-pdf/zh-cn/github.svg)](https://agentmods.dev/skills/hawkongz/mineru-pdf/zh-cn)
Your own site
<a href="https://agentmods.dev/skills/hawkongz/mineru-pdf/zh-cn"><img src="https://agentmods.dev/badge/skills/hawkongz/mineru-pdf/zh-cn/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mineru-pdf

Your own site · 80×15
<a href="https://agentmods.dev/skills/hawkongz/mineru-pdf/zh-cn"><img src="https://agentmods.dev/badge/skills/hawkongz/mineru-pdf/zh-cn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 180 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 912 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00180 $0.00912
Opus 5 $0.00090 $0.00456
Sonnet 5 $0.00036 $0.00182
Haiku 4.5 $0.00018 $0.00091

Measured 11d ago against content hash 970fe13c7c24, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mineru-pdf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

zh-CN/SKILL.md · 89 lines

What it actually says

MinerU PDF 内容提取

概述

MinerU 是一个文档解析引擎,能处理 pypdf/pdfplumber 无法胜任的场景:数学公式、多栏排版的阅读顺序、带位置元数据的图片提取、扫描件 OCR。完全本地运行(无需 API Key,模型下载后无需网络)。

本 skill 仅用于内容提取。PDF 编辑操作(合并、拆分、旋转、水印、加密、表单)请使用标准 pdf skill。

工作流程

1. 检查安装

pip show mineru

如未安装:

pip install "mineru[pipeline]"

首次运行会自动下载模型(~2 GB)。如果 HuggingFace 下载慢或被墙,切换到 ModelScope(国内镜像):

export MINERU_MODEL_SOURCE=modelscope   # macOS / Linux
$env:MINERU_MODEL_SOURCE="modelscope"   # Windows PowerShell

设为 ModelScope 后从 modelscope.cn 下载,国内速度快很多。这个环境变量只需在首次运行前设置一次。

2. 运行 MinerU

mineru -p "文件路径" -o "输出目录/" -b pipeline

关键选项(按需向用户说明):

参数 使用场景
-l en 非中文文档(默认 ch
-f False 无公式时跳过公式识别,节省时间
-t False 无表格时跳过表格识别
-s N -e M 只处理指定页码范围

3. 报告结果

提取完成后,向用户总结:

  • 处理了多少页
  • 输出目录和关键文件
  • 提取到的图片、公式、表格数量
  • 标注任何异常(空页、缺失内容等)

输出结构

输出目录/<文件名>/auto/
├── <文件名>.md                  # 结构化 Markdown
├── <文件名>_content_list.json   # 元素元数据
├── <文件名>_model.json          # 版面检测结果
├── <文件名>_middle.json         # 中间处理数据
└── images/                      # 提取的图片(JPG)

Markdown 保留了文档结构(标题层级、阅读顺序、图片引用)。JSON 提供每个元素的 typebboxpage_idxtext,方便下游处理。

性能参考

首次运行从 HuggingFace 下载模型(~2 GB),永久缓存。后续运行跳过此步骤。

PDF 类型 约需时间
10 页纯文字 1 分钟
7 页学术论文(公式 + 图片) 3 分钟
30 页扫描章节 10-15 分钟

纯 CPU 环境也可运行,但较慢。GPU 可显著加速版面检测和公式识别。

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 89 lines · 180 tokens per session scan A 970fe13c7c24

Subscribe to this mod's changes

mineru-pdf is a skill published in the GitHub repository hawkongz/mineru-pdf (10 stars, last pushed 3mo ago), licensed MIT. It adds 180 tokens to every session and 912 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mineru

An AI-Native skill for parsing PDF / Office / image files into clean Markdown with MinerU — a fast, zero-config document parser for AI agents. Works with NO token via the lightweight Agent API and auto-upgrades to the Standard API (token) for large files, batches, and DOCX/HTML/LaTeX export. Use when: (1) Converting…

Nebutra/MinerU-Skill · 137 tokens

pdf-table-to-excel

A workflow for turning tables in PDF files into Excel workbooks, with one sheet per table and supporting images and quality notes. It uses MinerU, a tool that extracts content from PDFs, and needs an image-reading model to check the results.

kujiangmudao/tablepack · 132 tokens

latex-formula-extraction

This skill covers extracting all standalone (display-mode) LaTeX formulas from a research paper PDF, formatting them as $$ ... $$ blocks, detecting syntax errors (bracket mismatches, typos), and writing corrected versions. The output is a markdown file with one formula per line.

EtaYang10th/spark-skills · 0 tokens

paddleocr-doc-parsing

A document-parsing tool configuration for extracting structured Markdown or JSON from complex PDFs and document images, including tables, formulas, charts, and multi-column pages.

PaddlePaddle/PaddleOCR · 140 tokens

paddleocr-text-recognition

An optical character recognition tool configuration for extracting text from images, photos, scans, screenshots, and scanned PDFs. OCR means converting text visible in an image into machine-readable text.

PaddlePaddle/PaddleOCR · 125 tokens

kordoc

A command-line and server tool for reading and creating Korean official documents, including HWP, HWPX, PDF, DOCX, and spreadsheet files. It can convert documents to Markdown and create or update HWPX files.

chrisryugj/kordoc · 253 tokens