pdf-parse

pdf-parse is a skill for Claude Code from geronimo-iia/agent-skills. It costs 74 tokens per session (1,685 once invoked), scanned E, original, MIT.

A PDF text-extraction skill that chooses a suitable method for readable, scanned, or image-heavy PDF files and converts their contents to Markdown or plain text.

In plain words
What is it for?
Use it before analysing papers, reports, or other PDFs when you need their text and structure in an editable format.
Why use it?
It removes the need to guess which extraction tool will work or to copy text manually from difficult PDFs.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the geronimo-skills plugin — 9 skills shipped together

Good fit Use it before analysing papers, reports, or other PDFs when you need…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/geronimo-iia/agent-skills/pdf-parse
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 geronimo-iia/agent-skills --skill pdf-parse
Clone the repo
git clone --depth 1 https://github.com/geronimo-iia/agent-skills

Made for: Claude Code.

Or install geronimo-skills, the plugin that ships this one along with the rest of its 9 skills.

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-parse

README.md
[![agentmods](https://agentmods.dev/badge/skills/geronimo-iia/agent-skills/pdf-parse.svg)](https://agentmods.dev/skills/geronimo-iia/agent-skills/pdf-parse)
Your own site
<a href="https://agentmods.dev/skills/geronimo-iia/agent-skills/pdf-parse"><img src="https://agentmods.dev/badge/skills/geronimo-iia/agent-skills/pdf-parse.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,685 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 3 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.00074 $0.01685
Opus 5 $0.00037 $0.00843
Sonnet 5 $0.00015 $0.00337
Haiku 4.5 $0.00007 $0.00169

Measured yesterday against content hash f3c9864bf25f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade E, and why

pdf-parse scanned grade E with 3 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

If `uvx` is missing, install uv first: `curl -LsSf https://astral.sh/uv/install.sh | sh`

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf "$(uvx env --path 2>/dev/null || echo ~/.cache/uv/tool-environments)"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

If `uvx` is missing, install uv first: `curl -LsSf https://astral.sh/uv/install.sh | sh`
skills/pdf-parse/SKILL.md · 221 lines

How it starts

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

PDF Parsing

Dual-path extraction pipeline. Selects tool based on PDF type.

Tool overview

Tool Best for Backend Install
xberg Machine-readable PDFs pdfium + Rust brew install xberg-io/tap/xberg
marker-pdf Scanned / image PDFs ML OCR + layout uvx marker-pdf
pdftotext Fallback (text-only) poppler system package

Step 1 — Ensure tools are installed

xberg

# Check
xberg --version

# Install (macOS)
brew tap xberg-io/tap
brew install xberg


# Install (Linux / no brew)
# Download binary from https://github.com/xberg-io/xberg/releases
# or via Docker: docker pull ghcr.io/xberg-io/xberg:latest

marker-pdf

marker-pdf is invoked via uvx — no persistent install needed.

# Verify uvx is available
uvx --version

# Test marker-pdf is resolvable
uvx marker-pdf --version

If uvx is missing, install uv first: curl -LsSf https://astral.sh/uv/install.sh | sh

pdftotext (fallback)

# macOS
brew install poppler

# Debian/Ubuntu
apt-get install poppler-utils

Step 2 — Detect PDF type

# xberg detect — confirms file is a valid PDF (returns MIME type only)
xberg detect "<path/to/file.pdf>"

# To distinguish machine-readable vs scanned, use pdfinfo
pdfinfo "<path/to/file.pdf>"

Known limitation: xberg detect returns application/pdf for all PDFs — it does NOT distinguish machine-readable from scanned. Use it only to confirm the file is a valid PDF.

Decision rule:

  • pdfinfo shows Pages: N and text content present (non-zero Characters:) → Step 3A (xberg)
  • pdfinfo shows Characters: 0 or < 100 → Step 3B (marker-pdf, likely scanned)
  • xberg unavailable → Step 3B (marker-pdf) or Step 3C (pdftotext fallback)
  • Neither tool available → Step 3C (pdftotext fallback)

Step 3 — Extract

3A — Machine-readable PDF → xberg

Warning: xberg writes WARN-level log lines to stdout, not stderr. Using > redirection captures them inside the output file. Always use --output to avoid polluted Markdown.

Read the full file on GitHub · 221 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 Changed f3c9864bf25f
  2. 6d ago First seen · 221 lines · 74 tokens per session scan E e737bb04e98f

Subscribe to this mod's changes

pdf-parse is a skill published in the GitHub repository geronimo-iia/agent-skills (2 stars, last pushed 6d ago), licensed MIT. It adds 74 tokens to every session and 1,685 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it E with 3 findings (downloads and executes remote code, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.