image-gen

Generate image files from text prompts using Gemini via ZenMux.

3|Updated Jul 16, 2025
One-click install
npx skills add https://github.com/MarkShawn2020/.claude --skill image-gen-markshawn2020
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image-gen
Source: https://github.com/MarkShawn2020/.claude/tree/main/skills/image-gen
Command: npx skills add https://github.com/MarkShawn2020/.claude --skill image-gen-markshawn2020

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, google-genai, and includes scripts (resource) components.

What problem does it solve?

This Skill automates image generation from natural language prompts using Gemini via ZenMux, reducing design iteration time and manual image creation.

Core Features & Use Cases

  • Prompt-driven image generation: Generate high-quality images from text prompts using Gemini via ZenMux.
  • Quality control & output options: Choose output quality with -q low|medium|high and specify the output file.
  • Use Case: Create a hero image for a blog post by prompting "sustainable energy cityscape" and saving it as hero.png.

Quick Start

Run: python3 ~/.claude/skills/image-gen/gen_image.py "PROMPT" -o output.png -q high --ascii Display the generated image with the Read tool after generation.

Frequently Asked Questions about image-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images from text prompts using Gemini?

Generate images from text prompts using Gemini via ZenMux by running the gen_image.py script with your prompt, output path, and quality level. The Skill uses the google/gemini-3-pro-image-preview model to create and save image files from natural language descriptions, requiring a ZENMUX_API_KEY environment variable.

Can I control image quality and output format when generating images?

Yes. Specify output quality with -q low|medium|high and set the output file path with -o. The Skill maps quality levels to MediaResolution settings in Gemini, letting you balance generation speed and image fidelity for your workflow.

How do I preview generated images before saving them?

Use the --ascii flag to render an ASCII preview of the generated image in your terminal immediately after generation. On macOS, the Skill can also open the image automatically; use the Read tool afterward to display the full saved image file.

What environment setup is required to use image generation with Gemini?

Set the ZENMUX_API_KEY environment variable with your API key before running the script. The Skill depends on Pillow for image handling and google-genai for Gemini integration, handling all API communication and image file operations automatically.

Is image generation suitable for automating repetitive design tasks?

Yes. The Skill reduces design iteration time by automating image creation from text prompts in CLI-driven workflows. It's designed for automation scenarios where you provide a prompt, quality preference, and output path, making it ideal for batch-generating placeholder images or design assets.