ocring-pdfs

ocring-pdfs is a skill for Claude Code, Codex from oaustegard/claude-skills. It costs 123 tokens per session (1,278 once invoked), scanned A, original, MIT.

A PDF tool that adds a hidden, searchable text layer to scanned pages while keeping the original page images. It uses OCR, which reads text from pictures.

In plain words
What is it for?
Use it to make scanned documents searchable, extract their text, or pass them to another tool while preserving page layout and coordinates.
Why use it?
Scanned PDFs are often only pictures, so you cannot select, search, or extract their words. This makes the saved PDF readable by text tools without separating the text from the pages.

Skill for Claude CodeCodex

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

Good fit Use it to make scanned documents searchable, extract their text, or pass them to another tool while preserving page layout and coordinates.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/oaustegard/claude-skills/ocring-pdfs/github.svg)](https://agentmods.dev/skills/oaustegard/claude-skills/ocring-pdfs)
Your own site
<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.

agentmods 80×15 button for ocring-pdfs

Your own site · 80×15
<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>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,278 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.00123 $0.01278
Opus 5.5 $0.00049 $0.00511
Sonnet 5.5 $0.00025 $0.00256
Haiku 4.5 $0.00012 $0.00128

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

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/ensure_ocr.sh), 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.

ocring-pdfs/SKILL.md · 103 lines

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.

Read the full file on GitHub · 103 lines

Files

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.

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 · 103 lines · 123 tokens per session scan A 74e8cf721e2c

Subscribe to this mod's changes

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.

Related

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…

josuebustosn/claude-students · 234 tokens

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.

K-Dense-AI/scientific-agent-skills · 52 tokens

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…

K-Dense-AI/scientific-agent-skills · 87 tokens

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.

K-Dense-AI/scientific-agent-skills · 62 tokens

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…

K-Dense-AI/scientific-agent-skills · 96 tokens

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.

K-Dense-AI/scientific-agent-skills · 59 tokens