mineru-pdf

mineru-pdf is a skill for Claude Code, Codex from malue-ai/dazee-small. It costs 24 tokens per session (629 once invoked), scanned A, original, MIT.

A local PDF parser that converts documents into structured Markdown or JSON while preserving headings, tables, and lists.

In plain words
What is it for?
Converting PDFs, extracting structured text, processing batches of documents, and retrieving images and metadata.
Why use it?
It extracts usable document structure without sending the PDF to a remote service; it can also process scanned PDFs with OCR.

Skill for Claude CodeCodex

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

Good fit Converting PDFs, extracting structured text, processing batches of documents, and retrieving images and metadata.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/malue-ai/dazee-small/mineru-pdf
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 malue-ai/dazee-small --skill mineru-pdf
Clone the repo
git clone --depth 1 https://github.com/malue-ai/dazee-small

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/malue-ai/dazee-small/mineru-pdf/github.svg)](https://agentmods.dev/skills/malue-ai/dazee-small/mineru-pdf)
Your own site
<a href="https://agentmods.dev/skills/malue-ai/dazee-small/mineru-pdf"><img src="https://agentmods.dev/badge/skills/malue-ai/dazee-small/mineru-pdf/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/malue-ai/dazee-small/mineru-pdf"><img src="https://agentmods.dev/badge/skills/malue-ai/dazee-small/mineru-pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 629 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.00024 $0.00629
Opus 5 $0.00012 $0.00315
Sonnet 5 $0.00005 $0.00126
Haiku 4.5 $0.00002 $0.00063

Measured 10d ago against content hash 295ed4badf7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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.

instances/xiaodazi/skills/mineru-pdf/SKILL.md · 86 lines

What it actually says

MinerU PDF 解析

本地解析 PDF 文档为结构化 Markdown 或 JSON,保留标题层级、表格、列表等结构。CPU 运行,数据不出本机。

使用场景

  • 用户说「帮我把这个 PDF 转成 Markdown」「提取这个 PDF 的内容」
  • 需要从 PDF 中提取结构化文本用于后续分析
  • 扫描件 PDF 需要 OCR 提取文字(配合 OCR 类 Skill)
  • 批量处理多个 PDF 文件

与其他 PDF 处理 Skill 的区别

工具 擅长 局限
nano-pdf 简单文本提取、PDF 元数据 不保留结构
pdf-toolkit 合并/拆分/加密/水印 不做内容解析
mineru-pdf 结构化解析(标题/表格/列表) 安装包较大

优先使用 mineru-pdf 做内容提取,pdf-toolkit 做文件操作。

执行方式

安装

pip install magic-pdf

基本用法

magic-pdf -p /path/to/document.pdf -o /path/to/output/ -m auto

参数说明:

  • -p:输入 PDF 路径
  • -o:输出目录
  • -m:模式选择
    • auto:自动判断(推荐)
    • txt:纯文本 PDF
    • ocr:扫描件 PDF

Python API

from magic_pdf.data.data_reader_writer import FileBasedDataWriter, FileBasedDataReader
from magic_pdf.pipe.UNIPipe import UNIPipe

reader = FileBasedDataReader("")
writer = FileBasedDataWriter(output_dir)

pdf_bytes = reader.read(pdf_path)
pipe = UNIPipe(pdf_bytes, model_list=[], image_writer=writer)
pipe.pipe_classify()
pipe.pipe_analyze()
pipe.pipe_parse()
md_content = pipe.pipe_mk_markdown(image_dir, drop_mode="none")

输出内容

解析后在输出目录生成:

  • *.md:Markdown 格式的结构化内容
  • images/:提取的图片
  • *.json:结构化元数据

输出规范

  • 保留原文档的标题层级(H1-H6)
  • 表格转换为 Markdown 表格
  • 图片提取并以 ![](path) 引用
  • 页码标注在章节末尾
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. 10d ago First seen · 86 lines · 24 tokens per session scan A 295ed4badf7a

Subscribe to this mod's changes

mineru-pdf is a skill published in the GitHub repository malue-ai/dazee-small (36 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 629 once invoked, about $0.0001 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