Skip to content
SkillMixed1,964 tokens in use

pdf

Anthropic's PDF skill: read, extract, merge, split, create, encrypt, OCR and fill PDF forms with Python libraries, command-line tools and bundled scripts.

197,763 stars on the repositoryanthropics/skills · skills/pdf
/plugin install document-skills@anthropic-agent-skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing pdf costs

98tokens idle
1,964tokens in use
8,929tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Mixed

Script-ledMixedModel-led

Scripts do part of the work and the model's judgement does the rest.

This describes the skill's structure, how much of it is scripts. It does not say how well it works. Scripts: scripts/check_bounding_boxes.py, scripts/check_fillable_fields.py, scripts/convert_pdf_to_images.py, scripts/create_validation_image.py, scripts/extract_form_field_info.py, scripts/extract_form_structure.py, scripts/fill_fillable_fields.py, scripts/fill_pdf_form_with_annotations.py.

Touches

shelldetectednetworkdetectedwrites filesdetected

Declared tags come from the skill's frontmatter; detected ones from its scripts and code blocks. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Good
  • Frontmatter15/15
  • Structure15/25
  • Examples15/15
  • Output10/15
  • Size15/15
  • Resources3/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent
  • Writes files−8

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 42
  • Runs shell commands−5

    does this on the machine, and the frontmatter does not say so

    SKILL.md, line 194

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity72
  • Maintenance32
  • Community68
  • Maturity36
  • Momentum40

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.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers