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

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/vichhka-git/pdf-reader-skills/pdf-reader
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.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.svg" alt="Measured on agentmods" 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. 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.00048 $0.01362
Opus 5 $0.00024 $0.00681
Sonnet 5 $0.00010 $0.00272
Haiku 4.5 $0.00005 $0.00136

Measured 4d ago against content hash 15c53666377a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (2 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 1,362 once invoked, about $0.0002 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

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

paddleocr-doc-parsing

Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as LaTeX, figures, seals, charts, headers/footers, multi-column layout and correct reading order. Trigger terms: 文档解析, 版面分析, 版面还原, 表格提取, 公式识别, 多栏排版, 扫描件结构化, 发票, 财报, 复杂 PDF, PDF转Markdown, 图表…

PaddlePaddle/PaddleOCR · 140 tokens

paper-reader

Use when user asks to "read paper", "analyze paper", "summarize paper", "读论文", "分析文献", "帮我看一下这篇paper", "论文笔记", or provides a PDF file that appears to be an academic paper. Specialized for CV/DL papers. Also supports Zotero integration: "读一下这篇论文 ...", "快速看一下这篇论文 ...", "批判性分析这篇论文 ...", "读一下 Zotero 里的 XXX", "批量读一下 Zotero…

huangkiki/dailypaper-skills · 157 tokens

citra

Skill "citra" from SylphxAI/pdf-reader-mcp, covering citra — pdf evidence for agents, install, or, tools and sdk.

SylphxAI/pdf-reader-mcp · 0 tokens

graphic-ebook

Creates professionally designed B2B SaaS e-books in HTML + CSS, exported as print-ready PDF. 3–10 pages, 9 style presets, 11 page layout types. Trigger when user says "create an ebook", "design a lead magnet", "make a PDF guide", "build a gated content piece", "write a B2B ebook", "design a white paper", "create a…

Varnan-Tech/opendirectory · 97 tokens

larksnap-fetch

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

AmbroseX/larksnap · 111 tokens