Skip to main content
skill CX Codex

ocr-super-surya — Claude Code OCR skill: read text from images

A skill that runs OCR over images, screenshots and PDFs with Surya on GPU. Useful when a document only carries its text inside pictures.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aktsmm/Agent-Skills --skill ocr-super-surya -a claude-code
Open on GitHub

What ocr-super-surya does

The skill wraps Surya and walks the agent through the order of operations: pull the native text layer out of a PDF or slide deck first, inventory the pages that have none, and send only those to recognition. For images it tells you to find the highest-resolution original rather than a chat thumbnail, crop the region you need and upscale it 4-7x with LANCZOS. Dense CJK glyphs fall apart at screen scale.

A helper script, scripts/ocr_helper.py, retries automatically when VRAM runs out and handles batches. Raw OCR output stays separate from corrected notes, and targets that came back empty or failed are reported on their own list. Every image gets a source path, source hash, page number and image hash, so duplicates keep their place in the document.

Check your interpreter and the installed packages before you start: surya, torch, pypdf, pypdfium2. The README calls out transformers 5.x specifically — Surya breaks on pad_token_id there, so you need the 4.x line. On Windows under OneDrive the uv install fails on hardlinks; move the cache and the environment outside OneDrive and install with --link-mode=copy.

What it helps with

  • pull text off a screenshot or a photo of a page
  • find PDF pages whose text lives only inside images
  • recognize a document in several languages, Japanese included
  • keep every recognized line tied to its page and source file
  • separate unrecognized fragments from verified text

Example prompts for the agent

  • OCR screenshot.png and save the text to result.txt
  • some pages in this PDF have no text layer — find them and run OCR
  • run OCR on this Japanese scan and flag the ambiguous characters separately

How to install ocr-super-surya

1Skills CLI (Vercel)

npx skills add aktsmm/Agent-Skills --skill ocr-super-surya -a claude-code

2Manually: put the files in place

~/.claude/skills/ocr-super-surya/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ocr-super-surya/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ocr-super-surya

How do I install ocr-super-surya in Claude?

Run npx skills add aktsmm/Agent-Skills --skill ocr-super-surya -a claude-code. The skill lands in ~/.claude/skills/ocr-super-surya/SKILL.md.

What does ocr-super-surya do?

It recognizes text in images and PDFs with Surya on GPU. It looks for an existing text layer first and sends only the pages and images that lack one to recognition.

Why does it fail with a pad_token_id error?

That is an incompatibility with transformers 5.x. Install the 4.x line instead: pip install "transformers<5.0".

Similar skills

Everything for AI and ML →

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor