pdf-reader

pdf-reader is a skill for Claude Code, Codex from vichhka-git/pdf-reader-skills. It costs 48 tokens per session (1,362 once invoked), scanned A, original, MIT.

A tool for turning PDFs into structured Markdown that an AI can read while preserving page positions, columns, tables, headings, lists, and code blocks. Markdown is plain text with simple formatting marks.

In plain words
What is it for?
Use it when an AI must read, summarize, extract, quote, or cite content from a PDF, especially one with tables or multiple columns.
Why use it?
It reduces errors caused by copying text from complex PDFs in the wrong order and identifies pages that need separate optical character recognition, which reads text from scanned images.

Skill for Claude CodeCodex

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

Good fit Use it when an AI must read, summarize, extract, quote, or cite content from a PDF, especially one with tables or multiple columns.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/vichhka-git/pdf-reader-skills/pdf-reader/github.svg)](https://agentmods.dev/skills/vichhka-git/pdf-reader-skills/pdf-reader)
Your own site
<a href="https://agentmods.dev/skills/vichhka-git/pdf-reader-skills/pdf-reader"><img src="https://agentmods.dev/badge/skills/vichhka-git/pdf-reader-skills/pdf-reader/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-reader

Your own site · 80×15
<a href="https://agentmods.dev/skills/vichhka-git/pdf-reader-skills/pdf-reader"><img src="https://agentmods.dev/badge/skills/vichhka-git/pdf-reader-skills/pdf-reader.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,362 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.00048 $0.01362
Opus 5.5 $0.00019 $0.00545
Sonnet 5.5 $0.00010 $0.00272
Haiku 4.5 $0.00005 $0.00136

Measured 1mo ago against content hash 15c53666377a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pdf-reader 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.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/install.py, scripts/pdf_read.py, tests/check_install.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-reader/SKILL.md · 111 lines

How it starts

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

pdf-reader

Turn a PDF into clean, position-aware Markdown that an AI model can read without misreading the layout. Backed by pdf-inspector (Firecrawl's Rust engine), which handles columns, tables, headings, lists, and code blocks, and tells you exactly which pages (if any) need OCR.

When to use

  • The user shares or points at a PDF and asks you to read, summarize, extract, or quote from it — and your model cannot read PDFs natively.
  • The PDF contains tables, multi-column layouts, or dense formatting where a naive text dump would corrupt the meaning.
  • You need to cite specific pages of a document.

Do NOT use for image-only/scanned PDFs expecting embedded text: pdf-inspector is not an OCR engine. It will classify them as scanned/image_based and flag every page — that is the signal to route to OCR (--ocr-cmd) instead.

Prerequisites

  • Python 3 (≥ 3.8) with pip install pdf-inspector (prebuilt wheels for macOS Intel/ARM, Linux x86_64/aarch64, Windows x64 — no Rust toolchain).
  • The core CLI is scripts/pdf_read.py — the scripts/ folder sits NEXT TO this SKILL.md. Resolve it relative to this file: <this-skill-folder>/scripts/pdf_read.py (and <this-skill-folder>/scripts/install.py for one-shot installation). Reference docs live in references/ (api-guide.md, rules.md). If the folder is missing, clone or copy it from the skill repo, or follow README.md step-by-step installation.

Procedure

PDF_READ below stands for <this-skill-folder>/scripts/pdf_read.py — the folder next to this SKILL.md.

  1. Locate the wrapper — resolve scripts/pdf_read.py next to this file. If it is not present, tell the user it must be installed with the skill (README.md has the steps).
  2. Classify first (fast, ~10–50 ms):
    python3 "$PDF_READ" <document.pdf> --classify
    
    Read the output: type=text_based|scanned|image_based|mixed, confidence, pages_needing_ocr=[...].
  3. Convert (default writes <document>.md + <document>.md.meta.json):
    python3 "$PDF_READ" <document.pdf>
    
    For a quick answer you may pipe instead:
    python3 "$PDF_READ" <document.pdf> --stdout --pages 1-10
    
  4. Read the Markdown, honoring these rules:
    • <!-- Page N --> markers = source pages. When you quote or cite, say which page a passage came from.
    • | tables are real Markdown tables — read them as tables, with headers and cells, not as prose.
    • Headings are #/##/### (font-size-based from the original PDF).
    • <!-- OCR REQUIRED: page N ... --> means page N has no embedded text: do not guess its content. Either report that page N needs OCR, or run the OCR hook (step 5).
  5. OCR fallback for flagged pages — run a local OCR engine per page:
    python3 "$PDF_READ" <document.pdf> --ocr-cmd 'tesseract {input} stdout -l eng'
    
    The hook output is spliced into the Markdown at the page's position. Placeholders ({input} {page} {out} {stem} {outdir}) are shell-quoted automatically — use them bare, never wrapped in quotes.
  6. Long documents / small context windows — split into chunks:
    python3 "$PDF_READ" <document.pdf> --chunks 8000
    
    Reads <document>.chunk-001.md, .chunk-002.md, ... in order; the manifest <document>.md.chunks.json lists sizes and page ranges. Do not feed more than fits the model's context; keep the page markers when quoting.
  7. Machine-readable use (pipelines, tools):
    python3 "$PDF_READ" <document.pdf> --json --stdout
    
    Markdown → stdout, JSON envelope → stderr. Exit codes: 0 ok (OCR pages reported, not fatal), 1 error, 2 usage, 3 --fail-on-ocr: pages still lack reliable text after the OCR hook (nothing is written on exit 3).

Read the full file on GitHub · 111 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 · 111 lines · 48 tokens per session scan A 15c53666377a

Subscribe to this mod's changes

pdf-reader is a skill published in the GitHub repository vichhka-git/pdf-reader-skills (5 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 1,362 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

apify-youtube-transcript-scraper

Get YouTube captions, timestamped quotations, SRT/VTT and translated transcripts for videos, channels and playlists through the harshmaur/youtube-transcript-scraper Apify Actor.

sickn33/agentic-awesome-skills · 48 tokens

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

skill-doc-delivery

Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.

nyldn/claude-octopus · 29 tokens

meta-web-to-pdf-briefing

Render a topic into a distributable PDF briefing in three steps: web search → bullet summary → styled PDF. Trigger when the user asks for a PDF briefing on a single topic.

opensquilla/opensquilla · 45 tokens

pkf-writing

Author, update, convert, validate, persist, and render PKF (.pkf) content through message-inline, Library Asset, or Memory Page carriers. Use for structured reports, knowledge pages, delivery cards, or any .pkf body. NOT for recall, memory-graph placement, or curation decisions — those belong to the memory skill.

Prismer-AI/PrismerCloud · 78 tokens

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