pdf

A set of operations for working with PDF files, such as extracting text, merging documents, splitting pages, and filling forms.

In plain words
What is it for?
Use it to inspect, read, create, combine, split, rotate, watermark, encrypt, decrypt, extract images from, or fill PDF files.
Why use it?
It provides a consistent way to handle common PDF tasks without writing custom code for each one.

Skill for Claude CodeCodex

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.

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

Made for: Claude Code, Codex.

Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,700 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 75% copy Near-identical to another mod 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 $0.00092 $0.02700
Opus 5 $0.00046 $0.01350
Sonnet 5 $0.00018 $0.00540
Haiku 4.5 $0.00009 $0.00270

Measured 2d ago against content hash d87b5734a258, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d ago.

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.

Origin

This is a copy

75% identical to pdf — 62 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/pdf/SKILL.md · 358 lines

How it starts

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

PDF Processing Guide

Tool-First Workflow

Use the Pdf tool for ALL standard operations. Do NOT use Python/pypdf unless you need features the tool doesn't have.

Available Pdf tool actions

Task Tool call
Inspect PDF metadata Pdf { action: "inspect", file_path: "doc.pdf" }
Extract all text Pdf { action: "extract_text", file_path: "doc.pdf" }
Extract text per page Pdf { action: "extract_pages_text", file_path: "doc.pdf" }
Split pages Pdf { action: "split", file_path: "doc.pdf", pages: "1-3", output_path: "out.pdf" }
Merge PDFs Pdf { action: "merge", file_paths: ["a.pdf", "b.pdf"], output_path: "merged.pdf" }
Get form fields Pdf { action: "get_form_fields", file_path: "form.pdf" }
Fill fillable form Pdf { action: "fill_form", file_path: "form.pdf", field_values: {"name": "John"}, output_path: "filled.pdf" }
Create blank PDF Pdf { action: "create", output_path: "blank.pdf", pages: 2 }
Add text to non-fillable PDF Pdf { action: "add_text", file_path: "doc.pdf", texts: [{"page": 1, "x": 100, "y": 500, "text": "Hello", "size": 12}], output_path: "out.pdf" }

When to fall back to Python/Bash

  • Converting PDF to images (requires pypdfium2)
  • Extracting form structure from non-fillable PDFs (requires pdfplumber)
  • OCR on scanned PDFs
  • Advanced encryption/decryption (requires qpdf CLI)

For these cases, see REFERENCE.md and FORMS.md.

Form Filling Workflow

Fillable PDFs (have form fields)

Pdf { action: "get_form_fields", file_path: "form.pdf" }
# → returns field names and types
Pdf { action: "fill_form", file_path: "form.pdf", field_values: {"LastName": "Smith", "FirstName": "John"}, output_path: "filled.pdf" }

Non-fillable PDFs (no form fields — use text annotations)

Pdf { action: "extract_text", file_path: "form.pdf" }
# → read the text to understand the layout
Pdf { action: "add_text", file_path: "form.pdf", texts: [
  {"page": 1, "x": 200, "y": 700, "text": "John Smith", "size": 10},
  {"page": 1, "x": 200, "y": 650, "text": "123 Main St", "size": 10}
], output_path: "filled.pdf" }

Read the full file on GitHub · 358 lines

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. 2d ago First seen · 358 lines · 92 tokens per session scan A d87b5734a258

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository SeifBenayed/cloclo (114 stars, last pushed 4mo ago), licensed MIT. It adds 92 tokens to every session and 2,700 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 75% identical to pdf, differing in 62 lines, and is treated as a copy.