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/kocoro-lab/kocoro/pdf-readernpx skills add Kocoro-lab/Kocoro --skill pdf-readergit clone --depth 1 https://github.com/Kocoro-lab/KocoroWrote 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/kocoro-lab/kocoro/pdf-reader)<a href="https://agentmods.dev/skills/kocoro-lab/kocoro/pdf-reader"><img src="https://agentmods.dev/badge/skills/kocoro-lab/kocoro/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.00038 | $0.00473 |
| Opus 5 | $0.00019 | $0.00236 |
| Sonnet 5 | $0.00008 | $0.00095 |
| Haiku 4.5 | $0.00004 | $0.00047 |
Grade A, and why
pdf-reader scanned grade A with 1 finding 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 5d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
subprocess.check_call(['pip3', 'install', 'pymupdf', '-q']) What it actually says
PDF Reader
Analyze PDF files using the file_read tool which natively supports PDF rendering.
How file_read handles PDFs
file_readwith a.pdfpath renders pages as images for vision analysis- Parameters:
offset= start page (0-based),limit= max pages (default 5) - Each page is rendered at 144 DPI, resized to 1568px max dimension
- Returns image blocks that you can analyze with vision
Workflow
-
Read the PDF: Call
file_readwith the PDF path. It will render pages as images automatically.{"path": "/path/to/file.pdf"} -
For multi-page PDFs: Read in batches using offset and limit.
{"path": "/path/to/file.pdf", "offset": 5, "limit": 5} -
Analyze the content: The rendered pages come back as images. Describe what you see — text, tables, charts, forms, signatures, stamps, etc.
-
Extract text if needed: For text-heavy PDFs where you need exact content, use bash with python:
python3 -c " import subprocess subprocess.check_call(['pip3', 'install', 'pymupdf', '-q']) import fitz doc = fitz.open('/path/to/file.pdf') for i, page in enumerate(doc): text = page.get_text() if text.strip(): print(f'--- Page {i+1} ---') print(text) "
Tips
- Always start with
file_read— it handles both scanned and text PDFs via vision - For scanned PDFs (image-based), vision analysis through
file_readis the primary method - For text PDFs where exact character-level accuracy matters, supplement with python text extraction
- When summarizing, note the total page count and which pages you've analyzed
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.
- 5d ago First seen · 53 lines · 38 tokens per session scan A 59361e9e1857
pdf-reader is a skill published in the GitHub repository Kocoro-lab/Kocoro (406 stars, last pushed 2d ago), licensed MIT. It adds 38 tokens to every session and 473 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
pydicom
Use pydicom to read, inspect, write, transform, and safely preflight local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.
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.
skill-doc-delivery
Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.
pdf-extract-create-workflow
Complete PDF lifecycle: download, extract, and generate structured documents with reportlab.
document-direct-python
Use direct Python execution for reliable document creation including spreadsheets, PDFs, and structured reports.
pdf-text-extraction-fallback-85d5ca
Fallback workflow for extracting text from PDFs when readfile returns binary data.