image-to-text — Claude Code skill: OCR for screenshots
Pulls readable text out of an image with OCR and returns it alongside word positions. Handy when someone drops a screenshot or mockup in chat and you need the copy.
npx skills add pascalorg/skills --skill image-to-text -a claude-codeWhat image-to-text does
The skill runs an image through Tesseract.js. You get the full text line by line, an overall confidence score, and bounding boxes for every word and line. Those coordinates matter when layout is part of the question.
It works through a script: bash <skill-path>/scripts/image-to-text.sh <image-path> [language]. The image path is required; the language code is the second argument and defaults to eng. Other codes include fra, deu, spa, chi_sim and jpn. You can also just tell the agent what is on the screenshot and let it pick the skill.
The first run takes longer than the rest because Tesseract downloads language data, roughly 4MB for English. Recognition is built for clean, high-contrast text. UI screenshots come out well; photos taken at an angle or with noise turn into mush, so check the output instead of pasting it blind. A wrong language code garbles the characters, so pass the right one up front.
What it helps with
- read text off a screenshot without retyping it
- lift button labels and headings from a design mockup
- get word coordinates to check a layout
- recognize text on a French or German image
- turn UI strings in a picture into a usable list
Example prompts for the agent
- extract the text from ./screenshot.png
- pull the labels off ./mockup.png, language fra
- read this screenshot and show me the text line by line
How to install image-to-text
1Skills CLI (Vercel)
npx skills add pascalorg/skills --skill image-to-text -a claude-code2Manually: put the files in place
~/.claude/skills/image-to-text/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/image-to-text/
1Skills CLI (Vercel)
npx skills add pascalorg/skills --skill image-to-text -a codex2Manually: put the files in place
.agents/skills/image-to-text/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pascalorg/skills --skill image-to-text -a cursor2Manually: put the files in place
.cursor/skills/image-to-text/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pascalorg/skills image-to-text2Manually: put the files in place
.github/skills/image-to-text/SKILL.md1Skills CLI (Vercel)
npx skills add pascalorg/skills --skill image-to-text -a gemini-cli2Platform CLI
gemini skills install https://github.com/pascalorg/skills --path image-to-textManually: put the files in place
.devin/skills/image-to-text/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pascalorg/skills --skill image-to-text -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 image-to-text
How do I install image-to-text in Claude?
Run npx skills add pascalorg/skills --skill image-to-text -a claude-code. The skill then lives at ~/.claude/skills/image-to-text/SKILL.md.
What does image-to-text do?
It sends an image through OCR and returns the recognized text, a confidence score, and bounding boxes for words and lines. That turns a screenshot or mockup into copy you can use directly.
Why is the first run slow?
Tesseract downloads language data on the first call, about 4MB for English. Later runs are faster.