# Mineru

> |

- **Type:** Skill
- **Install:** `agentstack add skill-woodfishhhh-ez-math-model-mineru`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [woodfishhhh](https://agentstack.voostack.com/s/woodfishhhh)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [woodfishhhh](https://github.com/woodfishhhh)
- **Source:** https://github.com/woodfishhhh/EZ_math_model/tree/main/skills/ez-math-model/tools/mineru

## Install

```sh
agentstack add skill-woodfishhhh-ez-math-model-mineru
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# mineru — PDF 高质量解析

## 何时使用

- 题目 PDF 含中文 + 表格 + 公式（pdfplumber 输出乱序时）
- 阅读 `external/zhanwen-mathmodel/` 下的优秀论文
- 转换 docx / pptx 为 markdown

## 入口

本子 skill **不**自带 Python 实现；调用宿主已安装的 `mineru-open-api` CLI
或 `mineru` Python 包。详细 CLI 文档见 [mineru 官方 skill](https://github.com/opendatalab/MinerU)。

## 模式选择决策树

```
文件 ≤ 10MB 且 ≤ 20页 且 不需表格识别
  → flash-extract（零配置、最快）

文件 > 10MB 或 > 20页 或 需要表格 / 公式 / OCR
  → extract（要 token，注册免费领）
  → 备用：本地 CLI mineru（开源，自动下载模型）
```

## 命令模板

```powershell
# Flash 模式（推荐起手）
mineru-open-api flash-extract problem.pdf -o workdir/.../out --language ch

# 限页（>20 页时）
mineru-open-api flash-extract problem.pdf -o workdir/.../out --language ch --pages 1-20

# Extract 精确模式（需 token；写入 EZMM_MINERU_TOKEN）
mineru-open-api auth                         # 一次性配置
mineru-open-api extract problem.pdf -o workdir/.../out --language ch --table --formula

# 本地 CLI（无 token，开源版）
pip install -U mineru
mineru -p problem.pdf -o workdir/.../out
```

## 入参约定

| 参数 | 默认 | 说明 |
|---|---|---|
| `--language` | `ch` | 中文文档；英文用 `en`；混合 `ch_server` |
| `--pages` | 全部 | flash 模式下题目 > 20 页时按 `1-20` 分批 |
| `-o` | stdout | 写入指定目录（推荐）；不写参数则 markdown 走 stdout |

## 配置

| Env Var | 必需 | 用途 |
|---|---|---|
| `EZMM_MINERU_TOKEN` | extract 模式必需 | 注册免费领，flash 不需要 |

## 失败诊断

| 错误 | 原因 | 处理 |
|---|---|---|
| `file page count exceeds API limit` | flash 限 20 页 | 加 `--pages 1-20`；或换 extract（要 token） |
| `TLS handshake timeout` | 网络抖动 | 重试 1 次；仍失败降级 pdfplumber |
| `no API token found` | extract 缺 token | 调 `mineru-open-api auth` 或 fallback flash |
| 输出 Markdown 含大量 `` | 论文图片占位 | 正常；只对文字部分有效 |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [woodfishhhh](https://github.com/woodfishhhh)
- **Source:** [woodfishhhh/EZ_math_model](https://github.com/woodfishhhh/EZ_math_model)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-woodfishhhh-ez-math-model-mineru
- Seller: https://agentstack.voostack.com/s/woodfishhhh
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
