pdf

A set of procedures for working with PDF files, including extracting content, converting files to markdown, merging or splitting PDFs, and reading scanned or handwritten pages. Markdown is plain text with simple formatting.

In plain words
What is it for?
Use it to process course notes, textbook chapters, homework solutions, handwritten answers, or other PDF input and output.
Why use it?
It handles PDFs whose layouts, equations, figures, or handwriting can be missed by ordinary text extraction. OCR, or image-to-text conversion, is required for scanned and handwritten pages.

Skill for Claude CodeCodex

Part of the paideia plugin — 6 skills, 18 commands shipped together

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

Made for: Claude Code, Codex.

Or install paideia, the plugin that ships this one along with the rest of its 6 skills, 18 commands.

Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,707 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.00096 $0.01707
Opus 5 $0.00048 $0.00853
Sonnet 5 $0.00019 $0.00341
Haiku 4.5 $0.00010 $0.00171

Measured 3d ago against content hash 33dedc946ab8, 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 3d 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.

plugins/paideia/skills/pdf/SKILL.md · 165 lines

How it starts

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

PDF Processing Guide

When to use this skill

Load this skill whenever the workflow involves PDF input or output. In the paideia context specifically:

  • Converting materials/**/*.pdf to markdown in converted/**/*.md (via /ingest)
  • Converting hand-written answer PDFs in answers/*.pdf to markdown in answers/converted/*.md (via /grade)
  • OCR for scanned lecture notes, textbook chapters, or hand-written work

Quick decision tree

What kind of PDF?
├─ Course material (materials/**/*.pdf)  → VISION pipeline (see VISION.md)
│                                          pdfplumber is unreliable on course
│                                          content — even "prose-heavy"
│                                          textbook pages mix in equations,
│                                          figures, and multi-column layouts
│                                          that break digital extraction
│                                          silently. We route everything
│                                          through vision instead of
│                                          maintaining a per-category heuristic.
├─ Hand-written answer PDF              → vision-ocr skill (see vision-ocr/)
└─ Arbitrary outside-the-plugin PDF     → pdfplumber / pypdf / pytesseract
                                          per the sections below, case-by-case

Within this plugin, /paideia:ingest routes all materials/**/*.pdf through the vision pipeline. The pdfplumber / pypdf / pytesseract blocks below remain for reference and for ad-hoc PDF work outside the ingest flow (e.g., quick text dumps, PDF merge/split, producing the cheatsheet PDF).

Core operations

Text extraction (digital PDF)

import pdfplumber

with pdfplumber.open("input.pdf") as pdf:
    text_by_page = []
    for page in pdf.pages:
        text_by_page.append(page.extract_text() or "")
full_text = "\n\n---\n\n".join(text_by_page)

Simpler alternative using pypdf:

from pypdf import PdfReader
reader = PdfReader("input.pdf")
full_text = "\n\n".join(p.extract_text() or "" for p in reader.pages)

Read the full file on GitHub · 165 lines

Files

What ships with it

1 file 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. 3d ago First seen · 165 lines · 96 tokens per session scan A 33dedc946ab8

Subscribe to this mod's changes

pdf is a skill published in the GitHub repository OPTIMETA/PAIDEIA (91 stars, last pushed 1mo ago), licensed MIT. It adds 96 tokens to every session and 1,707 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-30.

Related

Other skills, from other repositories

larksnap-fetch

把飞书/Lark 文档或普通网页抓取并保存到本地,也能编辑用户有权限的飞书文档,并用已登录浏览器执行一次网页搜索。用户要求下载、导出、抓取、写入飞书文档,或联网搜索资料/参考链接时使用本技能,即使没有提到 larksnap。底层通过技能自带 daemon 桥接已登录的 larksnap 浏览器扩展;arXiv 使用独立脚本。.

AmbroseX/larksnap · 111 tokens

markdown-exporter

Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.

bowenliang123/markdown-exporter · 57 tokens

deck-ai

Generate modern presentation decks (PDF) from markdown content. Local open-source alternative to Gamma — uses Slidev for layouts and Unsplash for imagery. Invoke when the user asks to "make a deck", "build slides from this", or "turn this into a presentation".

assafkip/kipi-system · 57 tokens

pdf-press

Teaches agents how to generate Markdown, HTML (with embedded SVG), and Mermaid content that renders beautifully to multi-page PDF via writepdf, with proper page breaks, compact professional layouts, brand and domain-adaptive color schemes, multi-column support for scientific papers, magazine-style editorial documents…

kdcube/kdcube · 74 tokens

md-to-office

Convert Markdown to Word, PowerPoint, and PDF using Pandoc - the universal document converter.

berabuddies/Semia · 22 tokens

mineru

An AI-Native skill for parsing PDF / Office / image files into clean Markdown with MinerU — a fast, zero-config document parser for AI agents. Works with NO token via the lightweight Agent API and auto-upgrades to the Standard API (token) for large files, batches, and DOCX/HTML/LaTeX export. Use when: (1) Converting…

Nebutra/MinerU-Skill · 137 tokens