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 skills add renky1025/agent-skills --skill pdf2mdgit clone --depth 1 https://github.com/renky1025/agent-skillsWrote 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/renky1025/agent-skills/pdf2md)<a href="https://agentmods.dev/skills/renky1025/agent-skills/pdf2md"><img src="https://agentmods.dev/badge/skills/renky1025/agent-skills/pdf2md/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.
<a href="https://agentmods.dev/skills/renky1025/agent-skills/pdf2md"><img src="https://agentmods.dev/badge/skills/renky1025/agent-skills/pdf2md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00190 | $0.02101 |
| Opus 5.5 | $0.00076 | $0.00840 |
| Sonnet 5.5 | $0.00038 | $0.00420 |
| Haiku 4.5 | $0.00019 | $0.00210 |
Grade A, and why
pdf2md 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pdf2md: PDF 转 Markdown 铸造器
Purpose
把一个 PDF 文件或一整个 PDF 文件夹转成可直接用于 AI / RAG 工作流的 Markdown:正文、表格、
LaTeX 公式、图片与标题层级一站式还原,并额外产出带边界框坐标的结构化 JSON 与处理摘要。
底层由 scripts/pdf2md.py 驱动 OpenDataLoader PDF。
When to Use
- 用户要把 PDF 转成 Markdown / 纯文本 / 结构化 JSON。
- 用户要从 PDF 里提取表格、公式或图片,或需要溯源坐标。
- 用户要批量转换一个目录下的多个 PDF。
- 用户要处理扫描版 PDF(需要 OCR)。
- 触发词:PDF 转 Markdown、pdf 转 md、PDF 提取文字/表格/公式、扫描件 OCR、批量转换 PDF、 pdf2md、convert PDF to markdown、extract PDF tables/formulas。
When NOT to Use
- 简单数字版 PDF、只需快速读一遍内容 -> 当前模型可直接读取该 PDF 并输出 Markdown,
不必安装 OpenDataLoader 工具链(见
references/upstream.md的「备选方案」)。 - 要处理的是 Word / PPT / HTML 等非 PDF 格式 -> 用各自的转换路径,不是本技能。
- 目标是把 PDF 内容纳入本地互链知识库 -> 优先用
obsidian-kb-builder。 - 用户只想看 PDF 的某几页摘要、不要结构化产物 -> 直接读取并回答。
Workflow
- 前置检查:
java -version(需 11+)、python3 --version(需 3.10+)、pip show opendataloader-pdf。也可直接跑python3 <skill>/scripts/pdf2md.py --check。 缺依赖时脚本会自动安装;也可显式--install。 - 选模式:按
## Decision Rules决定fast还是hybrid,以及是否需要--ocr/--formula/--charts。 - 执行转换:
python3 <skill>/scripts/pdf2md.py <PDF路径|文件夹> [--output=<目录>] [-m fast|hybrid] [--ocr --ocr-lang=ch_sim] [--formula] [--charts] [--no-images]
- 核对输出:确认输出目录里有
*.md、*.json、summary.json、images/, 且图片数量与summary.json一致。结构与样例见examples/sample-output.md。 - 报告结果:给出实际输出目录与文件清单(取自 CLI 打印与
summary.json,不要臆测路径)。
Decision Rules
模式选择:
- 简单数字版 PDF、无复杂表格 ->
--mode=fast(默认,约 0.05s/页,无额外依赖)。 - 复杂/无边框表格、多栏布局、公式、图表描述、扫描件 ->
--mode=hybrid。 - 批量目录内 PDF 超过 10 个 ->
--mode=hybrid;实测量级与准确率见references/performance.md。
附加开关:
- 扫描版 PDF ->
--ocr(必须与hybrid同用);中文用--ocr-lang=ch_sim, 另支持ch_tra/ja/ko,默认en。 - 需要 LaTeX 公式 ->
--formula(hybrid 模式)。 - 需要图表 AI 描述 ->
--charts(hybrid 模式)。 - 不需要图片 ->
--no-images(默认提取图片)。 - hybrid 后端端口被占用 ->
--port(默认 5002)。
失败分流:
- 内存不足 -> 降级到
fast(CLI 会自动做,并在日志中提示)。 - 加密 PDF -> 停止,要求用户先解密;不要尝试绕过。
- 表格错乱 / 公式异常 / 扫描件识别差 / 图片缺失 -> 读
references/troubleshooting.md。 - 需要装依赖或核对上游出处 -> 读
references/upstream.md。
What ships with it
5 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.
- 1mo ago Changed · -83 lines · +91 tokens per session 7c7c65205b9d
- 1mo ago First seen · 215 lines · 99 tokens per session scan A cdb286fc1e77
pdf2md is a skill published in the GitHub repository renky1025/agent-skills (11 stars, last pushed 15d ago), licensed MIT. It adds 190 tokens to every session and 2,101 once invoked, about $0.0008 per session on Opus 5.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
iflytek-ocr-invoice
An image-reading tool that extracts structured information from Chinese invoices, receipts, bills, and tickets. OCR means turning text in a photo or scan into computer-readable data.
iflytek-pdf-image-ocr
AI-powered OCR service for images and PDF documents using iFlytek's advanced recognition APIs.
arxiv
Two complementary tools: queryarxiv (text search, returns JSON list inline) + downloadarxivpaperbyid (fetches the actual paper as PDF / HTML / source tarball to disk).
dashi-ppt
A presentation-making tool that creates offline HTML slide decks in preset visual themes. The slides can be edited in a browser and exported as PPTX or PDF files.
A set of instructions for working with PDF files, which are documents designed to preserve their layout across devices.
Process PDF files - extract text, create PDFs, merge documents. Use when user asks to read PDF, create PDF, or work with PDF files.