pdf

pdf is a skill for Claude Code, Codex from CODE-SAURABH/OpenSkills. It costs 98 tokens per session (3,712 once invoked), scanned A, original, MIT.

A guide and toolkit for working with PDF files, which are documents that preserve their layout across devices and printers. It can handle document text, tables, pages, images, forms, and security tasks.

In plain words
What is it for?
Use it to read or extract text and tables, create PDFs, merge or split pages, rotate documents, extract images, fill forms, process scanned pages with OCR, and add or remove password protection.
Why use it?
PDFs are designed for viewing rather than easy programmatic editing, so common jobs such as extracting tables or rearranging pages can be awkward to automate.

Skill for Claude CodeCodex

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

Good fit Use it to read or extract text and tables, create PDFs, merge…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/code-saurabh/openskills/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 CODE-SAURABH/OpenSkills --skill pdf
Clone the repo
git clone --depth 1 https://github.com/CODE-SAURABH/OpenSkills

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/code-saurabh/openskills/pdf.svg)](https://agentmods.dev/skills/code-saurabh/openskills/pdf)
Your own site
<a href="https://agentmods.dev/skills/code-saurabh/openskills/pdf"><img src="https://agentmods.dev/badge/skills/code-saurabh/openskills/pdf.svg" alt="Measured on agentmods" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,712 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.00098 $0.03712
Opus 5 $0.00049 $0.01856
Sonnet 5 $0.00020 $0.00742
Haiku 4.5 $0.00010 $0.00371

Measured 6d ago against content hash 313d3b31f41a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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.

pdf/SKILL.md · 468 lines

How it starts

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

PDF Processing

PDF is the universal document format. It is also one of the most annoying formats to work with programmatically. This skill handles the full range of PDF tasks — reading, creating, editing, merging, splitting, and extracting — using the right tool for each job.

Task Best tool
Extract text (digital PDF) pdfplumber or pdftotext
Extract tables pdfplumber
Create PDF from content reportlab
Merge / split / rotate pypdf or qpdf
Fill PDF forms pypdf or pdf-lib (JS)
OCR scanned PDFs pytesseract + pdf2image
Password protect / decrypt pypdf or qpdf
Extract images pdfimages (poppler)

pypdf, pdfplumber, and reportlab are typically pre-installed. Import directly. Only run pip install if an import fails.


Reading & Extracting Content

Extract All Text

# pdfplumber — preserves layout better than pypdf
import pdfplumber

with pdfplumber.open("document.pdf") as pdf:
    print(f"Pages: {len(pdf.pages)}")
    for i, page in enumerate(pdf.pages, 1):
        text = page.extract_text()
        if text:
            print(f"\n--- Page {i} ---")
            print(text)
# Command line — fastest for quick extraction
pdftotext document.pdf output.txt         # basic
pdftotext -layout document.pdf output.txt # preserve column layout
pdftotext -f 1 -l 5 document.pdf -        # pages 1–5, stdout

Extract Specific Pages

from pypdf import PdfReader

reader = PdfReader("document.pdf")

# Single page
text = reader.pages[0].extract_text()

# Page range (0-indexed)
for page in reader.pages[2:7]:  # pages 3–7
    print(page.extract_text())

Extract Tables

import pdfplumber
import pandas as pd

with pdfplumber.open("report.pdf") as pdf:
    all_tables = []

    for page_num, page in enumerate(pdf.pages, 1):
        tables = page.extract_tables()

        for table_num, table in enumerate(tables, 1):
            if not table or not table[0]:
                continue

            print(f"Page {page_num}, Table {table_num}: {len(table)} rows")

            # Convert to DataFrame — first row as headers
            df = pd.DataFrame(table[1:], columns=table[0])

            # Clean: strip whitespace, drop empty rows
            df = df.applymap(lambda x: x.strip() if isinstance(x, str) else x)
            df = df.dropna(how="all")

            all_tables.append(df)

# Combine and export
if all_tables:
    combined = pd.concat(all_tables, ignore_index=True)
    combined.to_excel("extracted_tables.xlsx", index=False)
    combined.to_csv("extracted_tables.csv", index=False)
    print(f"Extracted {len(combined)} rows across {len(all_tables)} tables")

Read the full file on GitHub · 468 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. 6d ago First seen · 468 lines · 98 tokens per session scan A 313d3b31f41a

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository CODE-SAURABH/OpenSkills (2 stars, last pushed 1mo ago), licensed MIT. It adds 98 tokens to every session and 3,712 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

pdf-processing

Inspect, extract, OCR, create, merge, split, reorder, rotate, annotate, fill, redact, compress, secure, and verify PDF documents while preserving source files and visual fidelity. Use when working with one or more .pdf files; converting documents to or from PDF; extracting text, tables, images, metadata, forms, or…

seb1n/awesome-ai-agent-skills · 105 tokens

kami

Generate PDFs, resumes, CVs, letters, slide decks, portfolios, one-pagers, white papers, and professional documents. Use when user asks to create a PDF, make a resume, write a letter, design slides, format a document, typeset a report, build a portfolio, make a presentation, or create a one-pager. Warm parchment…

EliasOulkadi/shokunin · 0 tokens

kagen

Convert Kami HTML templates to production-grade PDF via Chromium/Playwright. Complements Kami (design) with PDF rendering. Use when user asks to generate PDF files, render HTML to PDF, or export documents.

EliasOulkadi/shokunin · 0 tokens

paper-fetch

Use whenever the user wants to obtain, download, or fetch a paper's PDF — given a DOI, an arXiv id, a paper title, a citation, or a list of DOIs. Trigger on phrases like "download this paper", "find the PDF for [DOI]", "grab me the [Nature/bioRxiv/arXiv] paper on X", "get the open-access version", "I need this…

Agents365-ai/paper-fetch · 162 tokens

pro-report-builder

Create polished HTML technical reports and multi-page documents for consulting deliverables. Includes a customizable design system with dark cover page, warm cream content pages (8.5x11 portrait), professional typography, and a curated component library (KPI cards, data tables with severity coloring, callout boxes…

thatrebeccarae/claude-marketing · 101 tokens

html-report-builder

Create polished HTML technical reports and multi-page documents for consulting deliverables. Features a professional design system with dark cover pages, warm cream content pages, Switzer + Cartograph CF typography, and a curated component library (KPI cards, data tables, callout boxes, recommendation cards, priority…

thatrebeccarae/claude-marketing · 74 tokens