pdf

pdf is a skill for Claude Code, Codex from FareedKhan-dev/claude-code-from-scratch. It costs 32 tokens per session (789 once invoked), scanned A, original, MIT.

A guide for working with PDF files, which are fixed-layout documents that may contain text, tables, scanned pages, or forms. It recommends tools for extracting, editing, merging, splitting, and filling them.

In plain words
What is it for?
Use it to extract text or tables, run OCR on scans, merge or split pages, add watermarks or annotations, and fill PDF forms.
Why use it?
It helps choose an appropriate method based on whether a PDF has selectable text, tables, or scanned images.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to extract text or tables, run OCR on scans, merge or split pages, add watermarks or annotations, and fill PDF forms.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fareedkhan-dev/claude-code-from-scratch/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 FareedKhan-dev/claude-code-from-scratch --skill pdf
Clone the repo
git clone --depth 1 https://github.com/FareedKhan-dev/claude-code-from-scratch

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/fareedkhan-dev/claude-code-from-scratch/pdf/github.svg)](https://agentmods.dev/skills/fareedkhan-dev/claude-code-from-scratch/pdf)
Your own site
<a href="https://agentmods.dev/skills/fareedkhan-dev/claude-code-from-scratch/pdf"><img src="https://agentmods.dev/badge/skills/fareedkhan-dev/claude-code-from-scratch/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/fareedkhan-dev/claude-code-from-scratch/pdf"><img src="https://agentmods.dev/badge/skills/fareedkhan-dev/claude-code-from-scratch/pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 789 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.
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.00032 $0.00789
Opus 5.5 $0.00013 $0.00316
Sonnet 5.5 $0.00006 $0.00158
Haiku 4.5 $0.00003 $0.00079

Measured 1mo ago against content hash 328d56e1a61e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

skills/pdf/SKILL.md · 136 lines

How it starts

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

PDF Skill

When to use this skill

Load when the user asks you to:

  • Extract text or tables from a PDF
  • Merge or split PDF files
  • Fill in a PDF form
  • Add watermarks or annotations
  • Convert PDF to another format
  • Search for content inside a PDF

Library decision tree

Need to extract text from a normal (not scanned) PDF?
    → pdfplumber  (best text + table extraction)

Need to manipulate pages (merge, split, rotate)?
    → pypdf  (formerly PyPDF2)

Need to fill form fields?
    → pypdf  with writer.update_page_form_field_values()

PDF is scanned (images of pages, no selectable text)?
    → pytesseract + pdf2image  (OCR pipeline)

Need to create a PDF from scratch?
    → reportlab  or  fpdf2

Install

pip install pdfplumber pypdf
# For OCR:
pip install pytesseract pdf2image
# Also requires: tesseract-ocr (system package) and poppler-utils

Extract text — pdfplumber

import pdfplumber

with pdfplumber.open("document.pdf") as pdf:
    for page in pdf.pages:
        text = page.extract_text()
        if text:
            print(text)

Extract tables — pdfplumber

import pdfplumber

with pdfplumber.open("document.pdf") as pdf:
    for page in pdf.pages:
        tables = page.extract_tables()
        for table in tables:
            for row in table:
                print(row)

Merge PDFs — pypdf

from pypdf import PdfWriter

writer = PdfWriter()
for filename in ["part1.pdf", "part2.pdf", "part3.pdf"]:
    writer.append(filename)
with open("merged.pdf", "wb") as f:
    writer.write(f)

Split PDF — pypdf

from pypdf import PdfReader, PdfWriter

reader = PdfReader("document.pdf")
for i, page in enumerate(reader.pages):
    writer = PdfWriter()
    writer.add_page(page)
    with open(f"page_{i+1}.pdf", "wb") as f:
        writer.write(f)

Extract specific pages — pypdf

from pypdf import PdfReader, PdfWriter

reader = PdfReader("document.pdf")
writer = PdfWriter()
for page_num in [0, 2, 4]:          # 0-indexed
    writer.add_page(reader.pages[page_num])
with open("selected.pdf", "wb") as f:
    writer.write(f)

Read the full file on GitHub · 136 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. 1mo ago First seen · 136 lines · 32 tokens per session scan A 328d56e1a61e

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository FareedKhan-dev/claude-code-from-scratch (302 stars, last pushed 6mo ago), licensed MIT. It adds 32 tokens to every session and 789 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other skills, from other repositories

chat-complex-documents

Chat with and search your complex documents — ask questions, extract tables and fields, and get answers grounded in the source. Connects the hosted Unstructured Transform MCP server to parse, structure, and enrich PDFs, Word/Excel/PowerPoint, images, scanned files, emails, and 60+ other formats into clean, AI-ready…

vellum-ai/vellum-assistant · 90 tokens

pdf

Read, create, inspect, merge, split, rotate, encrypt, fill, and validate PDF files. Use when the user asks to work with a PDF or convert supported Markdown into a polished PDF in AstrBot.

AstrBotDevs/AstrBot · 45 tokens

presenton

Generate AI-powered presentations locally using Presenton. Use when: (1) User asks to create a presentation or slideshow, (2) User wants to convert a document or prompt into slides, (3) User needs PPTX/PDF export with AI-generated content.

besoeasy/open-skills · 56 tokens

api-assets

Call nodetool.assets or nodetool.documents from a code action: find, read and save files in the user's asset library, keep a file another tool downloaded, and convert documents or extract text and tables from a PDF. Load before the first call into these namespaces.

nodetool-ai/nodetool · 58 tokens

sandbox-pdf

Extract the embedded text of a PDF, whole or per page, in a Code node or CodeAct action, with pdf-parse running on the host. It reads text the PDF already carries; it does not OCR a scanned page.

nodetool-ai/nodetool · 51 tokens

sandbox-pdflib

Build and merge PDF files in a Code node or CodeAct action, with pdf-lib running on the host.

nodetool-ai/nodetool · 27 tokens