npx skills add ...
npx skills add zai-org/glm-skills --skill glmocr-handwriting
Official skill for recognizing handwritten text from images using ZhiPu GLM-OCR API. Supports various handwriting styles, languages, and mixed handwritten/printed content. Use this skill when the user wants to read handwritten notes, convert handwriting to text, or OCR handwritten documents.
npx skills add zai-org/glm-skills --skill glmocr-handwriting
Recognize handwritten text from images and PDFs using the ZhiPu GLM-OCR layout parsing API.
| Resource | Link |
|---|---|
| Get API Key | 智谱开放平台 API Keys |
| API Docs | Layout Parsing / 版面解析 |
脚本通过 ZHIPU_API_KEY 环境变量获取密钥,可与其他智谱技能复用同一个 key。
This script reads the key from the ZHIPU_API_KEY environment variable. Reusing the same key across Zhipu skills is optional.
Get Key / 获取 Key: Visit 智谱开放平台 API Keys to create or copy your key.
Setup options / 配置方式(任选一种):
Global config (recommended) / 全局配置(推荐): Set once in openclaw.json under env.vars, all Zhipu skills will share it:
Skill-level config / Skill 级别配置: Set for this skill only in openclaw.json:
Shell environment variable / Shell 环境变量: Add to ~/.zshrc:
💡 如果你已为其他智谱 skill(如
glmocr、glmv-caption、glm-image-generation)配置过 key,它们共享同一个ZHIPU_API_KEY,无需重复配置。
ZHIPU_API_KEY (required / 必需)GLM_OCR_TIMEOUT (optional timeout seconds / 可选超时秒数)https://open.bigmodel.cn/api/paas/v4/layout_parsing--include-raw only when needed for debugging.⛔ MANDATORY RESTRICTIONS / 强制限制 ⛔
python scripts/glm_ocr_cli.pyAfter running the script, present the OCR result clearly and safely.
text) in full--include-raw)| Parameter | Required | Description |
|---|---|---|
--file-url | One of | URL to image/PDF |
--file | One of | Local file path to image/PDF |
--output, -o | No | Save result JSON to file |
--pretty | No | Pretty-print JSON output |
--include-raw | No | Include raw upstream API response in result field (debug only) |
Key fields:
ok — whether recognition succeededtext — extracted text in Markdown (use this for display)layout_details — layout analysis detailserror — error details on failureAPI key not configured:
→ Show exact error to user, guide them to configure
Authentication failed (401/403): API key invalid/expired → reconfigure
Rate limit (429): Quota exhausted → inform user to wait
File not found: Local file missing → check path