Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/renky1025/agent-skillsnpx agentmods add skills/renky1025/agent-skills/pdf2mdWrote 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.00099 | $0.02040 |
| Opus 5 | $0.00049 | $0.01020 |
| Sonnet 5 | $0.00020 | $0.00408 |
| Haiku 4.5 | $0.00010 | $0.00204 |
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 9d 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 — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.
pdf2md: PDF 转 Markdown 铸造器
基于 OpenDataLoader PDF 的高精度 PDF 解析工具,将 PDF 完美转换为 Markdown 格式,特别适合 AI/RAG 工作流。
核心优势
- 业界最高准确率:Benchmark #1,综合 0.90,表格 0.93,阅读顺序 0.94
- 双模式架构:本地模式(0.05s/页) + 混合模式(AI增强,复杂PDF专用)
- 完整内容还原:表格、LaTeX公式、图片、多栏布局、标题层级
- 大文件友好:自动分页处理,支持批量文件夹处理
- 边界框坐标:每个元素都有坐标,支持溯源引用
使用方法
/pdf2md <PDF路径> [--output=<目录>] [--mode=fast|hybrid] [--extract-images=true|false] [--ocr] [--ocr-lang=<语言>]
参数说明
| 参数 | 说明 | 默认值 |
|---|---|---|
PDF路径 |
单个PDF文件或包含PDF的文件夹 | 必填 |
--output |
输出目录 | ~/Downloads/pdf2md-output/ |
--mode |
处理模式: fast(本地) 或 hybrid(AI增强) |
fast |
--extract-images |
是否提取图片 | true |
--ocr |
强制启用OCR(扫描版PDF) | false |
--ocr-lang |
OCR语言: en, ch_sim, ch_tra, ja, ko 等 |
en |
--formula |
提取数学公式为LaTeX(hybrid模式) | false |
--charts |
生成图表AI描述(hybrid模式) | false |
前置检查
在使用前,必须验证环境是否就绪:
# 1. 检查 Java 版本 (需要 11+)
java -version
# 2. 检查 Python 版本 (需要 3.10+)
python3 --version
# 3. 检查 OpenDataLoader 是否安装
pip show opendataloader-pdf
# 4. 检查 hybrid 模式依赖 (如果使用)
pip show opendataloader-pdf[hybrid]
使用 pdf2md CLI 工具
# 基础转换
python3 pdf2md/pdf2md.py document.pdf
# Hybrid 模式(高质量,支持复杂表格/公式)
python3 pdf2md/pdf2md.py document.pdf --mode=hybrid
# 扫描版PDF(带OCR)
python3 pdf2md/pdf2md.py scan.pdf --mode=hybrid --ocr --ocr-lang=ch_sim
# 学术论文(含公式)
python3 pdf2md/pdf2md.py paper.pdf --mode=hybrid --formula
# 批量处理文件夹
python3 pdf2md/pdf2md.py ./pdfs/ --mode=hybrid --output=./output/
# 检查环境
python3 pdf2md/pdf2md.py --check
# 安装依赖
python3 pdf2md/pdf2md.py --install
CLI 参数说明
参数:
input PDF文件或文件夹路径
可选参数:
-o, --output 输出目录 (默认: ~/Downloads/pdf2md-output)
-m, --mode 处理模式: fast 或 hybrid (默认: fast)
--no-images 不提取图片
--ocr 启用OCR (扫描版PDF)
--ocr-lang OCR语言 (默认: en, 可选: ch_sim/ch_tra/ja/ko)
--formula 提取数学公式为LaTeX (hybrid模式)
--charts 生成图表AI描述 (hybrid模式)
--port Hybrid后端端口 (默认: 5002)
--check 仅检查环境依赖
--install 安装/更新依赖
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.
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.
- 9d ago First seen · 215 lines · 99 tokens per session scan A cdb286fc1e77
pdf2md is a skill published in the GitHub repository renky1025/agent-skills (10 stars, last pushed 10d ago), licensed MIT. It adds 99 tokens to every session and 2,040 once invoked, about $0.0005 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
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.
Process PDF files - extract text, create PDFs, merge documents. Use when user asks to read PDF, create PDF, or work with PDF files.
A set of instructions for working with PDF files, which are documents designed to preserve their layout across devices.