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.
npx agentmods add skills/mrsgsa/math-modeling-skill-dify/pdf-batchnpx skills add MrSGSA/math-modeling-skill-dify --skill pdf-batchgit clone --depth 1 https://github.com/MrSGSA/math-modeling-skill-difyWrote 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.
[](https://agentmods.dev/skills/mrsgsa/math-modeling-skill-dify/pdf-batch)<a href="https://agentmods.dev/skills/mrsgsa/math-modeling-skill-dify/pdf-batch"><img src="https://agentmods.dev/badge/skills/mrsgsa/math-modeling-skill-dify/pdf-batch.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00082 | $0.00740 |
| Opus 5 | $0.00041 | $0.00370 |
| Sonnet 5 | $0.00016 | $0.00148 |
| Haiku 4.5 | $0.00008 | $0.00074 |
Grade A, and why
pdf-batch 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 4d 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.
What it actually says
文档批量转 Markdown
调用 scripts/batch_convert.py 和 MinerU。保持输入文档只读,将结果写入 PROJECT_ROOT。旧式 .doc 先转换为 .docx。
输入目录、Markdown 输出目录和多模态包输出目录必须彼此分离,既不能相同也不能互相嵌套;否则递归发现可能把上次产物再次当作输入,工具会拒绝运行。
环境与运行
MinerU 在 Windows 上要求 Python 3.10 至 3.12。本机默认 Python 可以用于启动批处理,但 MinerU 应使用 uv 建立的独立 Python 3.12 工具环境:
uv tool install --python 3.12 "mineru[all]"
安装体积较大,未经用户同意不要自动安装或下载模型。在 PROJECT_ROOT 中运行:
python <SKILL_ROOT>\tools\pdf-batch\scripts\batch_convert.py --input knowledge_inbox\pdf --output knowledge_ready
默认使用支持纯 CPU 的 pipeline 后端。可用 --backend auto 切换默认后端,--dry-run 只检查计划,--force 强制重新转换。
推荐单次高精度转换同时生成文本库与图片库成品:
python <SKILL_ROOT>\tools\pdf-batch\scripts\batch_convert.py --input <文档目录> --output <多模态包目录> --markdown-output <Markdown目录> --backend auto --effort high --image-analysis --dify-multimodal
此模式对每份文档只调用一次 MinerU,同时发布:
- 纯 Markdown:保留公式和图表分析文字、移除无法上传的本地图片链接,用于现有文本知识库。
.dify-mm.zip:包含manifest.json、document.md和唯一命名的原图,用于配套 Dify 插件和统一多模态图片库。该包只索引含图片的块,正文仍由文本库负责。
只有两份成品都存在且不早于源文档时才跳过。中间 JSON、布局结果和临时目录在单篇完成后自动清理。
只需要一个 Markdown 时仍可使用 --md-only。
输出与检查
- 图片名包含源文档哈希、图序号和图片哈希;插件再按清单路径与 SHA-256 校验,避免跨论文串图。
- 同名且同扩展名的源文档会在输出名中加入内容哈希,避免覆盖。
- batch_report.json 记录源文件 SHA-256、命令、状态、耗时和输出。
- dify_upload_list.txt 列出成功生成的 Markdown,供用户手动上传。
- conversion.log 保存每篇文档的 MinerU 输出。
重复运行时跳过未变化且两份成品均已存在的文件。文本 Markdown 上传普通知识库;.dify-mm.zip 只上传统一多模态图片库。
What ships with it
2 files 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.
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.
- 4d ago First seen · 46 lines · 82 tokens per session scan A e923c87ec376
pdf-batch is a skill published in the GitHub repository MrSGSA/math-modeling-skill-dify (4 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 740 once invoked, about $0.0004 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.
Other skills, from other repositories
markdown-exporter
Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.
liteparse
Parse documents into LLM-ready content entirely on the local machine — PDF / DOCX / XLSX / PPTX / images → Markdown, structured JSON (with bounding boxes), or page screenshots, via the lit CLI. No cloud, no LLM, works offline. Use whenever the user attaches or points to a document that must be read before reasoning…
office-artifacts
Generate real DOCX, PPTX, XLSX, PDF, CSV files using python-docx / python-pptx / openpyxl / reportlab by writing them into the dispatch artifacts dir, then explicitly deliver each one with cloud deliver . Use whenever the user asks for documents, slides, spreadsheets, reports, or PDFs.
cli-anything-wps
WPS Office CLI — JSON数据驱动PPT自动生成 + 命令行操控WPS文字/表格/演示文稿.
feishu-cli-docs
飞书文档统一入口,覆盖读取和分析 docx/wiki/sheet、创建与编辑文档、Markdown 导入、 docx/wiki/sheet 导出 Markdown/PDF/Word/Excel,以及云盘原生 .md 文件 CRUD。用户要求阅读、 总结、创建、追加、覆盖、替换或删除文档内容,把 Markdown 导入飞书并转换 Mermaid/PlantUML/SVG、 下载图片或导出本地文件、 比较、覆盖或查找替换原生 Markdown 时必须使用本 Skill。 本 Skill 只处理正文内容和文档/Markdown 文件转换。明确禁止用于文档评论、二进制文件导入、 云盘目录和权限管理,这些使用…
doc-cleaner
Convert PDF, DOCX, XLSX, and text files to clean, structured Markdown. CJK-friendly, table-friendly, privacy-first.