← 返回 Skills 市场
197
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install image-reader-xytest
功能描述
识别本地图片内容(支持中文),通过 OCR.space 免费 API 实现。
使用说明 (SKILL.md)
image-reader Skill
识别本地图片内容(支持中文),通过 OCR.space 免费 API 实现。
工作流程
- 接收图片路径
- 调用 OCR.space API 进行识别
- 返回识别结果
Python 脚本
保存到 {skill_root}/scripts/ocr_image.py:
import urllib.request, urllib.parse, base64, io, json, sys
from PIL import Image
img_path = sys.argv[1] if len(sys.argv) > 1 else sys.stdin.read().strip()
img = Image.open(img_path)
img_small = img.resize((1600, 2400), Image.LANCZOS)
buf = io.BytesIO()
img_small.save(buf, format='JPEG', quality=80)
b64_data = base64.b64encode(buf.getvalue()).decode()
url = 'https://api.ocr.space/parse/image'
params = urllib.parse.urlencode({
'base64Image': 'data:image/jpeg;base64,' + b64_data,
'language': 'chs',
'isOverlayRequired': 'false',
'detectOrientation': 'true',
'scale': 'true',
'OCREngine': '2',
})
data = params.encode('utf-8')
req = urllib.request.Request(url, data=data)
req.add_header('Content-Type', 'application/x-www-form-urlencoded')
req.add_header('apikey', 'helloworld') # OCR.space free demo key
with urllib.request.urlopen(req, timeout=30) as resp:
raw = resp.read()
result = json.loads(raw.decode('utf-8', errors='replace'))
if 'ParsedResults' in result:
for r in result['ParsedResults']:
print(r['ParsedText'])
else:
print('OCR识别失败:', result)
使用方式
python {skill_root}/scripts/ocr_image.py "F:/1.jpg"
依赖
- Python 3
- Pillow (
pip install pillow)
安全使用建议
This skill appears internally consistent with its purpose. Before installing, consider: (1) Privacy — your image is uploaded to a third-party service (api.ocr.space); do not send sensitive images unless you accept that. (2) Output file — recognized text is saved under the skill's scripts folder as <image_name>_ocr.txt; check/write permissions. (3) API key — the script uses the public demo key 'helloworld' (limited quota); if you need production use, replace it with your own OCR.space API key (modify the script to accept an env var for the key to avoid hardcoding). (4) Dependencies — ensure Python 3 and Pillow are installed. If you want stronger guarantees, review/modify the script to avoid sending sensitive images or to use an on-prem OCR solution.
功能分析
Type: OpenClaw Skill
Name: image-reader-xytest
Version: 1.0.0
The skill provides OCR functionality by sending local image data to the legitimate OCR.space API (api.ocr.space) using a public demo API key ('helloworld'). The Python script (scripts/ocr_image.py) correctly implements the stated purpose of resizing images and processing them via a third-party service, with no evidence of malicious intent, data exfiltration beyond the API's requirements, or prompt injection.
能力评估
Purpose & Capability
Name/description (local OCR using OCR.space) align with the included Python script and SKILL.md. The script performs image resizing, base64-encodes the image, and posts to api.ocr.space — functionality expected for this purpose.
Instruction Scope
Instructions only run the provided script against a local image path and require Pillow; they do not read unrelated files or environment variables. Note: the script transmits the image content to OCR.space (a third-party endpoint) and writes the recognized text to a file in the skill's scripts directory, which are privacy-relevant behaviors users should be aware of.
Install Mechanism
No install spec; this is an instruction-only skill that requires Python and the Pillow package (pip). Nothing is downloaded or written by an installer.
Credentials
No environment variables or credentials are requested. The script hardcodes OCR.space's public demo API key ('helloworld'), which is consistent with a demo usage but has limited quota and is not a secret; no unrelated credentials are present.
Persistence & Privilege
The skill does not request persistent/always-on presence and does not modify other skills or system-wide settings. It writes an output file to its own scripts directory, which is expected for a local OCR helper.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install image-reader-xytest - 安装完成后,直接呼叫该 Skill 的名称或使用
/image-reader-xytest触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of image-reader skill.
- Recognizes content from local images (including Chinese) using the free OCR.space API.
- Includes a Python script for submitting images and returning extracted text.
- Easy CLI usage; requires Python 3 and Pillow.
元数据
常见问题
image-reader-xytest 是什么?
识别本地图片内容(支持中文),通过 OCR.space 免费 API 实现。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 197 次。
如何安装 image-reader-xytest?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install image-reader-xytest」即可一键安装,无需额外配置。
image-reader-xytest 是免费的吗?
是的,image-reader-xytest 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
image-reader-xytest 支持哪些平台?
image-reader-xytest 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 image-reader-xytest?
由 xytest(@xytest)开发并维护,当前版本 v1.0.0。
推荐 Skills