pdf

A guide for creating, editing, reviewing, splitting, merging, or extracting content from PDF files. It accounts for text-based files, scanned pages, layout, images, and annotations.

In plain words
What is it for?
Use it to review PDFs, extract information, apply annotations, combine or separate files, redact content, convert formats, or handle scanned documents with OCR.
Why use it?
It helps choose an approach that fits the PDF and avoids losing important layout or content during conversion.

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/openknots/okcode/pdf
Any agent
npx skills add OpenKnots/okcode --skill pdf
Clone the repo
git clone --depth 1 https://github.com/OpenKnots/okcode

Made for: Claude Code, Codex.

Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 467 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00010 $0.00467
Opus 5 $0.00005 $0.00234
Sonnet 5 $0.00002 $0.00093
Haiku 4.5 $0.00001 $0.00047

Measured yesterday against content hash c873a5cb9147, 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 yesterday.

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.

packages/shared/src/skills-catalog/recommended/pdf/SKILL.md · 50 lines

How it starts

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

PDF Skill

When to use this skill

  • Use when the task involves creating, editing, reviewing, splitting, merging, or extracting content from PDF files.
  • Use when the user needs to understand whether a PDF can be edited directly or must be converted first.
  • Use when the task depends on preserving layout, images, pagination, or annotation fidelity.
  • Use when OCR may be required because the PDF contains scanned pages rather than selectable text.

What this skill does

  • Chooses the safest PDF workflow based on the user's goal: review, extraction, transformation, or generation.
  • Distinguishes between text-based PDFs and image-only scanned PDFs before proposing edits.
  • Preserves fidelity when layout matters and explicitly calls out any tradeoff when converting to another format.
  • Prefers repeatable tools and scripted operations over manual one-off desktop steps.

Implementation

  • Start by identifying the real goal: review content, extract data, annotate, merge, split, redact, or convert.
  • Determine whether the PDF is text-based or scanned. If the content is image-only, state that OCR may be required.
  • If the user needs edits that preserve layout, avoid lossy conversions unless they explicitly accept them.
  • If extracting text, note whether the output should preserve reading order, tables, headings, or page boundaries.
  • If generating a PDF from another source, preserve the source of truth in an editable format whenever possible.
  • When tools are limited, explain the limitation clearly and offer the safest fallback rather than implying full fidelity.
  • Summarize important tradeoffs before carrying out destructive or lossy transformations.

Best practices

  • Never imply that all PDFs are safely editable; many require conversion or specialized tooling.
  • Call out OCR accuracy risk explicitly for scanned documents.
  • Preserve the original file before transformations that may alter layout or metadata.
  • Prefer deterministic, scriptable workflows for extraction and generation.
  • Tell the user when tables, forms, annotations, or embedded fonts may not round-trip cleanly.

Read the full file on GitHub · 50 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. yesterday First seen · 50 lines · 10 tokens per session scan A c873a5cb9147

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository OpenKnots/okcode (24 stars, last pushed 3mo ago), licensed MIT. It adds 10 tokens to every session and 467 once invoked, about $0.0001 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.