gemini-image-gen

Generate images using Google Gemini's image generation API. Use when users want to create images, generate visual assets, UI mockups, icons, or any image generation requests.

12 stars

Best use case

gemini-image-gen is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate images using Google Gemini's image generation API. Use when users want to create images, generate visual assets, UI mockups, icons, or any image generation requests.

Teams using gemini-image-gen should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/gemini-image-gen/SKILL.md --create-dirs "https://raw.githubusercontent.com/rayguo01/viral-x/main/.claude/gemini-image-gen/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/gemini-image-gen/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How gemini-image-gen Compares

Feature / Agentgemini-image-genStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate images using Google Gemini's image generation API. Use when users want to create images, generate visual assets, UI mockups, icons, or any image generation requests.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Gemini Image Generation

Generate high-quality images using Google Gemini's image generation API.

## When to Use This Skill

Use this skill when the user requests:
- Image generation from text descriptions
- Visual assets for websites or apps
- Icons, logos, or graphics
- UI mockups or designs
- Any creative image generation task

## Requirements

- Google Gemini API key must be set in environment variable: GEMINI_API_KEY
- Python package: google-genai

## Instructions

When the user requests an image:

1. Understand the requirements (subject, style, dimensions, output filename)

2. Install the required package if needed

3. Create and execute a Python script to generate the image using the google-genai library with model gemini-2.0-flash-exp

4. Set appropriate aspect ratio based on user needs (1:1, 16:9, 9:16, 4:3, 3:4)

5. Save to specified filename and inform the user of the output file location

## Best Practices

- Write detailed, descriptive prompts for better results
- Specify style, mood, and key elements clearly
- For UI elements, mention design style (modern, minimal, etc.)
- For icons, specify size and simplicity level
- Save images to organized directories
- Create the output directory before saving if it doesn't exist

## Example Prompts

Hero Image: "Modern, minimalist hero section background with gradient from deep blue to purple, abstract geometric shapes, professional tech startup aesthetic, high resolution"

Feature Icon: "Simple, clean icon representing artificial intelligence, blue and white color scheme, minimalist style, suitable for website UI"

Product Mockup: "Smartphone displaying a modern writing app interface, clean UI design, on a wooden desk with coffee cup, natural lighting, professional product photography style"

Related Skills

x-trends

12
from rayguo01/viral-x

获取并分析 X(Twitter) 平台 24 小时热门趋势,提供内容创作灵感。

viral-verification

12
from rayguo01/viral-x

验证文章是否符合爆款推文要素,并提供修改建议和评分。

tophub-trends

12
from rayguo01/viral-x

获取并分析 TopHub 热榜数据,提供内容创作灵感。

tophub-defou-stanley-combo

12
from rayguo01/viral-x

自动获取 TopHub 热榜,精选选题,并使用 Defou x Stanley 风格生成爆款内容。

Prompt Generator Skill

12
from rayguo01/viral-x

根据帖子内容生成适合 AI 图像生成的英文 prompt。

humanizer

12
from rayguo01/viral-x

去除文本中的AI生成痕迹,使其更自然、更像人类书写,同时保持爆款潜力评估。

content-writer

12
from rayguo01/viral-x

三版内容生成器 - Stanley爆款风格 + Defou深度风格 + 融合终极版

scanning-docker-images-with-trivy

16
from plurigrid/asi

Trivy is a comprehensive open-source vulnerability scanner by Aqua Security that detects vulnerabilities in OS packages, language-specific dependencies, misconfigurations, secrets, and license violati

scanning-container-images-with-grype

16
from plurigrid/asi

Scan container images for known vulnerabilities using Anchore Grype with SBOM-based matching and configurable severity thresholds.

performing-container-image-hardening

16
from plurigrid/asi

This skill covers hardening container images by minimizing attack surface, removing unnecessary packages, implementing multi-stage builds, configuring non-root users, and applying CIS Docker Benchmark recommendations to produce secure production-ready images.

implementing-image-provenance-verification-with-cosign

16
from plurigrid/asi

Sign and verify container image provenance using Sigstore Cosign with keyless OIDC-based signing, attestations, and Kubernetes admission enforcement.

implementing-container-image-minimal-base-with-distroless

16
from plurigrid/asi

Reduce container attack surface by building application images on Google distroless base images that contain only the application runtime with no shell, package manager, or unnecessary OS utilities.