360 Secure SkillHub
360 安全技能中心

Moark Ocr

该 Skill 通过脚本调用 Gitee AI 接口,对指定图片进行光学字符识别。运行时需传入图片路径、用户提示词和 API Key(也可用 GITEEAI_API_KEY 环境变量),脚本输出以 OCR_RESULT: 开头的识别结果,再由调用方提取并展示,同时依据用户提示给出简短总结。仅支持图片输入,依赖 openai 包与 Python 3 环境。

fchange
fchange
热度 59.25
最近更新 2026-05-11 17:35:51
分类:效率依赖:代码执行 / 第三方 API / 读写文件 / 内部调用大模型应用场景:文件转换 / 摘要总结 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add moark-ocr
Metadata
name
moark-ocr
description
Perform Optical Character Recognition (OCR) to extract and recognize text from images.
metadata
{"openclaw":{"emoji":"📷","requires":{"env":["GITEEAI_API_KEY"]},"primaryEnv":"GITEEAI_API_KEY"}}

OCR (Optical Character Recognition)

This skill allows users to extract and recognize text from images using an external GITEE AI API.

Usage

Ensure you have installed the required dependencies (pip install openai). Use the bundled script to perform OCR on an image.

python {baseDir}/scripts/perform_ocr.py --image /path/to/image.jpg --prompt "Users requirements" --api-key YOUR_API_KEY

Options

No additional parameters are required for this skill.

Workflow

  1. Execute the perform_ocr.py script with the parameters from the user.
  2. Parse the script output and find the line starting with OCR_RESULT:.
  3. Extract the OCR result from that line (format: OCR_RESULT: ...).
  4. Display the OCR result to the user using markdown syntax: 📷[OCR Result].

Notes

  • If GITEEAI_API_KEY is none, you should remind user to provide --api-key argument
  • You should not only return the OCR result but also provide a brief summary of the recognized text based on the user's prompt.
  • When you add prompt, you should honestly repeat the requirements from user without any additional imaginations.
  • The script prints OCR_RESULT: in the output - extract this result and display it using markdown image syntax:📷[OCR Result].
  • Always look for the line starting with OCR_RESULT: in the script output.