ocr — Claude Code skill: what it does, how to install
Extracts text from images and PDF files via optical recognition. It helps read tables from screenshots or digitise scanned documents directly in agent sessions.
npx skills add mr-shaper/opencode-skill-hybrid-ocr --skill ocr -a claude-codeWhat ocr does
The skill routes visual files to a local scripts/ocr.py Python runner. Standard execution relies on DeepSeek-OCR, while the --fast flag shifts processing to PaddleOCR for quicker results. Output can be emitted as raw text or structured via --json.
Custom instructions pass through the --prompt argument. This lets you ask the engine to output detected tables straight into Markdown. Python 3 must be available on your path to run the underlying script.
Supported image types cover PNG, JPG, JPEG, BMP, GIF, WEBP, and TIFF alongside standard PDF files. Over 100 languages are covered, with dedicated handling for Chinese and English text.
What it helps with
- extract text from screenshot or photo assets
- convert printed tables on images into Markdown tables
- pull text layers from scanned PDF documents
- format optical character recognition results as structured JSON
Example prompts for the agent
- Extract text from
document.pngand output the result as JSON. - Parse
table.pngand render the table as markdown using--prompt. - Run OCR on
invoice.pdfin fast mode with the--fastflag.
How to install ocr
1Skills CLI (Vercel)
npx skills add mr-shaper/opencode-skill-hybrid-ocr --skill ocr -a claude-code2Manually: put the files in place
~/.claude/skills/ocr/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ocr/
1Skills CLI (Vercel)
npx skills add mr-shaper/opencode-skill-hybrid-ocr --skill ocr -a codex2Manually: put the files in place
.agents/skills/ocr/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mr-shaper/opencode-skill-hybrid-ocr --skill ocr -a cursor2Manually: put the files in place
.cursor/skills/ocr/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mr-shaper/opencode-skill-hybrid-ocr ocr2Manually: put the files in place
.github/skills/ocr/SKILL.md1Skills CLI (Vercel)
npx skills add mr-shaper/opencode-skill-hybrid-ocr --skill ocr -a gemini-cli2Platform CLI
gemini skills install https://github.com/mr-shaper/opencode-skill-hybrid-ocrManually: put the files in place
.devin/skills/ocr/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mr-shaper/opencode-skill-hybrid-ocr --skill ocr -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ocr
How to install ocr in Claude Code?
Run npx skills add mr-shaper/opencode-skill-hybrid-ocr --skill ocr -a claude-code. The definition is saved to ~/.claude/skills/ocr/SKILL.md.
What is the difference between standard and --fast mode?
The default pipeline runs DeepSeek-OCR. Supplying --fast routes the recognition to PaddleOCR instead for shorter processing times.
Which document and image formats are supported?
The runner accepts PDF documents as well as PNG, JPG, JPEG, BMP, GIF, WEBP, and TIFF images.