Skip to main content
skill CX Codex

pdf · appautomaton — Claude Code skill: what it does, how to install

This skill reads, creates, fills, and transforms PDF files. Use it for forms, scanned pages, tables, and checked output documents.

MIT 720 installs ★ 190 updated 2026-10-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add appautomaton/document-SKILLs --skill pdf -a claude-code
Open on GitHub

What pdf does

The skill extracts text and tables, runs OCR on scanned pages, fills interactive or flat forms, and creates new PDFs with reportlab. It uses pdfplumber and pypdf for existing files, with bundled scripts for inspecting form fields and rendering pages for visual checks.

With pypdf, an agent can merge, split, rotate, crop, stamp, and encrypt documents. After a PDF is changed, the workflow renders the affected pages and checks readability, clipping, overlaps, and field placement. Page rendering needs poppler with pdftoppm; OCR needs Tesseract; AES encryption needs pypdf[crypto]. Rendering will fail if poppler is unavailable.

What it helps with

  • extract text and tables from a PDF
  • run OCR on scanned pages
  • fill interactive or flat PDF forms
  • merge, split, or rotate document pages
  • check field placement before delivering a file

Example prompts for the agent

  • Extract the text and tables from report.pdf for analysis.
  • Fill application.pdf using the values in values.json, validate the fields, and write the completed PDF.
  • Render out.pdf into check and inspect pages 1-3 for clipping, overlaps, and misplaced values.

How to install pdf

1Skills CLI (Vercel)

npx skills add appautomaton/document-SKILLs --skill pdf -a claude-code

2Manually: put the files in place

~/.claude/skills/pdf/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pdf/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pdf

How do I install pdf in Claude Code?

Run npx skills add appautomaton/document-SKILLs --skill pdf -a claude-code, then open ~/.claude/skills/pdf/SKILL.md.

What does the pdf skill do?

It reads and creates PDFs, extracts text and tables, handles OCR for scans, fills forms, and performs page operations such as merging, splitting, rotating, stamping, and encryption.

What does PDF rendering and OCR require?

Page rendering requires poppler and pdftoppm. OCR requires Tesseract, while AES encryption needs the pypdf[crypto] dependency.

Source text

SKILL.md · MIT
---
name: pdf
description: Read, create, fill, and transform PDF files. Covers extracting text and tables, OCR of scanned pages, filling fillable and flat forms, and flattening, merging, splitting, rotating, stamping and encrypting. Use when a task takes a .pdf as input or must produce one.
---

# PDF files

You already know pypdf, pdfplumber and reportlab. This skill adds what they don't give you: form-filling scripts that check their own input, a way to see pages as a reader will, and the PDF behaviours that silently put content in the wrong place.

## Running scripts

`<skill>` is the directory containing this file. Run bundled scripts by absolute path from the user's working directory, so relative paths to their files keep working:

```bash
uv run <skill>/scripts/convert_pdf_to_images.py report.pdf pages
```

Run Python you write with its dependencies declared, either `uv run --with pypdf script.py` or a PEP 723 header. Rendering pages needs poppler (`pdftoppm`); OCR also needs Tesseract.

## Choosing a tool

| Task | Use |
|---|---|
| Fill a form, fillable or flat | [forms.md](forms.md), always. It has scripts for every step. |
| Text | pdfplumber, or `pdftotext -layout` from the command line. Text missing from pages that visibly have it means a scan: see [ocr.md](ocr.md). |
| Tables | pdfplumber: see [tables.md](tables.md) |
| New PDFs | reportlab: Platypus for flowing documents, canvas for exact placement |
| Merge, split, rotate, crop, stamp, encrypt | pypdf: see [reference.md](reference.md) for the calls that keep bookmarks, links and orientation intact |
| See what a page looks like | `scripts/convert_pdf_to_images.py` |

## Checking the output

Whenever you create or change a PDF, render the pages you touched and look at them before delivering. Check that the text is present and readable, nothing is clipped or overlapping, and every stamp or value is where it belongs:

```bash
uv run <skill>/scripts/convert_pdf_to_images.py out.pdf check --pages 1-3
```

## Pitfalls that fail silently

- **Two coordinate systems.** PDF coordinates start at the bottom-left of the page box, in points. pdfplumber and page images start at the top-left. The page box need not start at (0, 0), so read `page.cropbox.left` and `.bottom`.
- **Rotated pages.** `/Rotate` turns a page only for display; content and form fields keep unrotated coordinates. Anything placed with a plain scale and y-flip lands in the wrong spot. Convert boxes with `scripts/pdf_coords.py`, and call `page.transfer_rotation_to_content()` before stamping.
- **Non-Latin text in new PDFs.** reportlab's built-in fonts draw Chinese, Cyrillic and similar scripts as black boxes. Register and embed a TrueType font; see [reference.md](reference.md#fonts-for-new-pdfs).
- **Merging.** `PdfWriter.append()` keeps bookmarks and links, while copying pages with `add_page()` drops them. Merged forms with matching field names become one field, so filling one fills both.
- **AES encryption** needs `uv run --with 'pypdf[crypto]'`. Without it, pypdf raises `DependencyError` on open or on encrypt.

## Scripts

| Script | Does |
|---|---|
| `check_fillable_fields.py <pdf>` | Says which form path in forms.md applies |
| `extract_form_field_info.py <pdf> <out.json>` | Lists fillable fields, their pages, boxes and accepted values |
| `fill_fillable_fields.py <pdf> <values.json> <out.pdf>` | Fills fields after checking every id, page and value |
| `convert_pdf_to_images.py <pdf> <dir> [--pages] [--fields]` | Renders pages one at a time to PNG, optionally outlining each fillable field |
| `check_bounding_boxes.py <fields.json> [pdf]` | Finds overlapping or too-short boxes before a flat form is filled |
| `create_validation_image.py <page> <fields.json> <png> <out.png>` | Draws those boxes on a page image for checking by eye |
| `fill_pdf_form_with_annotations.py <pdf> <fields.json> <out.pdf>` | Fills a flat form with text that renders identically everywhere |
| `flatten_form.py <pdf> <out.pdf>` | Draws filled values into the page so they can't be edited |
| `pdf_coords.py <pdf> <page> <WxH> --to-pdf/--to-image <box>` | Converts boxes between page-image pixels and PDF points |

© appautomaton · MIT · appautomaton/document-SKILLs

Similar skills

All skills for Office documents →

pdf by other authors comes first.

pdf official anthropics This skill lets an agent read, create, and edit PDF files, including forms and scanned documents. Use it when PDF work is part of the task. CX Codex +1 216,041installs pdf official openai A skill for reading, creating and reviewing PDFs where layout matters. Useful when the agent builds a document and needs to see how it renders. CX Codex +1 14,000installs pdf nexu-io Extracts text, creates PDF documents, and fills out forms. Helps produce press releases, branded one-pagers, and printable design deliverables. CX Codex +1 3,200installs pdf Nous Research A skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that handles PDF files end to end: build from specs, extract tables, fill forms, merge pages, encrypt. CX Codex +1 283installs pdf shareAI-lab This skill hands your agent ready recipes for pulling text out of PDFs, building documents from Markdown, and merging files. Useful whenever a PDF shows up in the task. CX Codex +1 ★ 80,707repo stars pdf-extraction claude-office-skills pdf-extraction extracts tables and text from PDF files using pdfplumber. It helps when you need to pull tabular data into DataFrames or parse invoices. CX Codex +1 9,600installs remove-pdf-watermark pilioai remove-pdf-watermark removes watermarks from PDF files via the official Pilio CLI and API. Useful when cleaning up editable documents or reconstructing pages with AI. CX Codex +1 7,400installs nano-pdf openclaw A skill for editing PDF pages using natural-language instructions through the nano-pdf CLI. Runs in Claude Code, Codex, Cursor, and other AI editors — change headings, fix typos, or rebuild layouts from code without opening manual tools. CX Codex +1 7,200installs view-pdf official anthropics view-pdf opens PDFs in an interactive viewer for shared markup, form filling, highlights, stamps, and visual signatures. Use it when text reading alone is not enough. CX Codex +1 6,500installs pdf-to-docx claude-office-skills pdf-to-docx turns PDF files into editable Word documents with the pdf2docx library. Useful when a report or contract needs changes, not just reading. CX Codex +1 6,200installs pdf-processing-pro davila7 pdf-processing-pro is a Claude Code skill for filling PDF forms, extracting tables, and processing PDFs with Python scripts. It supports automated document workflows. CX Codex +1 5,869installs

From the same set4

Project sponsors

Companies that keep this analytics open