The pdf skill is the PDF processing guide from Anthropic’s public skills repository, one of the document skills that power Claude’s file creation features. It triggers whenever a task involves a .pdf file and walks the agent through the right tool for each job: pypdf for merging, splitting, rotating, watermarking and encrypting, pdfplumber for text and table extraction, reportlab for creating new PDFs, and pytesseract with pdf2image for OCR on scanned documents.
Beyond the main guide it ships two references and a set of Python scripts. REFERENCE.md covers pypdfium2, the JavaScript libraries pdf-lib and pdfjs-dist, and advanced poppler-utils and qpdf commands. FORMS.md is a step-by-step form-filling workflow that checks whether a PDF has fillable fields, then either fills them directly or places text annotations on non-fillable forms, with scripts to extract field info and form structure, validate bounding boxes and render pages to images for checking.
What You Get
- A SKILL.md guide with ready-to-adapt Python snippets for pypdf, pdfplumber and reportlab, plus pdftotext, qpdf, pdftk and pdfimages commands
- A quick-reference table mapping each common PDF task to the best tool for it
- REFERENCE.md with pypdfium2 rendering, pdf-lib and pdfjs-dist JavaScript examples, advanced qpdf and poppler-utils options, batch processing and troubleshooting
- FORMS.md, an ordered workflow for filling fillable and non-fillable PDF forms
- Python scripts to detect fillable fields, extract field info and form structure to JSON, convert pages to PNG, check bounding boxes and write the filled PDF
Common Use Cases
- Extracting text and tables from reports or invoices into text files, DataFrames or Excel
- Merging, splitting, rotating or watermarking a set of PDFs
- Generating a new multi-page PDF report with reportlab
- Running OCR on a scanned PDF to get searchable text
- Filling in a government or HR form PDF from data the user provides
What Makes It Unique
It is Anthropic’s own reference skill for PDF work, published as an example of a complex skill used in a production AI application. Rather than wrapping one library, it routes each task to a specific tool across Python, JavaScript and the command line, keeps the long material in two linked reference files so the main guide stays short, and adds a scripted form-filling workflow with validation steps: field IDs and values are checked before writing, and bounding boxes are checked for overlaps and for being too small for the font size before text is placed.
Under The Hood
The main SKILL.md is prose and code snippets; the agent writes and runs its own Python against the pypdf, pdfplumber, reportlab, pandas, pytesseract and pdf2image libraries, or shells out to pdftotext, qpdf, pdftk and pdfimages. These have to be installed already; the guide only notes a pip install for the OCR libraries. For forms, FORMS.md has the agent run the bundled scripts with python from the skill folder: they read a local PDF and write JSON field lists, PNG page images and the filled output PDF, and the visual-estimation path crops page images with ImageMagick. The fill script for fillable fields patches one pypdf method at runtime to handle choice-field options. None of the scripts make network calls. The folder also ships create_validation_image.py, which draws field boxes on a page image but is not named in the guides.