MCPInstall

pdf

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.

Installs
704
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/appautomaton/document-skills --skill pdf
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads pdf automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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:

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

TaskUse
Fill a form, fillable or flatforms.md, always. It has scripts for every step.
Textpdfplumber, or pdftotext -layout from the command line. Text missing from pages that visibly have it means a scan: see ocr.md.
Tablespdfplumber: see tables.md
New PDFsreportlab: Platypus for flowing documents, canvas for exact placement
Merge, split, rotate, crop, stamp, encryptpypdf: see reference.md for the calls that keep bookmarks, links and orientation intact
See what a page looks likescripts/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:

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.
  • 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

ScriptDoes
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

FAQ

What does the pdf skill do?

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.

How do I install pdf?

Run npx skills add https://github.com/appautomaton/document-skills --skill pdf in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pdf/ (personal) or .claude/skills/pdf/ (project).

Which AI agents can use pdf?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is pdf safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains pdf?

It is published by appautomaton in appautomaton/document-skills. It has 704 recorded installs.

More from appautomaton/document-skills

View all →

xlsx

appautomaton/document-skills

Create, edit, analyze, and recalculate Excel workbooks (.xlsx, .xlsm) with live formulas, formatting, and charts. Use when a task produces or modifies a spreadsheet file, turns CSV/TSV data into one, or needs values, formulas, or formatting read from one.

Data & Databases1.3K installs

docx

appautomaton/document-skills

Create, edit, review, and read Word documents (.docx), including tracked changes (redlines), comments, footnotes, tables, images, headers and page setup. Use when a task produces or modifies a .docx, reviews or redlines one, or needs its text, comments or tracked changes read.

Docs & Writing1.3K installs

pptx

appautomaton/document-skills

Create, edit, and analyze PowerPoint decks (.pptx). Build new decks from HTML slides, fill an existing template, duplicate or reorder slides, edit slide XML, and read or write speaker notes. Use when a task produces or modifies a .pptx file, or needs text, layout, or notes read from one.

Docs & Writing839 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs