OpenClaw skills for Z.AI services.
This repository currently contains one published skill:
zai-vision-mcp: a self-contained OpenClaw skill wrapper for Zhipu's vision MCP server
It is designed to be cloned, dropped into a skills directory, and used without adding local project dependencies.
The upstream Z.AI MCP server works, but in real OpenClaw environments there are a few operational details to handle cleanly:
- long-running stdio through
npxis brittle - sandboxed runs may not be allowed to write
~/.zai/...log - tool schemas can evolve over time
This wrapper handles those details so the skill behaves more predictably in local and sandboxed agent runs.
- Wraps the official
@z_ai/mcp-server - Resolves and launches the server entry directly with
node - Uses a writable temp log path by default
- Auto-installs the MCP server package into a temp cache if needed
- Auto-selects an appropriate vision tool when
--toolis omitted - Supports image analysis, OCR, error screenshot diagnosis, diagram reading, chart analysis, UI diffing, UI-to-artifact, and video analysis
openclawd-zai-skills/
README.md
SKILL.md
scripts/
call_zai_vision_mcp.mjs
Clone this repo anywhere, then either:
- move the whole directory into an OpenClaw skills directory
- or keep it where it is and add its parent directory to
skills.load.extraDirs
You can move this whole directory into any OpenClaw skill location later:
<workspace>/skills/openclawd-zai-skills~/.openclaw/skills/openclawd-zai-skills- or keep it anywhere and load it via
skills.load.extraDirs
Required environment:
Z_AI_API_KEY
Optional environment:
Z_AI_MODE=ZHIPUorZ_AI_MODE=ZAI
The wrapper resolves and starts the official Z.AI vision MCP server entry directly:
node .../@z_ai/mcp-server/build/index.jsZAI_MCP_LOG_PATH is auto-set to a writable file under /tmp unless you override it.
Print wrapper help:
node scripts/call_zai_vision_mcp.mjs --helpList tools exposed by the MCP server:
Z_AI_API_KEY=your_key \
node scripts/call_zai_vision_mcp.mjs --list-tools --timeout-ms 60000Analyze an image:
Z_AI_API_KEY=your_key \
node scripts/call_zai_vision_mcp.mjs \
--image /absolute/path/to/demo.png \
--prompt "Describe this image"Compare two UI screenshots:
Z_AI_API_KEY=your_key \
node scripts/call_zai_vision_mcp.mjs \
--tool ui_diff_check \
--image /absolute/path/to/before.png \
--image2 /absolute/path/to/after.png \
--prompt "Summarize the visual differences"Pass extra tool-specific arguments when needed:
Z_AI_API_KEY=your_key \
node scripts/call_zai_vision_mcp.mjs \
--tool ui_to_artifact \
--image /absolute/path/to/ui.png \
--prompt "Generate a React component" \
--set output_type=reactIf you do not want to move the folder, add its parent directory to skills.load.extraDirs in ~/.openclaw/openclaw.json.
Example:
{
"skills": {
"load": {
"extraDirs": [
"/Users/you/Github"
]
}
}
}If this repo is cloned at /Users/you/Github/openclawd-zai-skills, OpenClaw will discover that directory as a skill folder because it contains SKILL.md.
- The wrapper is dependency-free on the client side. It uses only Node built-ins.
- The wrapper avoids long-running stdio through
npx; it resolves the server package and launches the server entry withnode. - If
@z_ai/mcp-serveris not present yet, the wrapper installs it into a temp cache root before launching it. - The wrapper forces the server log path into
/tmpby default to avoid~/.zai/...logpermission failures in sandboxed runs. - The wrapper times out by default after 60 seconds. Override with
--timeout-msorMCP_REQUEST_TIMEOUT_MS. - This wrapper auto-selects a tool when
--toolis omitted, but you can force a specific tool with--tool. - Tool argument names can vary over time. The wrapper first inspects each tool's input schema and then fills common fields like image path and prompt heuristically.