Design & media

Ghost Eye

Try it

Ghost Eye ๐Ÿ‘๏ธ โ€” Let any pure-text LLM see images through any vision model. OCR + visual summary in one shot.

What it does

Ghost Eye ๐Ÿ‘๏ธ โ€” Let any pure-text LLM see images through any vision model. OCR + visual summary in one shot.

The skill document

Ghost Eye ๐Ÿ‘๏ธ

Give your text-only LLM the power to see. Ghost Eye is a lightweight image preprocessing bridge: when an image enters the conversation, it calls any OpenAI-compatible vision model (default: nex-agi/Nex-N2-Pro), produces a structured plain-text output (full OCR + visual summary), and feeds it back into the conversation โ€” so your pure-text model can "see" without ever touching a multimodal API.

What it does

User sends image โ†’ Ghost Eye detects โ†’ vision model analyzes โ†’ OCR text + scene summary โ†’ your LLM answers

Two modes

When multimodalPreprocess is configured, Ghost Eye fires automatically on any inbound image. The user never knows it's there โ€” they just get answers about images.

Mode 2: Tool-call mode

Registered as analyze_image_by_nexn2 tool (name stays for backward compatibility). Your LLM calls it explicitly when it sees an image. Add this to the system prompt:

When the user sends an image, screenshot, photo, or document scan, call the analyze_image_by_nexn2 tool to extract text and describe the image, then answer based on the returned content.

Workflow

Step 1: Receive image

Priority: --image-path > --image-url > --image-base64

โ›” Always prefer --image-path to avoid command-line Argument list too long errors with large base64 strings. Only fall back to --image-url or --image-base64 when no local path is available.

# Preferred: local file path (no size limit)
python3 {baseDir}/scripts/analyze.py --image-path ""

# Fallback: public URL
python3 {baseDir}/scripts/analyze.py --image-url ""

# Last resort: base64 (small images only, <50KB)
python3 {baseDir}/scripts/analyze.py --image-base64 ""

The script handles:

  • Format validation (JPG/PNG/WebP/GIF/BMP via magic bytes)
  • Cache check / read / write (MD5-based, 7-day TTL)
  • Image compression (Pillow, max 1920px longest edge, quality 85%)
  • API call with 1 automatic retry
  • Structured JSON output

Step 2: Parse JSON output

Success:

{"success": true, "content": "ใ€OCRๆ–‡ๅญ—ๆๅ–ใ€‘\n...\n\nใ€็”ป้ขๅ†…ๅฎนๆ€ป็ป“ใ€‘\n...", "metadata": {"model": "...", "tokens_used": 1200, "cached": false, "process_time_ms": 1500}}

Error:

{"success": false, "content": "error message", "metadata": {}}

Pass content directly into the LLM conversation context.

Step 3: Caching

  • Cache directory: {baseDir}/cache/ (auto-created)
  • Cache key: MD5 hash of raw image bytes
  • TTL: 7 days (NEXN2_CACHE_TTL_DAYS)
  • Clear cache: delete all .json files in {baseDir}/cache/
  • Toggle: NEXN2_CACHE_ENABLE=true/false

Environment variables

VariableRequiredDefault
NEXN2_API_KEYโœ… Yesโ€”
NEXN2_BASE_URLNohttps://api.siliconflow.cn/v1
NEXN2_MODEL_NAMENonex-agi/Nex-N2-Pro
NEXN2_PROMPT_TEMPLATENoBuilt-in structured template
NEXN2_IMAGE_COMPRESSNotrue
NEXN2_CACHE_ENABLENotrue
NEXN2_CACHE_TTL_DAYSNo7
NEXN2_TIMEOUT_MSNo30000

If NEXN2_API_KEY is not set, returns a friendly Chinese error message.

Error handling

ScenarioReturns
Network/API failure (after retry)Friendly "service unavailable" message
Unsupported format"Please use JPG/PNG/WebP format"
Content safety block"Image flagged by safety filter"
Empty model output"No content returned, try a different image"

โš ๏ธ Errors never crash the conversation โ€” structured JSON response is always returned.

Setup

In openclaw.json under skills.entries:

"ghost-eye": {
  "enabled": true,
  "apiKey": { "source": "env", "provider": "default", "id": "NEXN2_API_KEY" },
  "env": {
    "NEXN2_BASE_URL": "https://api.siliconflow.cn/v1",
    "NEXN2_MODEL_NAME": "nex-agi/Nex-N2-Pro",
    "NEXN2_IMAGE_COMPRESS": "true",
    "NEXN2_CACHE_ENABLE": "true",
    "NEXN2_CACHE_TTL_DAYS": "7",
    "NEXN2_TIMEOUT_MS": "30000"
  }
}

For multimodalPreprocess auto-mode, see references/multimodal-config.md.

Supported platforms

  • SiliconFlow (default, China-accessible)
  • OpenRouter
  • Any OpenAI-compatible chat completions endpoint

Safety

  • โ›” Image base64 is never logged or written to conversation text
  • โ›” API key is never hardcoded
  • โ›” Temporary files are cleaned up immediately after processing
  • โš ๏ธ Output is always plain text / Markdown โ€” never binary, never images

Related skills

Turn images, video, audio, or documents into text. Use when the user says "what's in this image", "describe / caption this", "tag these photos", "read this d...

1 installs

Visual inspection helper for VLM and OCR workflows. Use when agent needs to help a vision model see an image more clearly before re-analysis: rotate misalign...

18 installs2 stars

Use the AutoGLM Image Recognition API to analyze and describe image content. Use this skill when the user needs image analysis, object or scene recognition,...

4 installs

Use when understanding images with Alibaba Cloud Model Studio Qwen VL models (qwen3-vl-plus/qwen3-vl-flash and latest aliases). Use when building image Q&A,...

16 installs

Ghost (ghost.org). Use this skill for ANY Ghost request โ€” reading, creating, and updating data. Whenever a task involves Ghost, use this skill instead of cal...

Process a Loom share URL into multimodal context - downloaded video, sampled frames at one frame per 5 seconds, and the auto-generated transcript. Triggers w...

1 installs