image-generation

zc277584121/marketing-skills · updated Apr 8, 2026

$npx skills add https://github.com/zc277584121/marketing-skills --skill image-generation
0 commentsdiscussion
summary

Generate illustration images for blog posts, documentation, and technical articles using Google Gemini's Nano Banana 2 (gemini-3.1-flash-image-preview) model.

skill.md

Image Generation Skill

Generate illustration images for blog posts, documentation, and technical articles using Google Gemini's Nano Banana 2 (gemini-3.1-flash-image-preview) model.

Prerequisite: GEMINI_API_KEY must be set in environment variables.

When to Use

  • User asks to generate an illustration, diagram, or concept image
  • User is writing an article and needs visual explanations for concepts or workflows
  • User explicitly asks for AI-generated images

Step 1: Determine the Image Requirements

Before generating, clarify:

  1. What to illustrate — the concept, architecture, flow, or scene
  2. Language — default to English for both prompt and text in image. Only use other languages if the user explicitly requests it
  3. Save location — see "Output Path" section below
  4. Style/color preferences — if user has specific needs, otherwise use defaults

Step 2: Craft the Prompt

Default Style Prefix (always prepended unless user overrides)

The script automatically prepends this style prefix:

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.

Prompt Writing Guidelines

  • Be specific and descriptive about the visual elements
  • For technical concepts: describe the components, their relationships, and layout
  • For architecture diagrams: list the layers/components and how they connect
  • For flow diagrams: describe the steps and direction of flow
  • If text labels are needed in the image, spell them out explicitly in the prompt
  • Default language is English. Only write the prompt and request in-image text in another language if the user specifically asks

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 an LLM service.
The Vector Database returns relevant documents, which are combined with the
original query and sent to the LLM 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 (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 3: Generate the Image

Run the script:

python ${CLAUDE_SKILL_ROOT}/scripts/generate_image.py \
  --prompt "your prompt here" \
  --output "/path/to/save/image.png"

Default Parameters

Parameter Default Notes
Model gemini-3.1-flash-image-preview (Nano Banana 2) Fastest with good quality
Aspect ratio 3:2 Landscape (width:height = 3:2), ideal for article illustrations
Image size 1K Good balance of quality and cost
Style Minimal, clean, soft tones Auto-prepended to prompt
Language English Prompt and in-image text

Available Options

--model          Model ID (gemini-3.1-flash-image-preview, gemini-3-pro-image-preview, gemini-2.5-flash-image)
--aspect-ratio   1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, etc.
--image-size     512, 1K, 2K, 4K
--style-prefix   Custom style prefix (replaces the default)
--no-style       Skip default style prefix entirely

When to Change Defaults

Scenario Change
User wants higher quality --image-size 2K
User wants best quality --model gemini-3-pro-image-preview --image-size 2K
Social media banner --aspect-ratio 16:9
Portrait/vertical image --aspect-ratio 3:4 or --aspect-ratio 9:16
Square image (icon, avatar) --aspect-ratio 1:1
User has their own style --style-prefix "your style" or --no-style
Non-English content Write prompt in target language, no parameter change needed

Step 4: Determine Output Path

Follow this priority order to decide where to save the generated image:

Priority 1: Context from Current Conversation

If the user is working on a specific markdown file or article:

  1. Check where existing images in that article are stored (look for ![ image references in the .md file)
  2. Save the new image in the same directory as the existing images
  3. Use a descriptive filename that matches the naming convention of existing images

Example: if the article has ![](images/architecture-overview.png), save to the same images/ directory.

Priority 2: Project Image Directory

If no specific article context but working within a project:

  1. Look for existing image directories: images/, assets/, static/, img/, figures/
  2. Save in the most appropriate existing directory
  3. 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:

  1. Save to the current working directory
  2. Use a descriptive filename: concept-name-illustration.png

Filename Convention

  • Use lowercase with hyphens: vector-search-architecture.png
  • Be descriptive: prefer rag-pipeline-overview.png over image1.png
  • Match existing naming patterns in the project if any

Step 5: Verify the Result

After generating:

  1. Read the image file to visually verify it matches the user's request
  2. If the result is not satisfactory, refine the prompt and regenerate
  3. If the image will be inserted into a markdown file, suggest the markdown syntax: ![alt text](relative/path/to/image.png)

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.532 reviews
  • Arya Bansal· Dec 28, 2024

    image-generation is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Pratham Ware· Dec 16, 2024

    I recommend image-generation for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Lucas Liu· Dec 16, 2024

    Solid pick for teams standardizing on skills: image-generation is focused, and the summary matches what you get after install.

  • Yusuf Chen· Nov 27, 2024

    Registry listing for image-generation matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Aisha Khanna· Nov 19, 2024

    image-generation reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Yash Thakker· Nov 7, 2024

    Useful defaults in image-generation — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Isabella Lopez· Nov 7, 2024

    image-generation has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Dhruvi Jain· Oct 26, 2024

    image-generation is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Zara Ndlovu· Oct 26, 2024

    Keeps context tight: image-generation is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Fatima Gupta· Oct 18, 2024

    image-generation fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 32

1 / 4