- Home
- Skills
- Workflow Automation
- PDF to Markdown
Works with the AI Agents you already use
PDF to Markdown
PDF to Markdown step 1 of 2. Native text layer with table reconstruction, plus an OCR pass for scanned pages.
Free
PDF to Markdown
Example session with this skill installed
Take this 80-page scanned report and give me Markdown I can edit. Tables matter — there is one on nearly every page.
- Read your context and instructions
- Compiled the pdf to markdown
- Generated the document
Summary
Ran the pack on report.pdf (80 pages, 62 with a text layer, 18 scanned).
| Step | Command | Result |
|---|---|---|
| Extract | python scripts/pdf_to_md.py report.pdf -o report.md | 62 pages, 41 tables |
| OCR | python scripts/pdf_ocr.py report.pdf --pages 2-5,17,44-55 --append report.md | 18 pages recovered |
| Rebuild | python scripts/clean_markdown.py report.md -o report_clean.md --level 2 | 1.4 M to 0.9 M chars, 3 split tables merged |
What changed in the rebuild
- Joined 214 paragraphs cut by the page margins.
- Removed 80 page numbers and the repeated running header.
- Merged 3 tables that were split across page breaks.
- Positional headers replaced; the agent then named them from the section titles.
Next steps
- Review the 18 OCR pages: character quality depends on the scan.
- Scanned tables keep their text but not their grid; rebuild those by hand.
report.pdf
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
A two-skill pack that turns a PDF into Markdown that actually reads like the document: text and tables extracted faithfully, then restructured.
Step 1 — Extract. PyMuPDF reads the native text layer, keeps table regions as Markdown tables and preserves reading order. Pages that are pure images are reported by number, and a second script renders and OCRs exactly those pages — so you do not pay OCR cost on a 200-page file that already has a text layer.
Step 2 — Rebuild. A deterministic regex pass joins paragraphs cut by the page margins, removes page numbers and repeated headers, renames positional table headers (| 0 | 1 | 2 | becomes | Col A | Col B | Col C |) and merges tables split by a page break. Level 3 rebuilds formal-document structure, but only for the language you declare with --lang: es adds VISTOS / CONSIDERANDO / RESUELVO sections, the ANÓTESE closing, signature cleanup and Distribución removal; en applies only the neutral rules. Level 3 refuses to run without it, so no language-specific pattern fires by accident.
What makes it different from a one-line "convert this PDF" prompt:
- Fidelity contract. No summarising, no paraphrasing, no silently fixing a number. Shared by both skills.
- Scanned pages handled on purpose, not as an afterthought: detect, report, OCR only those pages, append to the same file.
- Model-safe chunks.
--auto-chunksplits long PDFs into ~50-page parts plus an index, so a 300-page document never has to fit in one context window. - The messy second half is covered. Most PDF workflows stop at extraction; the readability problem is what actually costs the buyer time.
Compatibility: works with any agent that can run Python. Needs PyMuPDF; Tesseract only for scanned pages.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Workflow Automation.
Does not unlock password-protected PDFs.
Scanned tables recover their text, not their grid; the agent rebuilds the columns from context.
Handwriting is unreliable with Tesseract.
The rebuild step is conservative: it never rewrites a sentence, so a badly scanned page stays bad and is reported as such.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 8 days ago
- Free with an Agensi account
- Software
Python 3.8+pip
- Optional
- Tesseract
Permissions
File Scopes
Reads the PDF the user names and writes Markdown next to it or to the path given with -o. The output may contain personal data taken from the source document; the skill instructs the agent not to copy it into the conversation and not to move the file to shared folders, and nothing in the package sends data over the network. Runs local Python scripts. No network calls. The OCR script invokes the local Tesseract binary.