Ocr

From diillson/chatcli · View interactive version

Ocr is an AI agent skill from the GitHub repository diillson/chatcli. Extract text from images and scanned PDFs using local OCR (Tesseract). Keyless, offline. Use when asked to "read text from this image", "OCR this", "extract text from a screenshot/scan", or given an image with text.

How to use this skill

Skill file

OCR (image / scan → text)

Local, offline OCR via Tesseract — no API, no upload.

Step 0 — Detect

Install: brew install tesseract / apt install tesseract-ocr / choco install tesseract.

Language packs: tesseract-ocr-por (Portuguese), -eng (English), etc.

Image → text

tesseract input.png stdout -l eng
tesseract input.jpg stdout -l por+eng     # multi-language

Write to a file with tesseract input.png out → out.txt, then read with @read.

Scanned PDF → text

Rasterize pages first, then OCR each:

pdftoppm -png -r 300 scan.pdf page
for f in page-*.png; do tesseract "$f" stdout -l por+eng; done > scan.txt

(On Windows, loop with PowerShell Get-ChildItem page-*.png | % { tesseract $_.Name stdout -l por+eng }.)

Tips for accuracy

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.