[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS4Z0PVNCNV66Z5GASJKB3":3,"skill-same:01M7CS4Z0PVNCNV66Z5GASJKB3":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":38,"ownerHtmlUrl":39,"ownerBlogUrl":6,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M7CS4Z0PVNCNV66Z5GASJKB3","glm-image-gen",null,"Official skill for generating high-quality images from text prompts using ZhiPu GLM-Image API. Excellent at scientific illustrations, high-quality portraits, social media graphics, and commercial posters. Supports multiple aspect ratios, HD quality, and watermark control. Use this skill when the user wants to generate images, create AI art, text-to-image, or convert text descriptions into visual content.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglm-image-gen\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: glm-image-gen\ndescription:\n  Official skill for generating high-quality images from text prompts using ZhiPu GLM-Image API.\n  Excellent at scientific illustrations, high-quality portraits, social media graphics, and commercial posters.\n  Supports multiple aspect ratios, HD quality, and watermark control.\n  Use this skill when the user wants to generate images, create AI art, text-to-image,\n  or convert text descriptions into visual content.\nmetadata:\n  openclaw:\n    requires:\n      env:\n        - ZHIPU_API_KEY\n      bins:\n        - python\n    primaryEnv: ZHIPU_API_KEY\n    emoji: \"🎨\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fzai-org\u002FGLM-Image\u002Ftree\u002Fmain\u002Fskills\u002Fglm-image-gen\n---\n\n# GLM-Image Generation Skill \u002F GLM-Image 图片生成技能\n\nGenerate high-quality images from text prompts using the ZhiPu GLM-Image API.\n\n## When to Use \u002F 使用场景\n\n- Generate images from text descriptions \u002F 从文字描述生成图片\n- Create AI art, illustrations, or concept art \u002F 创作 AI 艺术、插画或概念图\n- User mentions \"生图\", \"文生图\", \"AI 绘画\", \"generate image\", \"text-to-image\", \"create image\"\n- User provides a prompt and wants to see it visualized \u002F 用户提供描述并想看到可视化效果\n\n## Key Features \u002F 核心特性\n\n- **High-quality generation**: HD mode produces more detailed, refined images (~20s)\n- **Multiple aspect ratios**: Square, portrait, landscape formats supported\n- **GLM-Image model**: Latest model with improved understanding and quality\n- **Excellent at**: Scientific illustrations (科普插画), high-quality portraits (高质量人像), social media graphics (社交媒体图文), commercial posters (商业海报)\n- **Watermark control**: Enable\u002Fdisable watermarks (requires signed disclaimer for no-watermark)\n- **Content safety**: Built-in content filtering for compliance\n\n## Resource Links \u002F 资源链接\n\n| Resource        | Link                                                                      |\n| --------------- | ------------------------------------------------------------------------- |\n| **Get API Key** | [智谱开放平台 API Keys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys) |\n| **API Docs**    | [Image Generation \u002F 图像生成](https:\u002F\u002Fdocs.bigmodel.cn\u002Fapi-reference\u002F%E6%A8%A1%E5%9E%8B-api\u002F%E5%9B%BE%E5%83%8F%E7%94%9F%E6%88%90) |\n| **Model Docs**  | [GLM-Image 模型文档](https:\u002F\u002Fdocs.bigmodel.cn\u002Fcn\u002Fguide\u002Fmodels\u002Fimage-generation\u002Fglm-image) |\n\n## Prerequisites \u002F 前置条件\n\n### API Key Setup \u002F API Key 配置（Required \u002F 必需）\n\n脚本通过 `ZHIPU_API_KEY` 环境变量获取密钥，可与其他智谱技能复用同一个 key。\nThis script reads the key from the `ZHIPU_API_KEY` environment variable. Reusing the same key across Zhipu skills is optional.\n\n**Get Key \u002F 获取 Key：** Visit [智谱开放平台 API Keys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys) to create or copy your key.\n\n**Setup options \u002F 配置方式（任选一种）：**\n\n1. **Global config (recommended) \u002F 全局配置（推荐）：** Set once in `openclaw.json` under `env.vars`, all Zhipu skills will share it:\n\n   ```json\n   {\n     \"env\": {\n       \"vars\": {\n         \"ZHIPU_API_KEY\": \"你的密钥\"\n       }\n     }\n   }\n   ```\n\n2. **Skill-level config \u002F Skill 级别配置：** Set for this skill only in `openclaw.json`:\n\n   ```json\n   {\n     \"skills\": {\n       \"entries\": {\n         \"glm-image-generation\": {\n           \"env\": {\n             \"ZHIPU_API_KEY\": \"你的密钥\"\n           }\n         }\n       }\n     }\n   }\n   ```\n\n3. **Shell environment variable \u002F Shell 环境变量：** Add to `~\u002F.zshrc`:\n\n   ```bash\n    export ZHIPU_API_KEY=\"你的密钥\"\n\n   ```\n\n> 💡 如果你已为其他智谱 skill（如 `glmocr`、`glmv-caption`）配置过 key，它们共享同一个 `ZHIPU_API_KEY`，无需重复配置。\n\n## Security & Transparency \u002F 安全与透明度\n\n- **Environment variables used \u002F 使用的环境变量：**\n  - `ZHIPU_API_KEY` (required \u002F 必需)\n- **Fixed endpoint \u002F 固定官方端点：** `https:\u002F\u002Fopen.bigmodel.cn\u002Fapi\u002Fpaas\u002Fv4\u002Fimages\u002Fgenerations`\n- **No custom API URL override \u002F 不支持自定义 API URL 覆盖：** avoids accidental key exfiltration via redirected endpoints.\n\n**⛔ MANDATORY RESTRICTIONS \u002F 强制限制 ⛔**\n\n1. **ONLY use GLM-Image API** — Execute the script `python scripts\u002Fglm_image_cli.py`\n2. **NEVER generate images yourself** — Do NOT try to create images using built-in vision or any other method\n3. **NEVER offer alternatives** — Do NOT suggest \"I can try to describe it\" or similar\n4. **IF API fails** — Display the error message and STOP immediately\n5. **NO fallback methods** — Do NOT attempt image generation any other way\n\n### 📋 Output Display Rules \u002F 输出展示规则\n\nAfter running the script, present the generation result clearly.\n\n- Show the generated image URL(s) — images are temporary (30 days), remind user to save\n- Display the prompt used and generation parameters (size, quality)\n- If content_filter indicates issues, show the warning level\n\n**⚠️ Image Display \u002F 图片展示注意：**\n\nThe API returns a temporary image URL (valid for 30 days). You should:\n\n1. **Show the image** — Use the URL to display the image in the chat (if platform supports it)\n2. **Remind user to save** — \"图片链接有效期 30 天，请及时下载保存\"\n3. **Offer to send to Feishu** — If user wants the image sent to a Feishu chat, use the message tool with the image URL\n\n## How to Use \u002F 使用方法\n\n### Generate from Prompt \u002F 从提示词生成\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"一只可爱的小猫咪，坐在阳光明媚的窗台上，背景是蓝天白云\"\n```\n\n### Specify Size \u002F 指定尺寸\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"赛博朋克风格的城市夜景\" --size 1568x1056\n```\n\n### HD Quality (default for glm-image) \u002F 高清质量（glm-image 默认）\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"中国山水画风格，远山近水，云雾缭绕\" --quality hd\n```\n\n### Disable Watermark (requires signed disclaimer) \u002F 关闭水印（需签署免责声明）\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"商业设计素材\" --no-watermark\n```\n\n### Save Image to Local File \u002F 保存图片到本地\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"中国水墨画风格\" --save image.png\npython scripts\u002Fglm_image_cli.py --prompt \"赛博朋克城市\" --size 1728x960 --save ~\u002FPictures\u002Fcyberpunk.png\n```\n\n### Specify User ID (for content moderation) \u002F 指定用户 ID（用于内容审核）\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"...\" --user-id \"user_12345\"\n```\n\n### Specify Model \u002F 指定模型\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"...\" --model glm-image\npython scripts\u002Fglm_image_cli.py --prompt \"...\" --model cogview-4\n```\n\n## CLI Reference \u002F CLI 参数\n\n```\npython {baseDir}\u002Fscripts\u002Fglm_image_cli.py --prompt TEXT [--model MODEL] [--size SIZE] [--quality QUALITY] [--no-watermark] [--user-id ID] [--save FILE]\n```\n\n| Parameter        | Required | Description                                                      |\n| ---------------- | -------- | ---------------------------------------------------------------- |\n| `--prompt`, `-p` | Yes      | Text description of the desired image \u002F 图片的文本描述         |\n| `--model`, `-m`  | No       | Model: glm-image (default), cogview-4, cogview-3-flash \u002F 模型  |\n| `--size`, `-s`   | No       | Image size (default: 1280x1280) \u002F 图片尺寸                     |\n| `--quality`, `-q`| No       | Quality: hd (default) or standard \u002F 质量                        |\n| `--no-watermark` | No       | Disable watermark (requires signed disclaimer) \u002F 关闭水印       |\n| `--user-id`      | No       | End-user ID for content moderation (6-128 chars) \u002F 终端用户 ID  |\n| `--save`         | No       | Save generated image to local file \u002F 保存生成的图片到本地文件   |\n\n## Supported Sizes \u002F 支持的尺寸\n\n**GLM-Image recommended sizes:**\n\n| Size          | Aspect Ratio | Use Case                  |\n| ------------- | ------------ | ------------------------- |\n| 1280x1280     | 1:1          | Square (default)          |\n| 1568×1056     | 3:2          | Landscape \u002F 横向          |\n| 1056×1568     | 2:3          | Portrait \u002F 纵向           |\n| 1472×1088     | ~4:3         | Wide landscape            |\n| 1088×1472     | ~3:4         | Tall portrait             |\n| 1728×960      | 16:9         | Ultra-wide landscape      |\n| 960×1728      | 9:16         | Ultra-tall portrait       |\n\n**Custom sizes \u002F 自定义尺寸:**\n\n- Width and height: 1024px - 2048px\n- Both dimensions must be multiples of 32 \u002F 长宽均需为 32 的整数倍\n- Maximum total pixels: 2^22 (4,194,304 px) \u002F 最大像素数不超过 2^22\n\n## Response Format \u002F 响应格式\n\n**Official API Response:**\n\n```json\n{\n  \"created\": 123,\n  \"data\": [\n    {\n      \"url\": \"\u003Cstring>\"\n    }\n  ],\n  \"content_filter\": [\n    {\n      \"role\": \"assistant\",\n      \"level\": 1\n    }\n  ]\n}\n```\n\n**CLI Output Format:**\n\n```json\n{\n  \"ok\": true,\n  \"model\": \"glm-image\",\n  \"image_url\": \"https:\u002F\u002Fopen.bigmodel.cn\u002F...\u002Fgenerated_image.png\",\n  \"prompt\": \"一只可爱的小猫咪，坐在阳光明媚的窗台上，背景是蓝天白云\",\n  \"size\": \"1280x1280\",\n  \"quality\": \"hd\",\n  \"created\": 1710835200,\n  \"content_filter\": [\n    {\n      \"role\": \"assistant\",\n      \"level\": 3\n    }\n  ],\n  \"saved_file\": \"\u002FUsers\u002Fxxx\u002Fimage.png\",\n  \"error\": null\n}\n```\n\nKey fields:\n\n- `ok` — whether generation succeeded\n- `model` — model used for generation\n- `image_url` — extracted from `data[0].url`, temporary URL (valid 30 days)\n- `prompt` — the text prompt used\n- `size` — generated image dimensions\n- `quality` — hd or standard\n- `created` — Unix timestamp when request was created\n- `content_filter` — content safety analysis array (may be empty)\n  - `role`: where the issue was detected (user\u002Fassistant\u002Fhistory)\n  - `level`: severity 0-3 (0 = most severe, 3 = minor)\n- `saved_file` — absolute path to saved local file (if `--save` was used)\n- `error` — error details on failure\n\n## Content Safety \u002F 内容安全\n\nThe API includes content filtering. If issues are detected, `content_filter` will contain entries with:\n\n- `role`: where the issue was detected (user\u002Fassistant\u002Fhistory)\n- `level`: severity 0-3 (0 = most severe, 3 = minor)\n\n**If level 0-1 detected:** Generation will fail, show error to user.\n**If level 2-3 detected:** Generation may succeed, but warn user about potential issues.\n\n## Error Handling \u002F 错误处理\n\n**API key not configured:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"MISSING_API_KEY\",\n    \"message\": \"ZHIPU_API_KEY not configured. Get your API key at: https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys\"\n  }\n}\n```\n\n→ Show exact error to user, guide them to configure\n\n**Authentication failed (401\u002F403):**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"authentication_error\",\n    \"message\": \"令牌已过期或验证不正确\",\n    \"status\": 401\n  }\n}\n```\n\n→ API key invalid\u002Fexpired → reconfigure\n\n**Rate limit (429):**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"rate_limit_exceeded\",\n    \"message\": \"API rate limit exceeded. Please try again later.\",\n    \"status\": 429\n  }\n}\n```\n\n→ Quota exhausted → inform user to wait or check quota\n\n**Content filter violation:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"content_filter_violation\",\n    \"message\": \"Content safety check failed\",\n    \"status\": 400\n  }\n}\n```\n\n→ Explain that the prompt may contain inappropriate content\n\n**Invalid size:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"INVALID_SIZE\",\n    \"message\": \"Invalid size: 512x512 for model glm-image. Must be multiple of 32, 1024-2048px, max 2^22 pixels\"\n  }\n}\n```\n\n→ Guide user to use valid size from the supported list\n\n**Download failed:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"DOWNLOAD_FAILED\",\n    \"message\": \"Failed to download image to image.png\"\n  }\n}\n```\n\n→ Check file path permissions and disk space\n\n**Network error:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"NETWORK_ERROR\",\n    \"message\": \"Network error: [Errno 8] nodename nor servname provided, or not known\"\n  }\n}\n```\n\n→ Check internet connection\n\n## Prompt Tips \u002F 提示词技巧\n\n**Good prompts:**\n\n- Specific details: \"一只橘色的英国短毛猫，绿色眼睛，坐在木质窗台上\"\n- Style keywords: \"赛博朋克风格\", \"中国水墨画\", \"油画质感\", \"3D 渲染\"\n- Lighting: \"阳光明媚\", \"柔和的逆光\", \"电影感灯光\"\n- Composition: \"特写镜头\", \"广角视角\", \"俯视角度\"\n\n**Avoid:**\n\n- Vague descriptions: \"好看的图片\"\n- Contradictory elements: \"白天和夜晚同时\"\n- Too many subjects: Keep focus on 1-2 main elements\n","# GLM-Image Generation Skill \u002F GLM-Image 图片生成技能\n\nGenerate high-quality images from text prompts using the ZhiPu GLM-Image API.\n\n## When to Use \u002F 使用场景\n\n- Generate images from text descriptions \u002F 从文字描述生成图片\n- Create AI art, illustrations, or concept art \u002F 创作 AI 艺术、插画或概念图\n- User mentions \"生图\", \"文生图\", \"AI 绘画\", \"generate image\", \"text-to-image\", \"create image\"\n- User provides a prompt and wants to see it visualized \u002F 用户提供描述并想看到可视化效果\n\n## Key Features \u002F 核心特性\n\n- **High-quality generation**: HD mode produces more detailed, refined images (~20s)\n- **Multiple aspect ratios**: Square, portrait, landscape formats supported\n- **GLM-Image model**: Latest model with improved understanding and quality\n- **Excellent at**: Scientific illustrations (科普插画), high-quality portraits (高质量人像), social media graphics (社交媒体图文), commercial posters (商业海报)\n- **Watermark control**: Enable\u002Fdisable watermarks (requires signed disclaimer for no-watermark)\n- **Content safety**: Built-in content filtering for compliance\n\n## Resource Links \u002F 资源链接\n\n| Resource        | Link                                                                      |\n| --------------- | ------------------------------------------------------------------------- |\n| **Get API Key** | [智谱开放平台 API Keys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys) |\n| **API Docs**    | [Image Generation \u002F 图像生成](https:\u002F\u002Fdocs.bigmodel.cn\u002Fapi-reference\u002F%E6%A8%A1%E5%9E%8B-api\u002F%E5%9B%BE%E5%83%8F%E7%94%9F%E6%88%90) |\n| **Model Docs**  | [GLM-Image 模型文档](https:\u002F\u002Fdocs.bigmodel.cn\u002Fcn\u002Fguide\u002Fmodels\u002Fimage-generation\u002Fglm-image) |\n\n## Prerequisites \u002F 前置条件\n\n### API Key Setup \u002F API Key 配置（Required \u002F 必需）\n\n脚本通过 `ZHIPU_API_KEY` 环境变量获取密钥，可与其他智谱技能复用同一个 key。\nThis script reads the key from the `ZHIPU_API_KEY` environment variable. Reusing the same key across Zhipu skills is optional.\n\n**Get Key \u002F 获取 Key：** Visit [智谱开放平台 API Keys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys) to create or copy your key.\n\n**Setup options \u002F 配置方式（任选一种）：**\n\n1. **Global config (recommended) \u002F 全局配置（推荐）：** Set once in `openclaw.json` under `env.vars`, all Zhipu skills will share it:\n\n   ```json\n   {\n     \"env\": {\n       \"vars\": {\n         \"ZHIPU_API_KEY\": \"你的密钥\"\n       }\n     }\n   }\n   ```\n\n2. **Skill-level config \u002F Skill 级别配置：** Set for this skill only in `openclaw.json`:\n\n   ```json\n   {\n     \"skills\": {\n       \"entries\": {\n         \"glm-image-generation\": {\n           \"env\": {\n             \"ZHIPU_API_KEY\": \"你的密钥\"\n           }\n         }\n       }\n     }\n   }\n   ```\n\n3. **Shell environment variable \u002F Shell 环境变量：** Add to `~\u002F.zshrc`:\n\n   ```bash\n    export ZHIPU_API_KEY=\"你的密钥\"\n\n   ```\n\n> 💡 如果你已为其他智谱 skill（如 `glmocr`、`glmv-caption`）配置过 key，它们共享同一个 `ZHIPU_API_KEY`，无需重复配置。\n\n## Security & Transparency \u002F 安全与透明度\n\n- **Environment variables used \u002F 使用的环境变量：**\n  - `ZHIPU_API_KEY` (required \u002F 必需)\n- **Fixed endpoint \u002F 固定官方端点：** `https:\u002F\u002Fopen.bigmodel.cn\u002Fapi\u002Fpaas\u002Fv4\u002Fimages\u002Fgenerations`\n- **No custom API URL override \u002F 不支持自定义 API URL 覆盖：** avoids accidental key exfiltration via redirected endpoints.\n\n**⛔ MANDATORY RESTRICTIONS \u002F 强制限制 ⛔**\n\n1. **ONLY use GLM-Image API** — Execute the script `python scripts\u002Fglm_image_cli.py`\n2. **NEVER generate images yourself** — Do NOT try to create images using built-in vision or any other method\n3. **NEVER offer alternatives** — Do NOT suggest \"I can try to describe it\" or similar\n4. **IF API fails** — Display the error message and STOP immediately\n5. **NO fallback methods** — Do NOT attempt image generation any other way\n\n### 📋 Output Display Rules \u002F 输出展示规则\n\nAfter running the script, present the generation result clearly.\n\n- Show the generated image URL(s) — images are temporary (30 days), remind user to save\n- Display the prompt used and generation parameters (size, quality)\n- If content_filter indicates issues, show the warning level\n\n**⚠️ Image Display \u002F 图片展示注意：**\n\nThe API returns a temporary image URL (valid for 30 days). You should:\n\n1. **Show the image** — Use the URL to display the image in the chat (if platform supports it)\n2. **Remind user to save** — \"图片链接有效期 30 天，请及时下载保存\"\n3. **Offer to send to Feishu** — If user wants the image sent to a Feishu chat, use the message tool with the image URL\n\n## How to Use \u002F 使用方法\n\n### Generate from Prompt \u002F 从提示词生成\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"一只可爱的小猫咪，坐在阳光明媚的窗台上，背景是蓝天白云\"\n```\n\n### Specify Size \u002F 指定尺寸\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"赛博朋克风格的城市夜景\" --size 1568x1056\n```\n\n### HD Quality (default for glm-image) \u002F 高清质量（glm-image 默认）\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"中国山水画风格，远山近水，云雾缭绕\" --quality hd\n```\n\n### Disable Watermark (requires signed disclaimer) \u002F 关闭水印（需签署免责声明）\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"商业设计素材\" --no-watermark\n```\n\n### Save Image to Local File \u002F 保存图片到本地\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"中国水墨画风格\" --save image.png\npython scripts\u002Fglm_image_cli.py --prompt \"赛博朋克城市\" --size 1728x960 --save ~\u002FPictures\u002Fcyberpunk.png\n```\n\n### Specify User ID (for content moderation) \u002F 指定用户 ID（用于内容审核）\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"...\" --user-id \"user_12345\"\n```\n\n### Specify Model \u002F 指定模型\n\n```bash\npython scripts\u002Fglm_image_cli.py --prompt \"...\" --model glm-image\npython scripts\u002Fglm_image_cli.py --prompt \"...\" --model cogview-4\n```\n\n## CLI Reference \u002F CLI 参数\n\n```\npython {baseDir}\u002Fscripts\u002Fglm_image_cli.py --prompt TEXT [--model MODEL] [--size SIZE] [--quality QUALITY] [--no-watermark] [--user-id ID] [--save FILE]\n```\n\n| Parameter        | Required | Description                                                      |\n| ---------------- | -------- | ---------------------------------------------------------------- |\n| `--prompt`, `-p` | Yes      | Text description of the desired image \u002F 图片的文本描述         |\n| `--model`, `-m`  | No       | Model: glm-image (default), cogview-4, cogview-3-flash \u002F 模型  |\n| `--size`, `-s`   | No       | Image size (default: 1280x1280) \u002F 图片尺寸                     |\n| `--quality`, `-q`| No       | Quality: hd (default) or standard \u002F 质量                        |\n| `--no-watermark` | No       | Disable watermark (requires signed disclaimer) \u002F 关闭水印       |\n| `--user-id`      | No       | End-user ID for content moderation (6-128 chars) \u002F 终端用户 ID  |\n| `--save`         | No       | Save generated image to local file \u002F 保存生成的图片到本地文件   |\n\n## Supported Sizes \u002F 支持的尺寸\n\n**GLM-Image recommended sizes:**\n\n| Size          | Aspect Ratio | Use Case                  |\n| ------------- | ------------ | ------------------------- |\n| 1280x1280     | 1:1          | Square (default)          |\n| 1568×1056     | 3:2          | Landscape \u002F 横向          |\n| 1056×1568     | 2:3          | Portrait \u002F 纵向           |\n| 1472×1088     | ~4:3         | Wide landscape            |\n| 1088×1472     | ~3:4         | Tall portrait             |\n| 1728×960      | 16:9         | Ultra-wide landscape      |\n| 960×1728      | 9:16         | Ultra-tall portrait       |\n\n**Custom sizes \u002F 自定义尺寸:**\n\n- Width and height: 1024px - 2048px\n- Both dimensions must be multiples of 32 \u002F 长宽均需为 32 的整数倍\n- Maximum total pixels: 2^22 (4,194,304 px) \u002F 最大像素数不超过 2^22\n\n## Response Format \u002F 响应格式\n\n**Official API Response:**\n\n```json\n{\n  \"created\": 123,\n  \"data\": [\n    {\n      \"url\": \"\u003Cstring>\"\n    }\n  ],\n  \"content_filter\": [\n    {\n      \"role\": \"assistant\",\n      \"level\": 1\n    }\n  ]\n}\n```\n\n**CLI Output Format:**\n\n```json\n{\n  \"ok\": true,\n  \"model\": \"glm-image\",\n  \"image_url\": \"https:\u002F\u002Fopen.bigmodel.cn\u002F...\u002Fgenerated_image.png\",\n  \"prompt\": \"一只可爱的小猫咪，坐在阳光明媚的窗台上，背景是蓝天白云\",\n  \"size\": \"1280x1280\",\n  \"quality\": \"hd\",\n  \"created\": 1710835200,\n  \"content_filter\": [\n    {\n      \"role\": \"assistant\",\n      \"level\": 3\n    }\n  ],\n  \"saved_file\": \"\u002FUsers\u002Fxxx\u002Fimage.png\",\n  \"error\": null\n}\n```\n\nKey fields:\n\n- `ok` — whether generation succeeded\n- `model` — model used for generation\n- `image_url` — extracted from `data[0].url`, temporary URL (valid 30 days)\n- `prompt` — the text prompt used\n- `size` — generated image dimensions\n- `quality` — hd or standard\n- `created` — Unix timestamp when request was created\n- `content_filter` — content safety analysis array (may be empty)\n  - `role`: where the issue was detected (user\u002Fassistant\u002Fhistory)\n  - `level`: severity 0-3 (0 = most severe, 3 = minor)\n- `saved_file` — absolute path to saved local file (if `--save` was used)\n- `error` — error details on failure\n\n## Content Safety \u002F 内容安全\n\nThe API includes content filtering. If issues are detected, `content_filter` will contain entries with:\n\n- `role`: where the issue was detected (user\u002Fassistant\u002Fhistory)\n- `level`: severity 0-3 (0 = most severe, 3 = minor)\n\n**If level 0-1 detected:** Generation will fail, show error to user.\n**If level 2-3 detected:** Generation may succeed, but warn user about potential issues.\n\n## Error Handling \u002F 错误处理\n\n**API key not configured:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"MISSING_API_KEY\",\n    \"message\": \"ZHIPU_API_KEY not configured. Get your API key at: https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys\"\n  }\n}\n```\n\n→ Show exact error to user, guide them to configure\n\n**Authentication failed (401\u002F403):**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"authentication_error\",\n    \"message\": \"令牌已过期或验证不正确\",\n    \"status\": 401\n  }\n}\n```\n\n→ API key invalid\u002Fexpired → reconfigure\n\n**Rate limit (429):**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"rate_limit_exceeded\",\n    \"message\": \"API rate limit exceeded. Please try again later.\",\n    \"status\": 429\n  }\n}\n```\n\n→ Quota exhausted → inform user to wait or check quota\n\n**Content filter violation:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"content_filter_violation\",\n    \"message\": \"Content safety check failed\",\n    \"status\": 400\n  }\n}\n```\n\n→ Explain that the prompt may contain inappropriate content\n\n**Invalid size:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"INVALID_SIZE\",\n    \"message\": \"Invalid size: 512x512 for model glm-image. Must be multiple of 32, 1024-2048px, max 2^22 pixels\"\n  }\n}\n```\n\n→ Guide user to use valid size from the supported list\n\n**Download failed:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"DOWNLOAD_FAILED\",\n    \"message\": \"Failed to download image to image.png\"\n  }\n}\n```\n\n→ Check file path permissions and disk space\n\n**Network error:**\n\n```json\n{\n  \"ok\": false,\n  \"error\": {\n    \"code\": \"NETWORK_ERROR\",\n    \"message\": \"Network error: [Errno 8] nodename nor servname provided, or not known\"\n  }\n}\n```\n\n→ Check internet connection\n\n## Prompt Tips \u002F 提示词技巧\n\n**Good prompts:**\n\n- Specific details: \"一只橘色的英国短毛猫，绿色眼睛，坐在木质窗台上\"\n- Style keywords: \"赛博朋克风格\", \"中国水墨画\", \"油画质感\", \"3D 渲染\"\n- Lighting: \"阳光明媚\", \"柔和的逆光\", \"电影感灯光\"\n- Composition: \"特写镜头\", \"广角视角\", \"俯视角度\"\n\n**Avoid:**\n\n- Vague descriptions: \"好看的图片\"\n- Contradictory elements: \"白天和夜晚同时\"\n- Too many subjects: Keep focus on 1-2 main elements\n",{"name":5,"metadata":24,"description":7},{"openclaw":25},{"emoji":26,"homepage":27,"requires":28,"primaryEnv":30},"🎨","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FGLM-Image\u002Ftree\u002Fmain\u002Fskills\u002Fglm-image-gen",{"env":29,"bins":31},[30],"ZHIPU_API_KEY",[32],"python","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglm-image-gen",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill glm-image-gen",{"tool":48,"command":49},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill glm-image-gen",{"tool":51,"command":52},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill glm-image-gen","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglm-image-gen\u002FSKILL.md",true,[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"scripts\u002Fglm_image_cli.py","SCRIPT","脚本",9976,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Skills-技能包\u002FYYC3-Skills-技能包-skills-v4\u002Fglm-image-gen\u002Fscripts\u002Fglm_image_cli.py",[63,70,77,84,91,98],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]