pdf2md

pdf2md is a skill for Claude Code from renky1025/agent-skills. It costs 99 tokens per session (2,040 once invoked), scanned A, original, MIT.

A PDF-to-Markdown converter for extracting text and structure from PDF files. Markdown is plain text with simple symbols for headings, tables, links, and other formatting.

In plain words
What is it for?
It helps convert individual PDFs or folders, extract images, process scanned documents with OCR, preserve formulas as LaTeX, and produce descriptions of charts in its AI-assisted mode.
Why use it?
It saves time when converting complex or scanned PDFs while retaining elements such as tables, formulas, images, columns, and heading levels.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 pdf2md/pdf2md.py ./pdfs/ --mode=hybrid --output=./output/.

Good fit It helps convert individual PDFs or folders, extract images, process scanned documents with OCR, preserve formulas as LaTeX, and produce descriptions of charts in its AI-assisted mode.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/renky1025/agent-skills
agentmods
npx agentmods add skills/renky1025/agent-skills/pdf2md

Made for: Claude Code.

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 pdf2md

README.md
[![agentmods](https://agentmods.dev/badge/skills/renky1025/agent-skills/pdf2md/github.svg)](https://agentmods.dev/skills/renky1025/agent-skills/pdf2md)
Your own site
<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.

agentmods 80×15 button for pdf2md

Your own site · 80×15
<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>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,040 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00099 $0.02040
Opus 5 $0.00049 $0.01020
Sonnet 5 $0.00020 $0.00408
Haiku 4.5 $0.00010 $0.00204

Measured 9d ago against content hash cdb286fc1e77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (pdf2md.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

pdf2md/SKILL.md · 215 lines

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             安装/更新依赖

Read the full file on GitHub · 215 lines

Files

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.

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. 9d ago First seen · 215 lines · 99 tokens per session scan A cdb286fc1e77

Subscribe to this mod's changes

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.