ocr-screen: Screenshot OCR in Agent

Introduction

In daily development, error dialogs, design annotations, and meeting PPT screenshots often contain only pixels without selectable text. Manual transcription is slow, and sending images to general chatbots often results in lost formatting. If you want a Coding Agent to follow a fixed process for reading images and outputting plain text, you need a specification written into SKILL.md, rather than dictating instructions every time.

Below is an introduction to the SkillHub community Skill ocr-screen (ID @user_25ab92ec/ocr-screen, current version 1.0.0). Its store description is “Screenshot Text Recognition,” categorized under office-efficiency, with subcategories including Document Processing and PDF Processing. The tags indicate requires_api_key=false, meaning no separate API Key configuration is needed.

What is this

ocr-screen is a community-sourced (source: community) Skill uploaded by the publisher user_25ab92ec. It guides models via the standard Agent Skill format (SKILL.md + entry script) to perform OCR on local screenshots/images and output copyable text. Inside the package, skill.json points the entry to src/main.py, requiring Python >=3.9.0.

SkillHub Page: https://www.skillhub.cn/skills/user_25ab92ec/ocr-screen
API Resource URL: https://api.skillhub.cn/user_25ab92ec/ocr-screen

Core Features

Based on the SKILL.md and src/main.py found in the downloaded official Zip package (ocr-screen-1.0.0), the verified capabilities are as follows:

  1. Chinese & English Recognition: SKILL.md declares support for ocr_chinese and ocr_english; the script’s default language is chi_sim+eng (Tesseract).
  2. Image Formats: main.py supports .png, .jpg, .jpeg, .bmp, and .webp.
  3. Command Line Extraction: Supports OCR on single images and writing to text files via --output / -o; --lang can change the recognition language.
  4. Extended Capabilities in Skill Docs: SKILL.md lists slash commands /ocr and /ocr-table, along with table recognition and batch processing. Whether these are mapped to actual slash commands depends on the specific Agent client’s Skill implementation. Refer to the Skill body for table and batch workflows.
  5. PDF: The script prompts for additional dependencies when encountering .pdf files and suggests using other services. If your scenario is primarily PDF-based, please confirm if the dependencies have been installed as described in the Skill instructions.

Dependencies (SKILL.md): pytesseract, Pillow; the system also requires Tesseract OCR (e.g., the tesseract-ocr package on Linux, or brew install tesseract on macOS).

Installation & Activation

The official page provides two common paths: letting the AI follow the installation documentation, or using the SkillHub CLI / Zip package.

Send the following intent to your current Agent (consistent with the official website’s installation card):

Please install @user_25ab92ec/ocr-screen based on https://skillhub.cn/install/skillhub.md.

Installation documentation requirement: When using skillhub install, you must include --dir pointing to the current Agent’s skills directory. Otherwise, it defaults to installing in ./skills/, which may not be recognized.

Method 2: SkillHub CLI

First, confirm if the CLI is installed:

command -v skillhub && skillhub --version

If not installed, you can run (full installation, including default Skills):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

To install this Skill, replace <skills directory> with the path for your client, for example:

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project
skillhub install user_25ab92ec/ocr-screen --dir ~/.cursor/skills/

(Adjust the path according to your actual Agent; see Section 4 of https://skillhub.cn/install/skillhub.md for documentation.)

Method 3: Zip Package

The SkillHub detail page provides a 1.0.0 Zip download (link format: https://api.skillhub.cn/api/v1/download?slug=@user_25ab92ec/ocr-screen). After unzipping, place the Skill directory into the corresponding Agent’s skills path.

Python Dependencies

Before running OCR for the first time, install Python and system dependencies according to SKILL.md:

pip install pytesseract pillow
# Ubuntu/Debian also requires:
sudo apt-get install tesseract-ocr
# macOS:
brew install tesseract

Typical Usage

Slash Command Examples from Skill Documentation

The usage provided in SKILL.md is:

/ocr screenshot.png
/ocr-table form.jpg

In clients that support Skill slash commands, you can specify the image path to the Agent and let it invoke the process according to the Skill flow.

Entry Script (Internal package src/main.py)

Inside the Skill directory, you can also directly call the entry script (consistent with the entry_point in skill.json):

python src/main.py screenshot.png
python src/main.py screenshot.png -o result.txt
python src/main.py screenshot.png --lang chi_sim+eng

The recognition result will be printed to the terminal; if -o is specified, it will also be written to a UTF-8 text file.

SKILL.md also mentions that output can contain plain text and optionally export to Word/Excel; specific steps depend on the Skill body and Agent execution results (the store page’s overviewMd is currently empty with no additional overview).

Use Cases & Notes

Who is it for

  • Users who need to convert Chinese and English text in screenshots or UI images into editable text within environments like Cursor or Claude Code.
  • Users who want to constrain the Agent with a fixed Skill: install Tesseract dependencies first, then read local images, rather than describing the OCR process every time.

Limitations & Notes

  1. Community Skill: The source is community-driven, and the author does not display a verification badge on SkillHub. Please evaluate the script content and permissions yourself before use (the package permissions includes file_access).
  2. Recognition Quality: Depends on Tesseract and image clarity; complex layouts or handwriting may be inaccurate.
  3. PDF / Tables: PDF is not fully implemented in the current version of main.py; table capabilities are subject to the declarations in SKILL.md. It is recommended to test with sample images after deployment.
  4. Store Data (at time of scraping): Rating 100000; Downloads 7034, Installs 228; SkillHub security scan status is benign (page JSON). Data changes over time, please refer to the official website.

Conclusion

ocr-screen consolidates “Screenshot → Text” into an installable Agent Skill: no API Key required, relying on pytesseract and local Tesseract to complete Chinese/English OCR, complete with CLI and /ocr usage in the documentation. If you frequently process text in screenshots within Agent sessions, you can install it to the corresponding skills directory as described above and give it a try.

Official URL: https://api.skillhub.cn/user_25ab92ec/ocr-screen
SkillHub Display Page: https://www.skillhub.cn/skills/user_25ab92ec/ocr-screen

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye