Skip to content
Skillv1.0.0

image-to-text

Extract text and structured data from images using Vision AI (OCR). Use when: reading text from screenshots, extracting data from scanned documents, converting images of tables/forms/charts to structu

by terminalskills(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from terminalskills/skills (skills/image-to-text/SKILL.md). Install upstream with npx skills add terminalskills/skills --skill image-to-text. Copyright stays with the author (MIT).

Image to Text

Overview

Extract all readable text from an image using OCR (Tesseract). Returns the full text content along with word-level bounding boxes and confidence scores.

  • Reading text content from a screenshot or design mockup
  • Extracting UI copy (labels, buttons, headings) so you don't have to retype it
  • Getting text positions and bounding boxes from a design image

Instructions

  1. The image is passed to Tesseract.js for optical character recognition
  2. Tesseract segments the image into lines and words
  3. Returns the full text plus word-level details (position, confidence)

Run the extraction script:

bash <skill-path>/scripts/image-to-text.sh <image-path> [language]

Arguments:

  • image-path — Path to the image file (required)
  • language — OCR language code (optional, defaults to eng). Common: eng, fra, deu, spa, chi_sim, jpn

The script outputs JSON with extracted text and metadata:

{
  "text": "Request work\nSuggestions\nPlumbing\nHVAC\nCleaning\nElectrical",
  "confidence": 87.4,
  "words": [
    {
      "text": "Request",
      "confidence": 94.2,
      "bbox": { "x0": 142, "y0": 180, "x1": 268, "y1": 204 }
    }
  ],
  "lines": [
    {
      "text": "Request work",
      "confidence": 95.1,
      "bbox": { "x0": 142, "y0": 180, "x1": 332, "y1": 204 }
    }
  ]
}

After extracting text, present the content grouped by lines and use the extracted text directly when implementing UI copy from a design.

Examples

Example 1: Extract text from a mobile app screenshot

bash <skill-path>/scripts/image-to-text.sh ./screenshot.png

Output:

Extracted text (87.4% confidence):

  Request work
  Suggestions
  Plumbing
  HVAC
  Cleaning
  Electrical

Found 6 lines, 6 words.

Example 2: Extract French text from a scanned invoice

bash <skill-path>/scripts/image-to-text.sh ./invoice-scan.png fra

Tesseract uses the French language model to correctly recognize accented characters and French-specific formatting. The extracted text can then be parsed for invoice fields like total, date, and line items.

Guidelines

  • Tesseract works best with clean, high-contrast text. Screenshots of rendered UI work well. Photos of text at angles or with noise may produce poor results.
  • Pass the correct language code as the second argument when processing non-English text. Tesseract needs the right language model to recognize characters.
  • First run is slow because Tesseract downloads language data (~4MB for English). Subsequent runs are faster.
  • For structured documents (tables, forms), post-process the extracted text to parse it into JSON or CSV format.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/terminalskills-skills-image-to-text/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

terminalskills-skills-image-to-text.ocm.jsonjson
{
  "ocm": "1",
  "id": "terminalskills-skills-image-to-text",
  "kind": "skill",
  "name": "image-to-text",
  "description": "Extract text and structured data from images using Vision AI (OCR). Use when: reading text from screenshots, extracting data from scanned documents, converting images of tables/forms/charts to structured text.",
  "publisher": "terminalskills",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "ocr",
      "image-to-text",
      "vision-ai",
      "text-extraction",
      "document",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Extract text and structured data from images using Vision AI (OCR). Use when: reading text from screenshots, extracting data from scanned documents, converting images of tables/forms/charts to structured text."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/terminalskills/skills",
      "path": "skills/image-to-text/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/terminalskills/skills/blob/HEAD/skills/image-to-text/SKILL.md",
      "key": "terminalskills/skills/skills/image-to-text/SKILL.md"
    },
    "compatibility": "Node.js 18+",
    "license": "MIT"
  },
  "instructions": "# Image to Text\n\n## Overview\n\nExtract all readable text from an image using OCR (Tesseract). Returns the full text content along with word-level bounding boxes and confidence scores.\n\n- Reading text content from a screenshot or design mockup\n- Extracting UI copy (labels, buttons, headings) so you don't have to retype it\n- Getting text positions and bounding boxes from a design image\n\n## Instructions\n\n1. The image is passed to Tesseract.js for optical character recognition\n2. Tesseract segments the image into lines and words\n3. Returns the full text plus word-level details (position, confidence",
  "cost": {
    "context_tokens": 671
  }
}

Fetch it by URL: GET /api/v1/registry/terminalskills-skills-image-to-text/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.