ocr-folder

ocr-folder is a skill for Claude Code from alejandro-ventures/llm-agnostic-icm-framework. It costs 52 tokens per session (512 once invoked), scanned A, original, Apache-2.0.

A workflow that turns scanned or image-only PDFs into searchable text. It keeps usable text already present in a PDF and processes only pages that need OCR, or optical character recognition.

In plain words
What is it for?
Use it to process PDFs in a folder, create UTF-8 text files, cache completed files, and record each run.
Why use it?
It avoids reprocessing unchanged files and prevents existing text from being needlessly replaced.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to process PDFs in a folder, create UTF-8 text files…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alejandro-ventures/llm-agnostic-icm-framework/ocr-folder
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 alejandro-ventures/llm-agnostic-icm-framework --skill ocr-folder
Clone the repo
git clone --depth 1 https://github.com/alejandro-ventures/llm-agnostic-icm-framework

Made for: Claude Code.

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 ocr-folder

README.md
[![agentmods](https://agentmods.dev/badge/skills/alejandro-ventures/llm-agnostic-icm-framework/ocr-folder.svg)](https://agentmods.dev/skills/alejandro-ventures/llm-agnostic-icm-framework/ocr-folder)
Your own site
<a href="https://agentmods.dev/skills/alejandro-ventures/llm-agnostic-icm-framework/ocr-folder"><img src="https://agentmods.dev/badge/skills/alejandro-ventures/llm-agnostic-icm-framework/ocr-folder.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 512 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.00052 $0.00512
Opus 5 $0.00026 $0.00256
Sonnet 5 $0.00010 $0.00102
Haiku 4.5 $0.00005 $0.00051

Measured 6d ago against content hash a77d295eb384, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

ocr-folder 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 6d 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.

workflows/ocr-folder/.github/ocr-folder/SKILL.md · 48 lines

What it actually says

ocr-folder

Environment

Runs in its own venv at .venv/ (gitignored). From this workflow folder:

  • Windows PowerShell: python -m venv .venv; .\.venv\Scripts\Activate.ps1; pip install -r requirements.txt
  • macOS/Linux: python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt

A venv isolates dependencies, not the system (see _core/SANDBOXING.md).

Inputs

Source Location Why
PDFs to OCR input/ source documents (gitignored)

Process

  1. List PDFs in the input folder; report count and total size to the user.
  2. For each file, compute a content-hash cache token; skip if already in output/.ocr_cache.
  3. Per page: keep a sufficient native text layer as-is; render and OCR image-only pages.
  4. Gate: if any file would overwrite an existing output, stop and ask for explicit "yes".
  5. Writes go through _core/scripts/sandbox.py (guard_write) — they cannot leave the workspace.
  6. Append a run-log line and a token-tracker entry.

Outputs

Artifact Location Format
Searchable text output/<name>.txt UTF-8
Cache output/.ocr_cache hash list

Gates

  • Overwriting any existing output requires an explicit user "yes".

Run log

Append timestamp,ocr-folder,ocr,<n_processed> to output/run-log.csv, then log the run: python _core/token-tracker/tracker.py log --workflow ocr-folder --action ocr --source local.

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. 6d ago First seen · 48 lines · 52 tokens per session scan A a77d295eb384

Subscribe to this mod's changes

ocr-folder is a skill published in the GitHub repository alejandro-ventures/llm-agnostic-icm-framework (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 52 tokens to every session and 512 once invoked, about $0.0003 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.