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.
npx agentmods add skills/vichhka-git/pdf-reader-skills/pdf-readernpx skills add vichhka-git/pdf-reader-skills --skill pdf-readergit clone --depth 1 https://github.com/vichhka-git/pdf-reader-skillsWrote 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.
[](https://agentmods.dev/skills/vichhka-git/pdf-reader-skills/pdf-reader)<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>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.
| Model | Per session | Once 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 |
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.
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.
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— thescripts/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.pyfor one-shot installation). Reference docs live inreferences/(api-guide.md,rules.md). If the folder is missing, clone or copy it from the skill repo, or followREADME.mdstep-by-step installation.
Procedure
PDF_READbelow stands for<this-skill-folder>/scripts/pdf_read.py— the folder next to this SKILL.md.
- Locate the wrapper — resolve
scripts/pdf_read.pynext to this file. If it is not present, tell the user it must be installed with the skill (README.mdhas the steps). - Classify first (fast, ~10–50 ms):
Read the output:python3 "$PDF_READ" <document.pdf> --classifytype=text_based|scanned|image_based|mixed,confidence,pages_needing_ocr=[...]. - Convert (default writes
<document>.md+<document>.md.meta.json):
For a quick answer you may pipe instead:python3 "$PDF_READ" <document.pdf>python3 "$PDF_READ" <document.pdf> --stdout --pages 1-10 - 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).
- OCR fallback for flagged pages — run a local OCR engine per page:
The hook output is spliced into the Markdown at the page's position. Placeholders (python3 "$PDF_READ" <document.pdf> --ocr-cmd 'tesseract {input} stdout -l eng'{input}{page}{out}{stem}{outdir}) are shell-quoted automatically — use them bare, never wrapped in quotes. - Long documents / small context windows — split into chunks:
Readspython3 "$PDF_READ" <document.pdf> --chunks 8000<document>.chunk-001.md,.chunk-002.md, ... in order; the manifest<document>.md.chunks.jsonlists sizes and page ranges. Do not feed more than fits the model's context; keep the page markers when quoting. - Machine-readable use (pipelines, tools):
Markdown → stdout, JSON envelope → stderr. Exit codes: 0 ok (OCR pages reported, not fatal), 1 error, 2 usage, 3python3 "$PDF_READ" <document.pdf> --json --stdout--fail-on-ocr: pages still lack reliable text after the OCR hook (nothing is written on exit 3).
What ships with it
11 files 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.
- README.md 6.8 KB
- references/api-guide.md 3.1 KB
- references/rules.md 2.0 KB
- scripts/install.py 5.4 KB runs code
- scripts/pdf_read.py 28 KB runs code
- tests/check_install.py 574 B runs code
- tests/classify_fixtures.py 972 B runs code
- tests/fixtures/mixed_sample.pdf 120 KB
- tests/fixtures/scanned_sample.pdf 159 KB
- tests/make_fixtures.py 2.8 KB runs code
- tests/test_pdf_read.py 21 KB runs code
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.
- 4d ago First seen · 111 lines · 48 tokens per session scan A 15c53666377a
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.
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.
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, 图表…
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…
citra
Skill "citra" from SylphxAI/pdf-reader-mcp, covering citra — pdf evidence for agents, install, or, tools and sdk.
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…
larksnap-fetch
把飞书/Lark 文档或普通网页抓取并保存到本地,也能编辑用户有权限的飞书文档,并用已登录浏览器执行一次网页搜索。用户要求下载、导出、抓取、写入飞书文档,或联网搜索资料/参考链接时使用本技能,即使没有提到 larksnap。底层通过技能自带 daemon 桥接已登录的 larksnap 浏览器扩展;arXiv 使用独立脚本。.