
image-generation
Generate illustration images for articles and documentation with a Codex-first workflow, OpenAI API fallback, and Gemini fallback.
- Installs
- 4K
- Last 24h
- —
- Trending rank
- —
- Security
- Pass
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/zc277584121/marketing-skills --skill image-generation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads image-generation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
Image Generation Skill
Generate illustration images for blog posts, documentation, and technical articles. The workflow is provider-aware:
- Codex built-in path first — when the current agent is Codex and the built-in
image_gentool is available, use it directly. This path does not requireOPENAI_API_KEY. - OpenAI API fallback — outside Codex, or when the built-in tool is unavailable, use the local script with
OPENAI_API_KEYif present. - Gemini fallback — if OpenAI API generation is unavailable or fails, use the same script with
GEMINI_API_KEYand the existing Gemini image model.
Load provider-specific references only when needed:
- Codex built-in path:
references/codex-built-in.md - OpenAI API fallback:
references/openai-api.md - Gemini fallback:
references/gemini-api.md
When to Use
- User asks to generate an illustration, diagram, concept image, article visual, or documentation visual
- User is writing an article and needs visual explanations for concepts or workflows
- User explicitly asks for a generated raster image
Step 1: Determine the Image Requirements
Before generating, clarify only what is necessary:
- What to illustrate — the concept, architecture, flow, or scene
- Language — default to English for both prompt and text in image. Only use another language if the user explicitly requests it
- Save location — see "Output Path" below
- Style/color preferences — if user has specific needs, use them; otherwise use the default style
Step 2: Select the Provider Path
Path A: Codex Built-In
Use this path when:
- The current agent is Codex
- The built-in
image_gentool is available - The user did not explicitly request API/CLI execution
Read 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.
Path B: Script Auto Fallback
Use this path when:
- The current agent is not Codex
- The built-in tool is unavailable
- The user explicitly asks for API/CLI execution
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:
- Try OpenAI API when
OPENAI_API_KEYis set - If OpenAI API fails or is not configured, try Gemini when
GEMINI_API_KEYis set - If neither credential is available, report the missing environment variables
Step 3: Craft the Prompt
Default Style Prefix
The 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.
Prompt Writing Guidelines
- Be specific about visual elements, relationships, and layout
- For technical concepts: describe the components and how they connect
- For architecture diagrams: list the layers/components and data flow direction
- For flow diagrams: describe the steps and direction of flow
- If text labels are needed in the image, spell them out explicitly and keep text short
- Default language is English; use another language only when requested
Example Prompts
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.
Step 4: Parameters
Default Parameters
| 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 |
Script Options
--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
When to Change Defaults
| 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 |
Step 5: Determine Output Path
Follow this priority order:
Priority 1: Context from Current Conversation
If the user is working on a specific markdown file or article:
- Check where existing images in that article are stored by looking for image references in the
.mdfile - Save the new image in the same directory as the existing images
- Use a descriptive filename that matches the existing naming convention
Example: if the article has , save to the same images/ directory.
Priority 2: Project Image Directory
If no specific article context but working within a project:
- Look for existing image directories:
images/,assets/,static/,img/,figures/ - Save in the most appropriate existing directory
- If none exists, create an
images/directory at the project root or under the relevant content directory
Priority 3: Fallback
If no clear project context:
- Save to the current working directory
- Use a descriptive filename:
concept-name-illustration.png
Step 6: Verify the Result
After generating:
- Read the image file to visually verify it matches the user's request
- If the result is not satisfactory, refine the prompt and regenerate once with targeted changes
- If the image will be inserted into a markdown file, suggest the markdown syntax:
 - Report which provider path was used and where the final file was saved
FAQ
What does the image-generation skill do?
Generate illustration images for articles and documentation with a Codex-first workflow, OpenAI API fallback, and Gemini fallback.
How do I install image-generation?
Run npx skills add https://github.com/zc277584121/marketing-skills --skill image-generation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/image-generation/ (personal) or .claude/skills/image-generation/ (project).
Which AI agents can use image-generation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is image-generation safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed; ZeroLeaks passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains image-generation?
It is published by zc277584121 in zc277584121/marketing-skills. It has 3,963 recorded installs.
More from zc277584121/marketing-skills
remove-ai-style
zc277584121/marketing-skills
Aggressively rewrite Chinese or English prose to remove AI-generated patterns. Use for de-AI polishing, natural-language rewrites, robotic or formulaic writing, and publication cleanup. Always run the bundled deterministic Markdown analyzer first, remove every editable exclamation mark, dash, and formulaic binary contrast, inspect every other reported location, then read the full article for semantic patterns the rules cannot enumerate.
browser-screenshot
zc277584121/marketing-skills
Take focused, region-specific screenshots from web pages using a dedicated headed Chrome profile with persistent login state. Navigates to the right page based on user context (URL, search query, social media post), locates the target region via DOM selectors, and crops to a clean, focused screenshot without attaching to the user's daily browser.
content-rewrite
zc277584121/marketing-skills
Adapt and rewrite content for different platforms (LinkedIn, X, Reddit, English blog, WeChat). Each platform has its own tone, format, and length requirements.
chrome-automation
zc277584121/marketing-skills
Automate Chrome browser tasks using agent-browser CLI. Navigate pages, fill forms, click buttons, take screenshots, extract data, and replay Chrome DevTools Recorder exports.
mermaid-to-image
zc277584121/marketing-skills
Convert Mermaid code blocks in Markdown files to PNG images using the mermaid.ink API.
raw-video-processing
zc277584121/marketing-skills
Post-process raw screen recordings by removing silent segments and applying speed adjustments. Uses FFmpeg-based Python scripts to optimize video pacing automatically.
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image