RapidOCR
ClawHub skill for local image OCR with RapidOCR.
When to use
- The user wants text extracted from a local image file.
- The input is a local
png,jpg,jpeg,webp,bmp,tif, ortifffile. - The user wants either plain text output or structured JSON output.
Do not use
- Remote image URLs.
- PDF OCR.
- Relative paths when an absolute path is available.
Execution
- Pass the user's original request directly to the wrapper script.
- Run
node "{baseDir}/run_rapidocr.js" "{{input}}". - If the host does not substitute
{baseDir}, resolve the directory containing thisSKILL.mdand run the sibling filerun_rapidocr.jsfrom there. - For local testing,
RAPIDOCR_PYTHON=/path/to/pythoncan be used to force a specific interpreter. - Otherwise the wrapper auto-discovers
python3,python, orpy. - If the user asks for JSON, preserve the script's JSON output exactly.
- If dependencies are missing, tell the user to run
<python> -m pip install rapidocr onnxruntimewith the interpreter they intend to use. - Publish this folder to ClawHub with slug
rapidocr.
Behavior
- The wrapper extracts a local image path from natural language, JSON-like input, or a direct path.
- The wrapper only reads existing local image files.
- Default output is plain text, one recognized line per line.
- JSON mode returns
text,lines,boxes,scores, andsource.