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 skills add oaustegard/claude-skills --skill ocring-pdfsgit clone --depth 1 https://github.com/oaustegard/claude-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/oaustegard/claude-skills/ocring-pdfs)<a href="https://agentmods.dev/skills/oaustegard/claude-skills/ocring-pdfs"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/ocring-pdfs/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.
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/ocring-pdfs"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/ocring-pdfs.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00123 | $0.01278 |
| Opus 5.5 | $0.00049 | $0.00511 |
| Sonnet 5.5 | $0.00025 | $0.00256 |
| Haiku 4.5 | $0.00012 | $0.00128 |
Grade A, and why
ocring-pdfs 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.
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 — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OCRing PDFs
ocrmypdf writes an invisible text layer over the original page images, so the
output file is both the scan you can look at and a document pdftotext, grep,
and pdfplumber can read. Rasterize-then-tesseract gives you a .txt divorced
from the pages; page numbers and coordinates are gone.
The toolchain is not in the base container. It installs in 18 seconds (measured 2026-09-12: apt 3s, pip 15s), so install it when a scan shows up rather than carrying it in a container layer.
Probe before installing
pdftotext in.pdf - | tr -d '\f \n' | wc -c
Nonzero means the PDF already has a text layer and is not a scan. Extract with
pdftotext or pdfplumber and stop. Running OCR on it wastes a minute, and with
--force-ocr it replaces exact embedded text with a lossy reading of a raster of
itself.
A small nonzero count (tens of characters across many pages) is the mixed case:
a born-digital cover page in front of scanned body pages, or a scan whose
producer stamped a header. --skip-text handles it.
Install
sh scripts/ensure_ocr.sh # English
sh scripts/ensure_ocr.sh nor deu # plus Norwegian and German
Idempotent: 0.8s when everything is already present, 2.6s to add one more
language pack. Installs ghostscript, pngquant, poppler-utils, tesseract
and its language packs via apt, then ocrmypdf via pip.
Run
ocrmypdf --skip-text --deskew --rotate-pages --output-type pdf in.pdf out.pdf
pdftotext out.pdf - | wc -w # verify: zero words means it failed quietly
About 2s per page for a single dense page at 200 DPI on one core. A 300-page
scan is therefore a background job, not a single bash call — launch it detached
with a sentinel file per the external-call pattern in bash-tool-timeout.
Which text-layer mode
| flag | use it when |
|---|---|
--skip-text |
Default. Pages that already carry text are passed through untouched; image-only pages get OCR. The safe choice for anything mixed. |
--force-ocr |
Every page is rasterized and re-OCRed, discarding any existing text. Correct for a scan carrying a junk text layer, and for pages with text-over-image that --skip-text would skip. Destroys real embedded text, so probe first. |
--redo-ocr |
Replaces a previous OCR layer while leaving born-digital text alone. Narrower than --force-ocr and slower to fail on odd inputs. |
What ships with it
2 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.
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.
- 1mo ago First seen · 103 lines · 123 tokens per session scan A 74e8cf721e2c
ocring-pdfs is a skill published in the GitHub repository oaustegard/claude-skills (153 stars, last pushed yesterday), licensed MIT. It adds 123 tokens to every session and 1,278 once invoked, about $0.0005 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-09-13.
Other skills, from other repositories
claude-students
Transforma una carpeta cruda de material de un parcial universitario (PDFs, DOC/DOCX, PPT, audios .ogg de WhatsApp, capturas) en un material de estudio polished y completo — HTML SOTA autocontenido + paquete de artefactos de NotebookLM (podcast en español, infografía, guía de estudio, briefing doc, mind map, quiz…
pydicom
Reads, inspects, writes, transforms, and preflights local DICOM datasets and pixel data. Applies to DICOM metadata, transfer syntaxes, compression plugins, frames, private elements, JSON, and bounded de-identification review.
liteparse
Local document and PDF parsing that returns spatial text with bounding boxes. Use for extracting text from PDFs, DOCX, Office files, and images; running OCR on scans; producing layout-preserved JSON for RAG; batch-ingesting folders of papers; or rendering pages to PNG for multimodal agents. Distinguishing capabilities…
markitdown
Converts heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.
open-notebook
Organizes research with the self-hosted Open Notebook alternative to NotebookLM. Supports source ingestion (PDFs, web pages, audio, video, and Office documents), cited document chat, text and vector search, notes, custom transformations, and multi-speaker podcasts. Use when automating Open Notebook through its REST…
pptx-posters
Creates and audits editable scientific posters in macro-free PowerPoint (.pptx) from author-approved local content and assets. Used when the requested deliverable is a PowerPoint research/conference poster and exact physical, printer, accessibility, provenance, and package-security checks are required.