Install
openclaw skills install skills-sh:zc277584121/marketing-skills/image-generationImage Generation Skill Generate illustration images for blog posts, documentation, and technical articles. The workflow is provider-aware: 1. Codex built-in path first — when the current agent is Codex and the built-in imagegen tool is available, use it directly. This path…
openclaw skills install skills-sh:zc277584121/marketing-skills/image-generationGenerate illustration images for blog posts, documentation, and technical articles. The workflow is provider-aware:
image_gen tool is available, use it directly. This path does not require OPENAI_API_KEY.OPENAI_API_KEY if present.GEMINI_API_KEY and the existing Gemini image model.Load provider-specific references only when needed:
references/codex-built-in.mdreferences/openai-api.mdreferences/gemini-api.mdBefore generating, clarify only what is necessary:
Use this path when:
image_gen tool is availableRead references/codex-built-in.md, generate with the built-in tool, then move/copy the final image into the workspace if it is project-bound.
Use this path when:
Run:
python <skill-root>/scripts/generate_image.py \
--prompt "your prompt here" \
--output "/path/to/save/image.png"
The script uses --provider auto by default:
OPENAI_API_KEY is setGEMINI_API_KEY is setThe script automatically prepends this style prefix unless --style-prefix or --no-style is used:
Use a clean, modern color palette with soft tones. Minimalist flat illustration style with clear visual hierarchy. Professional and polished look suitable for technical blog articles. No photorealistic rendering. No excessive gradients or shadows.
For the Codex built-in path, include the same style guidance directly in the prompt unless the user requested a different style.
Architecture diagram:
A system architecture diagram showing: User sends query to an API Gateway,
which routes to a Vector Database labeled "Milvus" and a generation service.
The Vector Database returns relevant documents, which are combined with the
original query and sent to the generation service for final response generation.
Arrows show data flow direction. Each component is a rounded rectangle with
an icon and label.
Concept illustration:
A visual comparison of keyword search vs semantic search. Left side shows
keyword search with exact word matching and highlighted matching words.
Right side shows semantic search with a brain icon understanding meaning
and connecting related concepts with dotted lines. A dividing line separates
the two approaches.
| Parameter | Default | Notes |
|---|---|---|
| Provider | auto in script; Codex built-in when available | Codex built-in first, then OpenAI API, then Gemini |
| OpenAI model | gpt-image-2 | Used by script fallback |
| Gemini model | gemini-3.1-flash-image | Used by script fallback |
| Aspect ratio | 16:9 | Landscape, ideal for article illustrations |
| Image size | 1K | Good balance of quality and cost |
| Style | Minimal, clean, soft tones | Auto-prepended by script |
| Language | English | Prompt and in-image text |
--provider auto, openai, gemini
--model Provider model ID for the selected provider
--openai-model OpenAI model ID, default gpt-image-2
--gemini-model Gemini model ID, default gemini-3.1-flash-image
--aspect-ratio 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 9:16, 16:9, 21:9, etc.
--image-size 512, 1K, 2K, 4K
--openai-quality low, medium, high, auto
--style-prefix Custom style prefix
--no-style Skip default style prefix
| Scenario | Change |
|---|---|
| Higher quality final asset | --image-size 2K or --openai-quality high |
| Portrait/vertical image | --aspect-ratio 3:4 or --aspect-ratio 9:16 |
| Square image | --aspect-ratio 1:1 |
| User has their own style | --style-prefix "your style" or --no-style |
| Non-English content | Write prompt in target language |
Follow this priority order:
If the user is working on a specific markdown file or article:
.md fileExample: if the article has , save to the same images/ directory.
If no specific article context but working within a project:
images/, assets/, static/, img/, figures/images/ directory at the project root or under the relevant content directoryIf no clear project context:
concept-name-illustration.pngAfter generating:
959680e17acf