360 Secure SkillHub
360 安全技能中心

image-reader

通过 OpenAI 兼容接口调用 Doubao 多模态模型,对本地图片进行 OCR 文本提取、图像描述或自动选择策略的通用分析;以 Python 命令行脚本运行,图片以 base64 编码发送,API Key 需在 config.yaml 中配置。

simonjoe246
simonjoe246
热度 77.42
最近更新 2026-05-11 17:32:01
分类:效率依赖:代码执行 / 读写文件 / 第三方 API / 内部调用大模型应用场景:数据处理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add image-reader
Metadata
name
image-reader
description
Image recognition and understanding tool. Uses a multimodal model (e.g. doubao-seed-2.0-pro, kimi-k2.5) to analyze image content and supports OCR text extraction and image description. Use this skill when a user sends a screenshot or image and needs the text extracted or the image content understood.
compatibility
{"requires":["Python 3","openai>=1.0.0","pyyaml>=6.0"]}

Image Reader Skill

Image recognition and understanding tool that leverages Doubao multimodal models to analyze image content.


Features

  • Text Extraction (OCR): Extract text from images, suitable for documents, screenshots, posters, menus, etc.
  • Image Description: Generate detailed descriptions of images, suitable for photos, illustrations, memes, UI screens, etc.
  • General Analysis: Automatically choose the best analysis strategy based on the image type.

API Configuration

Item Value
API Endpoint https://ark.cn-beijing.volces.com/api/coding/v3
Model doubao-seed-2.0-pro
Authentication API Key (configured in config.yaml)

Usage

Command Line

# General analysis
python image_reader.py /path/to/image.png

# Extract text (OCR)
python image_reader.py /path/to/image.png -p "Extract all text from the image"

# Describe the image
python image_reader.py /path/to/image.png -p "Describe this image in detail"

OpenClaw Skill Invocation

Once installed, you can invoke it using natural language:

Analyze this image
Extract the text from the image
Describe this screenshot

Output

  • Text-heavy images: Returns all extracted text, preserving original formatting.
  • Non-text images: Returns a detailed scene description, including objects, people, colors, style, etc.
  • Mixed content: Provides both text extraction and a visual description.

Technical Details

  • Uses an OpenAI-compatible API to call Doubao multimodal models
  • Images are sent as base64-encoded data
  • The system prompt adapts to the image type to select the most appropriate analysis strategy