Skip to content
Development
Skill

/oma-pdf

Extract PDF text, headings, tables, and images into Markdown using

From plugin
oma
1.4k33 skills24 agents19 commands4 hooks
+1

Claude Code

$ npx -y skills add first-fluke/oh-my-agent --skill oma-pdf --agent claude-code

SKILL.md

oma-pdf.SKILL.md
name: oma-pdf
description: Extract PDF text, headings, tables, and images into Markdown using
  opendataloader-pdf. Use for PDF parsing, not PDF layout creation.

PDF Skill - PDF to Markdown Conversion

Scheduling

Goal

Convert PDF files into structured Markdown or another requested extraction format while preserving readable document structure for LLM context, RAG, or downstream review.

Intent signature

  • User asks to convert, parse, read, extract, or transform a PDF.
  • User needs PDF text, headings, lists, tables, or images prepared for AI consumption.
  • User mentions "PDF to markdown", "parse PDF", "read this PDF", or equivalent wording.

When to use

  • Converting PDF documents to Markdown for LLM context or RAG
  • Extracting structured content such as tables, headings, lists, images, footnotes, or hyperlinks
  • Preparing PDF data for AI consumption
  • Checking whether a PDF has a text layer before choosing OCR

When NOT to use

  • Generating or creating PDFs -> use document-generation tools
  • Editing existing PDFs -> out of scope
  • Reading an already-text file -> use direct file reading
  • Processing HWP, HWPX, DOCX, XLSX, or slide decks -> use the matching document skill

Expected inputs

  • `input_path`: PDF file or folder path
  • `output_dir`: optional target directory
  • `format`: optional output format, default `markdown`
  • `ocr_languages`: optional OCR language list for scanned or image-based PDFs
  • `extraction_options`: optional flags for tagged structure, image extraction, or hybrid conversion

Expected outputs

  • Markdown, text, JSON, HTML, or combined extraction output
  • Normalized Markdown when Markdown is produced
  • A short report with output path, page count, and conversion issues

Dependencies

  • `uvx opendataloader-pdf` for standard conversion
  • `uvx --from "opendataloader-pdf[hybrid]" opendataloader-pdf-hybrid` for OCR or hybrid conversion (the hybrid server is a console script of the `[hybrid]` extra, not a standalone package)
  • `uvx mdformat` for Markdown normalization
  • Local filesystem access to input and output paths
  • Optional OCR runtime via the hybrid server

Control-flow features

  • Branches on text-layer quality, tagged PDF availability, scan/OCR needs, and user-requested output format
  • Calls external CLI tools through `uvx`
  • Reads local files and writes local extraction outputs
  • Uses a hybrid server only when OCR or complex extraction needs justify it

Structural Flow

Entry

1. Confirm that the input path exists and is a PDF file, PDF folder, or supported batch input. 2. Check file size and warn when the input is large enough to risk slow conversion or memory pressure. 3. Resolve `output_dir` and the expected output filename.

Scenes

1. **PREPARE**: Validate the input path, output target, and requested extraction options. 2. **ACQUIRE**: Assess whether the PDF has a readable text layer by extracting a text preview. 3. **ACT**: Convert using standard mode, tagged-structure mode, or hybrid OCR mode. 4. **VERIFY**: Run `mdformat` for Markdown output and inspect the result for readable structure. 5. **FINALIZE**: Report output path, page count, format, and any extraction quality issues.

Transitions

  • If the preview text is readable, use standard conversion.
  • If the PDF is tagged and standard output is garbled, retry with `--use-struct-tree`.
  • If tables are missing or broken, retry with `--table-method cluster` or `--markdown-with-html` before escalating to hybrid mode.
  • If the PDF is scanned or image-based, start or reuse the hybrid OCR server and convert with hybrid mode.
  • If conversion fails because the PDF is encrypted, stop and ask for the password or an unlocked copy.
  • If conversion hits memory or size limits, process smaller page ranges into distinct output directories (or append `--to-stdout`) so repeated runs do not overwrite the same basename.
  • When a transition above leaves standard conversion, record the selected mode with subject `pdf.route-selection` per `references/_shared/runtime/route-selection.md` (mode, and the probe or output defect that required it).

Failure and recovery

| Failure | Recovery | |---------|----------| | `uvx` unavailable | Ask user to install `uv` before conversion | | `opendataloader-pdf-hybrid` not found | Invoke via `uvx --from "opendataloader-pdf[hybrid]" opendataloader-pdf-hybrid`; the bare package name does not exist on PyPI | | Password-protected PDF | Ask for password or unlocked PDF | | Garbled output | Retry with tagged structure or hybrid mode | | Missing tables | Retry with `--table-method cluster` or `--markdown-with-html` first; hybrid mode for scanned tables | | OCR language mismatch | Retry with explicit OCR languages, for example `ko,en` | | Large file or memory pressure | Split into page ranges using distinct output directories or `--to-stdout`; never reuse one output directory for the same basename |

Exit

  • Success: output file exists, Markdown is formatted when applicable, and extracted structure is readable.
  • Partial success: output exists but quality issues are reported explicitly.
  • Failure: no reliable output is produced and the blocking cause is reported.

Logical Operations

Actions

| Action | SSL primitive | Evidence | |--------|---------------|----------| | Validate path and options | `VALIDATE` | Input preflight in execution protocol | | Probe text layer | `READ` | Text preview extraction | | Choose conversion strategy | `SELECT` | Standard, tagged, or hybrid mode decision | | Run converter | `CALL_TOOL` | `uvx opendataloader-pdf` | | Start OCR server | `CALL_TOOL` | `uvx --from "opendataloader-pdf[hybrid]" opendataloader-pdf-hybrid` | | Write output artifact | `WRITE` | Markdown, text, JSON, or HTML output | | Normalize Markdown | `CALL_TOOL` | `uvx mdformat` | | Inspect extraction quality | `VALIDATE` | Structure/readability verification | | Report result | `NOTIFY` | Final user-facing summary |

Tools and instruments

Read more
@first-fluke
Ships withoma

Ship 400+ commits a day.

1.4k33 skills24 agents3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.4k
Star history of first-fluke/oh-my-agent on GitHub, a chart by star-history.com

Other skills on oma.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about oma-pdf.

Which coding agents can use oma-pdf?
oma-pdf 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.