Prepare agent-ready PDF and document extraction with PyMuPDF
Use PyMuPDF to extract text, layout metadata, tables, images, Markdown, or JSON from PDFs and documents before an agent ingests or reviews them.
npx skills add agentskillexchange/skills --skill prepare-agent-ready-pdf-and-document-extraction-with-pymupdf
Use PyMuPDF when an agent workflow needs a repeatable preprocessing step for PDFs or document files before retrieval, review, extraction, or downstream automation. The agent/operator opens bounded document sets, extracts text with page and layout metadata, converts pages to Markdown or JSON for RAG, handles tables and images where needed, and passes structured outputs to the next workflow. Invoke this instead of opening documents manually when the job is deterministic document ingestion, evidence extraction, or corpus preparation at scale. The boundary is document extraction and conversion for agent-ready inputs; it is not a general PDF editing library listing or an OCR product card.
What this skill actually does
Inputs and prerequisites: Python 3.10+, PyMuPDF, source PDFs or supported document files, and optional pymupdf4llm or Tesseract OCR for LLM-ready Markdown or scanned pages..
Setup notes: Install with pip install pymupdf. For LLM/RAG-oriented Markdown or JSON extraction, also install pymupdf4llm; for scanned-page OCR, install Tesseract separately and configure the extraction workflow to emit reviewed text, Markdown, or JSON outputs.
Source and verification boundary: use https://pymupdf.readthedocs.io/ as the canonical reference before running the workflow; keep commands, API calls, CLI usage, and generated outputs reviewable against that upstream source.
Framework fit: publish this as a Multi-Framework workflow only when the operator can invoke the documented toolchain directly, rather than treating the upstream project as a generic product listing.