Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    PDF to Markdown

    1

    PDF to Markdown step 1 of 2. Native text layer with table reconstruction, plus an OCR pass for scanned pages.

    Free

    Security scanned
    PDF to Markdown

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

    StepCommandResult
    Extractpython scripts/pdf_to_md.py report.pdf -o report.md62 pages, 41 tables
    OCRpython scripts/pdf_ocr.py report.pdf --pages 2-5,17,44-55 --append report.md18 pages recovered
    Rebuildpython scripts/clean_markdown.py report.md -o report_clean.md --level 21.4 M to 0.9 M chars, 3 split tables merged

    What changed in the rebuild

    1. Joined 214 paragraphs cut by the page margins.
    2. Removed 80 page numbers and the repeated running header.
    3. Merged 3 tables that were split across page breaks.
    4. 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

    Generated

    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-chunk splits 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.

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

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    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 forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    • Free with an Agensi account

    Requires

    Python 3.8+, `pip install -r scripts/requirements.txt` (PyMuPDF, pytesseract, Pillow). Tesseract engine only for scanned pages.
    macOS
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    **/*.pdf
    **/*.md
    **/output/**

    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.

    Listed8 days ago

    What's inside

    Frequently Asked Questions

    Two skills in one package: PDF to Markdown — Extract (with two scripts) and PDF to Markdown — Rebuild (with one script), plus the shared pipeline contract.

    Only if your PDFs contain scanned pages. A PDF with a real text layer needs nothing but PyMuPDF.

    Yes. Use --auto-chunk to split into ~50-page parts plus an index. Each part is small enough for a 128K context window.

    It merges tables split across pages and renames positional headers. Semantic column names are chosen by the agent, following the skill instructions.

    Yes. The OCR pass takes any Tesseract language (`--lang spa+eng`), and the level 3 rebuild needs an explicit `--lang es` to apply the Spanish formal-document rules. Both default to English; nothing language-specific runs implicitly.

    New in Workflow Automation