pdf-conversion-router
它能做什么
这个智能体可以把 PDF 文件转换成文本、Markdown 或 HTML 等其他格式。它会选择最合适的方法,让输出结果尽可能接近原文,并且易于阅读。
适用场景
- ✓我想把 PDF 转换成纯文本。
- ✓我需要把医疗报告 PDF 转换成易读的格式。
- ✓我想把幻灯片 PDF 转换成 Markdown。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/pdf-conversion-router/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“把这份财务报告 PDF 转换成 HTML,并保留表格结构。”
每周 5 个新技能,1 分钟读完。
工作原理
首先,智能体会分析 PDF 的类型和你想要的输出格式。然后,它会选择最合适的工具和设置进行转换,确保结构和数据都被完整保留。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
PDF Conversion Router
Route every PDF conversion through a short analysis step before choosing tools or CLI flags.
The goal is not "extract the most text". The goal is:
- preserve structure
- preserve attachment between labels and values
- choose the most faithful output shape
- avoid noisy defaults when a better route exists
When to Use
- The user wants a PDF converted into another format.
- The requested output is
.md,.html,.txt,.json,.docx, or structured notes. - The PDF may be scanned, OCR-heavy, table-heavy, slide-based, medical, academic, or multi-column.
Core Rule
Never start with one fixed default pipeline.
Always:
- classify the PDF
- classify the target output
- choose the strongest route for that combination
- validate the result on representative sections
- if needed, retry with better settings before delivering
Heuristics are starting points, not guarantees.
Do not promote one flag combination into a universal default just because it worked well on one PDF. Prefer document-specific evidence over habit.
Primary Engine Rule
Use opendataloader-pdf as the primary conversion engine for every PDF conversion task by default.
This skill should assume:
opendataloader-pdfis always the first conversion attempt- other tools are used to classify, validate, OCR, inspect, or support cleanup
- other extractors are not the default replacement for the main conversion route
Use other tools only for one of these reasons:
- quick classification of the PDF
- OCR preprocessing before conversion
- validation against layout-preserving text
- manual repair when the generated output is still noisy
- fallback only if
opendataloader-pdfcannot produce a usable result
Step 1: Classify the Source PDF
Identify the document class as quickly as possible:
- Native digital PDF with selectable text
- OCR PDF with noisy text
- Image-only/scanned PDF
- Slide deck / presentation export
- Medical or lab report
- Table-heavy business/finance document
- Narrative report / letter / article
- Mixed layout document with diagrams, tables, and prose
Useful fast checks:
pdfinfo input.pdf
pdftotext -layout input.pdf -
If text is missing or very poor, treat OCR as required.
Document-Type Heuristics
Use these as default starting points:
medical / lab report
markdown-with-html + --table-method cluster + --image-output offslide deck / PowerPoint export
markdown-with-html + --image-output offadd--table-method clusteronly if the default route under-structures important tabular content if tables are visually obvious but missing or badly fused, treat this as a detection problem, not a Markdown formatting problem if the selected route already reconstructs a real table but clips leading characters at column boundaries, treat that as a boundary-splitting defect, not a missing-table failurenarrative / article / letter start with
markdownortextusemarkdown-with-htmlonly if structure clearly matterstable-heavy business / finance PDF start with
markdown-with-htmladd--table-method clusterwhen rows or columns flattenscanned / image-heavy PDF OCR first, then convert with
opendataloader-pdfmixed-layout PDF prefer
markdown-with-htmlvalidate one easy section and one hard section before accepting output
Step 2: Choose the Output Shape
Pick the output that best matches the document and the user's goal.
markdown-with-htmlUse by default when the user wants Markdown and fidelity matters. Prefer this for tables, medical reports, slides, mixed-layout PDFs, and anything likely to break in pure Markdown.markdownUse only when clean plain Markdown matters more than layout fidelity.htmlUse when visual structure matters more than LLM readability.textUse for quick linear extraction, narrative documents, or when structure is unimportant.jsonUse when downstream machine processing matters more than human readability.docxUse when the user wants editable office output and layout reconstruction matters.
Step 3: Choose the Extraction Route
For OpenDataLoader CLI
Use OpenDataLoader as the default route.
Preferred defaults:
For Markdown output with fidelity priority:
-f markdown-with-htmlFor medical PDFs: add
--table-method clusterFor table-heavy PDFs: add
--table-method clusterFor slide decks: start without
--table-method cluster
…
常见问题
'fidelity' 是什么意思?
fidelity 指的是最终输出与原始文档在结构和信息上的相似程度,也就是“保真度”。
什么是 'OCR'?
OCR(光学字符识别)是一种从图像中提取文字的技术,比如扫描版 PDF 就需要用到它。
为什么智能体不总是使用相同的设置?
每个 PDF 都不一样,所有文件都用同一套设置,效果可能不好。智能体会针对每个具体情况选择最佳方法。
详情
作者的原始描述
Use when converting a PDF into another format such as Markdown, HTML, text, JSON, DOCX, or structured notes and the agent must choose the best extraction route, settings, and cleanup strategy for maximum fidelity and readability.
热度
- GitHub 星标
- 48k
- 排名
- #5418
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。