Install
openclaw skills install article-illustrator-2Generate multiple illustrations for an article with structured type and style decisions and bundled generation tooling. Use when the user asks to create illustrations for an article, add images to a post, or generate visuals for sections of a long text.
openclaw skills install article-illustrator-2article-illustrator)If you use reference images (image-to-image / series reference / consistency refs):
http:// may work but is insecure and can be blocked by some networks.data: URLs are not supported by the WeryAI gateway.Generate multiple illustrations for an article, add images to a post, or generate visuals for sections of a long text — with structured type and style decisions and automatic Markdown insertion.
This article illustration workflow analyzes long-form content, identifies the best illustration positions, generates multiple coordinated images, and can insert those image references back into the article Markdown. Use it when you need to create illustrations for an article, add images to a post, or generate visuals for sections of a long text.
Important: keep the article structure readable, preserve the author's section flow, and only add illustrations where they clarify or strengthen the post.
Scripts:
scripts/scaffold.tsscripts/build-prompts.tsscripts/build-batch.tsscripts/insert-images.tshttps://api.weryai.com).IMAGE_GEN_API_KEY. The key is never printed. It may be persisted only when you explicitly run npm run setup -- --persist-api-key.https:// recommended). http:// may work but is insecure. Local file paths and data: URLs are rejected..image-skills/article-illustrator/ (project) and/or ~/.image-skills/article-illustrator/ (home).Not a good fit for:
Illustrate my article about habit systems with minimal editorial imagesAdd visuals to each section of this tutorial postGenerate 4 illustrations for my review article in watercolor styletype: what the illustration is doingstyle: the visual languageSee:
| Script | Purpose |
|---|---|
scripts/scaffold.ts | Initialize outline.md and per-illustration prompts |
scripts/build-prompts.ts | Regenerate prompts from outline.md |
scripts/build-batch.ts | Generate batch.json from illustration prompts |
scripts/insert-images.ts | Insert image references into article Markdown |
scripts/illustrate-article.mjs | Run the recommended end-to-end article illustration workflow |
npm run generate | Generate illustrations |
./scripts/vendor/compression-runtime/scripts/main.ts | Compress output for delivery |
For normal use, prefer the high-level orchestrator. It keeps outline.md, prompts, batch.json, and generated images on disk for inspection, but runs the full workflow for you:
node {baseDir}/scripts/illustrate-article.mjs \
--article article.md \
--output-dir illustrations/topic-slug \
--project "$(pwd)"
This default path runs:
ensure-readyscaffold --articlebuild-promptsbuild-batchgenerateinsert-imagesUse the lower-level commands below when you want to inspect or customize each stage manually.
outline.md and Prompt FilesCreate the working directory:
${BUN_X} {baseDir}/scripts/scaffold.ts \
--article article.md \
--output-dir illustrations/topic-slug \
--topic "Habit systems" \
--style minimal \
--density per-section \
--lang en \
--illustrations 3
This creates:
outline.mdprompts/01-framework-topic.mdprompts/02-flowchart-topic.mdprompts/03-summary-topic.mdWhen --article is provided, outline.md now prefers real Markdown headings from the article and generates Position entries such as after-heading: Why Habit Systems Work. It only falls back to placeholder headings when the article does not provide enough usable headings.
Extract:
type, style, and densityDefault priorities:
type: mixedstyle: minimaldensity: per-sectionRecommended rules:
framework or infographicflowchartcomparisontimelinesceneThe bundled image runtime currently exposes one structured visual argument, --style, so:
style to --styletype, density, and section purpose into the prompt bodyRecommended mapping:
| illustrator style | runtime --style |
|---|---|
minimal | editorial |
notion | flat-illustration |
blueprint | infographic |
watercolor | watercolor |
elegant | editorial |
poster | poster |
outline.md, Then Build PromptsSave at least:
outline.mdprompts/01-framework-topic.mdprompts/02-scene-topic.mdEach outline entry should include:
PositionPurposeVisual ContentFilenameRecommended Position syntax:
after-heading: <heading>before-heading: <heading>after-text: <snippet>endWhen the outline is ready, generate prompt files automatically:
${BUN_X} {baseDir}/scripts/build-prompts.ts \
--outline illustrations/topic-slug/outline.md \
--output-dir illustrations/topic-slug/prompts \
--topic "Habit systems" \
--audience "general reader" \
--style minimal \
--density per-section \
--lang en \
--aspect 16:9
This converts each outline entry into a prompt file such as 01-framework-topic.md or 02-flowchart-topic.md.
Consistency strategy for multi-illustration articles:
references/series-reference.png firstBefore building the final illustration batch, generate the canonical series reference image:
${BUN_X} {baseDir}/npm run generate \
--promptfiles illustrations/topic-slug/references/series-reference.md \
--style minimal \
--image illustrations/topic-slug/references/series-reference.png \
--ar 16:9 \
-m "$M"
This step is the default for multi-illustration articles. Do not skip it when consistency matters.
batch.json and Generate ImagesBuild a batch file from the outline and prompt directory:
${BUN_X} {baseDir}/scripts/build-batch.ts \
--outline illustrations/topic-slug/outline.md \
--prompts illustrations/topic-slug/prompts \
--output illustrations/topic-slug/batch.json \
--images-dir illustrations/topic-slug \
--model "$M"
Then run the bundled image generator:
On first use in a new project, run npm run ensure-ready -- --project <your-project> --workflow article from this skill directory before generation. This reads the doctor report and auto-runs bootstrap if local script dependencies are still missing. If the report shows a missing IMAGE_GEN_API_KEY and the user approves, run npm run setup -- --project <your-project> --workflow article --persist-api-key when the key is already in env, or persist it to .image-skills/article-illustrator/.env on the user's behalf, then continue without leaving this workflow.
When this skill is first connected, tell the user that the default generation model is Nano Banana 2 (GEMINI_3_1_FLASH_IMAGE). Also tell them it can be switched later whenever another model fits the task better.
${BUN_X} {baseDir}/npm run generate --batchfile illustrations/topic-slug/batch.json --json
The bundled generator now uses stability-first batch defaults and safer retry/backoff behavior for rate-limit-like failures. It retries submit failures conservatively, retries status polling without blindly resubmitting the same task, and keeps the initial concurrency biased toward reliability over speed.
If only one illustration is needed, a single direct call is still fine.
After the images are generated, insert references into the article:
${BUN_X} {baseDir}/scripts/insert-images.ts \
--article article.md \
--outline illustrations/topic-slug/outline.md \
--images-dir illustrations/topic-slug
If you do not want to overwrite the original file:
${BUN_X} {baseDir}/scripts/insert-images.ts \
--article article.md \
--outline illustrations/topic-slug/outline.md \
--images-dir illustrations/topic-slug \
--output article.with-images.md
Default behavior:
--output is omitted, the original Markdown is backed up first and then updated in placePosition and Filename from outline.md--on-missing-anchor end appends the image at the end and reports it in the summarySuggested output directory:
illustrations/<topic-slug>/
Suggested minimum files:
outline.mdbatch.jsonprompts/NN-type-slug.mdNN-type-slug.pngoutline.md and per-illustration prompt files exist in the output directory.insert-images.ts.When the user wants changes after seeing generated illustrations:
style / --style for all illustrations, rebuild batch, re-generate. Ask if all or specific ones.type in outline.md for that entry, rebuild its prompt, re-generate only that image.Position in outline.md, re-run insert-images.ts.outline.md, add or remove entries, rebuild affected prompts.--promptfiles prompts/NN-type-slug.md. Keep other images.After any changes, re-run insert-images.ts to update the article Markdown.
When the illustrations are ready:
${BUN_X} {baseDir}/./scripts/vendor/compression-runtime/scripts/main.ts illustrations/topic-slug/ -r -f webp -q 80
Internal checklist (for agent): illustration count, type / style / density, model, insert-images status, compression done.
This version of article-illustrator focuses on: