Insert scrapbook-style illustrations into articles using Z.AI GLM-image. Use when the user wants to add images to an article, create illustrated content, or requests "illustrate this article", "add images to this article", "generate pictures for this post", "insert illustrations".
Transform articles into illustrated markdown by generating hand-crafted scrapbook-style images and inserting them at logical break points.
Attribution: Based on glm-image by ViffyGwaanl (MIT License).
This skill uses Z.AI API key only and always calls glm-image.
Configure one of:
ZAI_API_KEY="your-key" to ~/.codex/.envexport ZAI_API_KEY="your-key""zai_api_key": "your-key" to ~/.openclaw/config.jsonBackward-compatible fallback names are still accepted by the bundled script:
GLM_API_KEYglm_api_keyapi_keyportrait (1088x1920, default) or landscape (1920x1088)zh, en, ja, ko, fr, de, es. Always ask the user; never default or infer.If ZAI_API_KEY is not configured (or compatible fallback key names are missing), stop and tell the user how to configure it. Check ~/.codex/.env first, then environment variables, then fallback config sources. Do not proceed without a valid key.
Before generating any images:
Read the scrapbook system prompt from references/scrapbook-prompt.md.
If the user asks for a numbered style such as 风格1 or 风格3, also read references/style-library/STYLE_INDEX.md and match the requested style.
Using that prompt, analyze the article and output a JSON plan:
{
"project_title": "Article title — Scrapbook Style",
"style": "Physical Mixed-Media Scrapbook",
"total_images": 3,
"images": [
{
"image_id": 1,
"title": "Image caption",
"description": "300-500 character visual description in scrapbook style...",
"insert_after": "Exact sentence or heading after which to insert the image"
}
]
}
Target 1 image per 300–400 words of article content.
For WeChat/article visuals, prefer a poster-like composition over a dense dashboard:
The skill now supports numbered reference styles:
风格1 / style 1: Board System风格2 / style 2: Blue Poster风格3 / style 3: Character Sticker风格4 / style 4: Editorial Story风格5 / style 5: Bold Metaphor ScrapbookLaunch all image generations simultaneously.
python3 scripts/generate.py "<description_1>" --language <lang> --size 1088x1920 &
python3 scripts/generate.py "<description_2>" --language <lang> --size 1088x1920 &
python3 scripts/generate.py "<description_3>" --language <lang> --size 1088x1920 &
wait
The bundled script always calls glm-image via Z.AI / BigModel-compatible API.
On failure: if generation fails for one image, log the error and continue with remaining images. Do not abort the entire run.
Insert each image after its designated insert_after anchor:

If the insert_after anchor is not found verbatim, insert at the nearest paragraph break.
Return the complete markdown article with:
<!-- Illustrated: N images generated, M failed, total cost: $X.XX -->Reject and regenerate if any image has one of these problems:
For WeChat specifically:
portrait unless the user explicitly wants cover or landscape