pdf

pdf is a skill for Claude Code, Codex from PaulRBerg/agent-skills. It costs 65 tokens per session (1,048 once invoked), scanned A, original, MIT.

A guide for working with PDF files, including extracting text, tables, and images; comparing documents; filling forms; and converting PDFs to images. It is designed to preserve the original document and protect sensitive information during local processing.

In plain words
What is it for?
Use it to read, compare, reconcile, extract, scan, fill, split, merge, rotate, rename, compress, or convert PDF documents.
Why use it?
It helps avoid losing numbers, dates, notes, layout, form data, or image quality when processing PDFs.

Skill for Claude CodeCodex

Written for Claude Code and Codex: argument-hint in frontmatter, but also agents/openai.yaml present.

Good fit Use it to read, compare, reconcile, extract, scan, fill, split, merge, rotate, rename, compress, or convert PDF documents.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/paulrberg/agent-skills/pdf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PaulRBerg/agent-skills --skill pdf
Clone the repo
git clone --depth 1 https://github.com/PaulRBerg/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/paulrberg/agent-skills/pdf/github.svg)](https://agentmods.dev/skills/paulrberg/agent-skills/pdf)
Your own site
<a href="https://agentmods.dev/skills/paulrberg/agent-skills/pdf"><img src="https://agentmods.dev/badge/skills/paulrberg/agent-skills/pdf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pdf

Your own site · 80×15
<a href="https://agentmods.dev/skills/paulrberg/agent-skills/pdf"><img src="https://agentmods.dev/badge/skills/paulrberg/agent-skills/pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,048 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.01048
Opus 5 $0.00032 $0.00524
Sonnet 5 $0.00013 $0.00210
Haiku 4.5 $0.00006 $0.00105

Measured 9d ago against content hash feabf936466f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pdf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/form.py, scripts/profile.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pdf/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PDF

Process PDFs locally on macOS with exact extraction, source preservation, deliberate tool routing, and structural plus semantic validation.

Invariants

  1. Keep document contents local unless the user explicitly authorizes an upload or external disclosure. Package and language-data downloads do not authorize document disclosure.
  2. Preserve every original PDF byte-for-byte. Write a sibling output, copy, or explicitly named destination unless the user authorizes destructive replacement.
  3. Preserve monetary values, identifiers, dates, signs, and displayed precision as strings. Use decimal.Decimal for arithmetic; never infer missing rows or silently discard headers, footnotes, continuation lines, or boundary pages.
  4. Inspect structure and representative renders before choosing a transformation. Use the smallest tool that preserves the required layout, forms, annotations, and image quality.
  5. Validate every written PDF structurally and against task semantics. A command exiting successfully is not evidence that extracted rows, totals, page boundaries, form appearances, or visual layout are correct.
  6. Keep reports concise for private financial, tax, legal, and health documents. Prefer counts, reconciliations, and file references over raw sensitive rows unless the rows materially support the task or the user asks for them.

Profile First

Resolve the skill directory from this SKILL.md, then profile every unknown input:

uv run "<skill-dir>/scripts/profile.py" "<input.pdf>"

The helper emits schema-versioned JSON with integrity, encryption, page geometry/rotation, image counts, and per-page text coverage without document text. Stop on password_required; password handling is outside this skill.

When layout, cropping, OCR quality, signatures, or form placement matters, render the first and last page, every structural boundary, and any page behind a discrepancy.

Route by Evidence

Need Preferred route
Quick reading or page-aware extraction Host PDF reader when available, then pdftotext -layout
Coordinates, columns, or difficult tables Poppler bounding boxes, then pdfplumber through uv run
Image-only or materially incomplete text OCRmyPDF with Tesseract; default languages eng+ron
Merge, split, rotate, or integrity checks qpdf
Render pages or extract embedded images pdftocairo or pdfimages
Convert ordered images into a PDF img2pdf
Reduce size qpdf lossless rewrite first; Ghostscript only for an accepted lossy pass
Inspect, fill, flatten, or overlay forms Read references/forms.md first

Read the full file on GitHub · 79 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 79 lines · 65 tokens per session scan A feabf936466f

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository PaulRBerg/agent-skills (70 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 1,048 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.