agentleFS
OpenCovenOpenCoven/coven/skills/ocr/SKILL.md

ocr

Skill75 starsChanged 4 months agoMITView on GitHub

Extract text from screenshots, scanned documents, image files, and PDFs. Use when a user asks to OCR, read text from an image/screenshot/scan, transcribe visible text, extract text from a scanned PDF, compare OCR text, or convert image/PDF text into Markdown/JSON/plain text.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to extract text from local screenshots, images, scans, and PDFs with a repeatable workflow.

    line 8
  2. Distinctive:

    Prefer the bundled helper when the user needs exact-ish text extraction from a local file:

    line 12
  3. Distinctive:

    If the user needs high confidence, run JSON output and mention low-confidence lines or ambiguous characters.

    line 37
  4. Distinctive:

    If the user asks for a clean transcript, lightly normalize whitespace but do not silently rewrite wording.

    line 38
  5. Very specific:

    Use scripts/ocr.py for local images/PDFs and repeatable extraction.

    line 42
  6. Very specific:

    Use the model image tool when the user asks for visual understanding, layout interpretation, or when OCR output alone is not enough.

    line 43
  7. Very specific:

    Use pdftotext directly only for text-native PDFs when no OCR is needed.

    line 44
  8. Very specific:

    If a dependency is missing, install it or fall back to the image tool for one-off extraction.

    line 61

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OCR

Use this skill to extract text from local screenshots, images, scans, and PDFs with a repeatable workflow.

Quick start

Prefer the bundled helper when the user needs exact-ish text extraction from a local file:

python3 ~/.openclaw/workspace/skills/ocr/scripts/ocr.py <path> --format text

Useful variants:

# Structured output with per-line confidence/bounding boxes
python3 ~/.openclaw/workspace/skills/ocr/scripts/ocr.py screenshot.png --format json

# Markdown output from a scanned PDF, OCRing up to the first 5 pages
python3 ~/.openclaw/workspace/skills/ocr/scripts/ocr.py scan.pdf --force-ocr --max-pages 5 --format markdown

# Multiple languages for macOS Vision OCR
python3 ~/.openclaw/workspace/skills/ocr/scripts/ocr.py receipt.jpg --languages en-US,es-ES --format text

Workflow

  1. Locate the file. If the image/PDF is attached in chat, use the local attachment path the runtime provides.
  2. For a single image or scanned PDF, run scripts/ocr.py.
  3. For text-native PDFs, let ocr.py use pdftotext first; only use --force-ocr when the PDF is a scan or the extracted text is wrong.
  4. Inspect output before relying on it. OCR can confuse punctuation, columns, totals, handwriting, low contrast, and small text.
  5. If the user needs high confidence, run JSON output and mention low-confidence lines or ambiguous characters.
  6. If the user asks for a clean transcript, lightly normalize whitespace but do not silently rewrite wording.

Tool choices

  • Use scripts/ocr.py for local images/PDFs and repeatable extraction.
  • Use the model image tool when the user asks for visual understanding, layout interpretation, or when OCR output alone is not enough.
  • Use pdftotext directly only for text-native PDFs when no OCR is needed.

Script behavior

scripts/ocr.py supports:

  • image inputs: PNG, JPEG, TIFF, BMP, GIF, WebP, HEIC/HEIF
  • PDF inputs: embedded text via pdftotext, scanned pages via pdftoppm + macOS Vision OCR
  • directory inputs: processes supported files in sorted order
  • output formats: text, json, markdown

Dependencies:

  • macOS swift + Vision framework for image OCR
  • pdftotext for text-native PDFs
  • pdftoppm for scanned PDF rasterization

If a dependency is missing, install it or fall back to the image tool for one-off extraction.

Reporting results

Be explicit about uncertainty:

  • Say “OCR reads…” or “I extracted…” rather than presenting uncertain OCR as ground truth.
  • Preserve line breaks when they matter, especially for receipts, forms, addresses, code, and tables.
  • For sensitive documents, summarize only what the user requested and avoid exposing unnecessary personal data.
  • For financial/legal/medical text, flag that OCR may need human verification before decisions.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.