Skip to content
Automation
Skill

/pdf-conversion-router

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.

From plugin
lihongwei-cn
5200 skills1 agent

Claude Code

$ npx -y skills add LiHongwei-cn/lihongwei-cn --skill pdf-conversion-router --agent claude-code

SKILL.md

pdf-conversion-router.SKILL.md
name: pdf-conversion-router
description: 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.
risk: safe
source: community
date_added: "2026-05-23"
metadata:
  category: technique
  triggers: pdf conversion, convert pdf, pdf to markdown, pdf to html, pdf to text, pdf to json, pdf to docx, OCR pdf, slide deck pdf, medical pdf, scanned pdf

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: 1. classify the PDF 2. classify the target output 3. choose the strongest route for that combination 4. validate the result on representative sections 5. 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-pdf` is 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-pdf` cannot 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 off`

  • slide deck / PowerPoint export

`markdown-with-html + --image-output off` add `--table-method cluster` only 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 failure

  • narrative / article / letter

start with `markdown` or `text` use `markdown-with-html` only if structure clearly matters

  • table-heavy business / finance PDF

start with `markdown-with-html` add `--table-method cluster` when rows or columns flatten

  • scanned / image-heavy PDF

OCR first, then convert with `opendataloader-pdf`

  • mixed-layout PDF

prefer `markdown-with-html` validate 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-html`

Use 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.

  • `markdown`

Use only when clean plain Markdown matters more than layout fidelity.

  • `html`

Use when visual structure matters more than LLM readability.

  • `text`

Use for quick linear extraction, narrative documents, or when structure is unimportant.

  • `json`

Use when downstream machine processing matters more than human readability.

  • `docx`

Use 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-html`

  • For medical PDFs:

add `--table-method cluster`

  • For table-heavy PDFs:

add `--table-method cluster`

  • For slide decks:

start without `--table-method cluster` add it only after a structure check shows meaningful improvement if a pseudo-table is already collapsed inside one detected row, changing only the Markdown flavor usually will not fix it if the active engine build recovers the pseudo-table structure, prefer fixing residual boundary artifacts before escalating to hybrid/full mode

  • For conversions where images are not requested:

add `--image-output off`

  • For slide decks, medical reports, and structure-sensitive PDFs:

prefer validating both the command success and the actual rendered structure

  • For referts/reports where exact values matter:

validate key sections after conversion instead of trusting first pass

For medical or lab PDFs

Default route:

opendataloader-pdf -f markdown-with-html --table-method cluster --image-output off

Then verify:

  • main table headers
  • attachment of value, unit, and reference range
  • legends/comments separated from result rows

If a clinical table is flatten

Read more
@lihongwei-cn
Ships withlihongwei-cn

MUNDO - THE EMPEROR. Complete AI orchestration system with 1208 skills, 25 capability modules, self-evolving, collective consciousness. GitHub Actions 24/7 automation.

5200 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
5
Star history of LiHongwei-cn/lihongwei-cn on GitHub, a chart by star-history.com

Other skills on lihongwei-cn.

cheat-on-content

cheat-on-content

给所有想把"感觉"变成可校准预测的内容创作者。**方法论通用**——打分 → 盲预测 → T+3d 复盘 → 进化 rubric 的循环适用任何能被量化(播放 / 阅读 / 收听 / 点击)的内容。**rubric…

cheat-bump

cheat-bump

提议并执行 rubric 或 bucket 升级。两种模式:**完整 rubric bump**(最高风险动作,5 步强制 + 跨模型审核)和 **--bucket-only 轻量重校**(只换 bucket 边界,不动 rubric 公式)。**Phase…

cheat-init

cheat-init

cheat-on-content 的首次 onboarding 与脚手架创建器。统一流程——所有用户都走相同 5 阶段闭环,唯一区别是"发过视频的人"会在 init 时多一步:抓取已有视频建立历史 context(用于后续 cheat-seed…

cheat-migrate

cheat-migrate

把老用户的 .cheat-state.json 升级到当前 schema_version。读 migrations/registry.md 算迁移链,按顺序应用每一步迁移文件。幂等:跑两次结果一样。失败停在中间版本不前进。触发词:"迁移"/"升级…

cheat-persona

cheat-persona

从复盘评论数据派生 / 刷新账号的受众画像,写入 audience.md。这是和 rubric 平行的第二个派生物——rubric 答"怎么打分",persona 答"谁在看"。cheat-seed 选题 / 写稿时读它。**audience.md…

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about pdf-conversion-router.

Which coding agents can use pdf-conversion-router?
pdf-conversion-router installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.