Claude Skills for PDF: Extract, Fill, Merge, OCR, and Generate Real Files
PDF is the format everyone has to deal with and nobody enjoys: invoices, contracts, statements, scanned forms, hundred-page reports. Claude can read a PDF you upload — but reading is only half the job. A PDF skill lets Claude operate on the file: merge, split, fill, extract, OCR, and generate real documents. Here is how that works, and why the skill approach is dramatically more reliable than prompting.
Reading a PDF vs working with PDFs
Drop a PDF into a chat and Claude will happily summarize it, pull out the key numbers, or answer questions about clause fourteen. That is document comprehension, and it needs no skill at all.
What comprehension cannot do is give you a file back. Merging six PDFs into one, filling a form with three hundred rows of data, splitting a report by chapter, stamping a watermark on every page, OCR-ing a stack of scans so they become searchable — these are file operations. They are deterministic, they have exactly one correct answer, and a language model approximating them is the wrong tool. So a well-built PDF skill does not ask Claude to approximate: it ships the code.
What a PDF skill actually contains
A skill is a folder — .claude/skills/pdf/SKILL.md plus whatever it bundles. The markdown holds the routing logic and the scripts do the work. Anthropic's open-source document skills are the reference implementation of this pattern, and it looks roughly like this:
- A description that triggers on real situations — anything involving a .pdf file, extracting text or tables, merging, splitting, filling a form, or producing a PDF as the deliverable.
- A decision tree in the body. Is the PDF text-based or scanned? Does it have a form layer, or does the form need to be filled by overlay? Is the task extraction, transformation, or creation? Each branch points at a different tool.
- Bundled Python scripts using the standard libraries — pypdf and friends for structure, an OCR engine for scans, a rendering library for generation.
- Explicit failure handling. If text extraction returns almost nothing, the document is scanned: run OCR rather than reporting an empty file. This single rule fixes the most common PDF failure people hit.
The jobs a PDF skill does well
Extraction. Text, tables, and images out of a document and into something usable — CSV, JSON, markdown. Tables are the hard part, and a script that understands page structure beats a model reading a wall of characters.
Form filling. Given a fillable PDF and a data source, populate every field programmatically. This is the classic case where doing it once by hand takes ten minutes and doing it two hundred times takes a script.
Merging, splitting, and rotating. Combine an appendix into a report, split a scanned batch into individual invoices, fix pages someone scanned upside down.
OCR. Turn scans into searchable documents, so everything downstream — grep, extraction, analysis — starts working.
Generation. Produce a properly typeset PDF report, invoice, or one-pager from data, with real page breaks and real headers, rather than a markdown file someone has to print.
Encryption and redaction. Lock a document with a password, or strip sensitive content before sharing. Redaction deserves a warning: covering text with a black rectangle does not remove it. A serious skill deletes the underlying content.
Installing a PDF skill
Copy the skill folder into .claude/skills/ in a project, or ~/.claude/skills/ to have it everywhere — document skills are the classic case for installing globally, since PDFs show up in every kind of work. Then check that the dependencies the scripts need are installed, and confirm the skill fires by asking for something ordinary like "pull the tables out of this statement".
If nothing happens, the description is almost certainly too vague. Our free SKILL.md validator catches the frontmatter issues that stop a skill from loading at all, and the triggering guide explains how descriptions get matched.
The pattern worth stealing
PDF skills teach a lesson that applies far beyond documents: let the model decide, let the code execute. The markdown handles judgment — which branch applies, what the user actually wants, when to ask. The scripts handle everything with a single correct answer. Skills that follow this split are reliable. Skills that ask a model to do arithmetic-grade work in prose are the ones that quietly produce wrong output and sound confident about it.
Document skills, pre-installed: ClaudeThings bundles PDF, Word, Excel, and PowerPoint skills — scripts included, triggers tuned — among 103 skills, 89 agents, and 181 commands. See the kits →