Skip to content
Back to search

nano-image-generator

"Generate images using Nano Banana Pro (Gemini 3 Pro Preview). Use when creating app icons, logos, UI graphics, marketing banners, social media images, illustrations, diagrams, or any visual assets. Supports reference images for style transfer and character consistency. Triggers include phrases like 'generate an image', 'create a graphic', 'make an icon', 'design a logo', 'create a banner', 'same style as', 'keep the style', or any request needing visual content."

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lxfater-nano-image-generator-skill/badge.svg)](/listings/lxfater-nano-image-generator-skill)

HTML

<a href="/listings/lxfater-nano-image-generator-skill"><img src="/api/listings/lxfater-nano-image-generator-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Get Gemini API Key

Visit: https://aistudio.google.com/apikey

2. Configure API Key

Edit `scripts/generate_image.py`, find the `get_api_key()` function (around line 37):

def get_api_key():
    """
    Get API key.

    ⚠️ SETUP REQUIRED: Replace the placeholder below with your Gemini API key.

    Get your API key from: https://aistudio.google.com/apikey
    """
    return "YOUR_GEMINI_API_KEY_HERE"  # <-- Replace this with your API key

Replace `YOUR_GEMINI_API_KEY_HERE` with your actual API key:

    return "AIzaSy..."  # Your actual key

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 145 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: nano-image-generator
  3. description: "Generate images using Nano Banana Pro (Gemini 3 Pro Preview). Use when creating app icons, logos, UI graphics, marketing banners, social media images, illustrations, diagrams, or any visual assets. Supports reference images for style transfer and character consistency. Triggers include phrases like 'generate an image', 'create a graphic', 'make an icon', 'design a logo', 'create a banner', 'same style as', 'keep the style', or any request needing visual content."
  4. ---
  5. # Nano Image Generator
  6. Generate images using Nano Banana Pro (Gemini 3 Pro Preview) for any visual asset needs. Supports **reference images** for style transfer and character consistency.
  7. ## Quick Start
  8. ```bash
  9. # Basic generation
  10. python scripts/generate_image.py "A friendly robot mascot waving" --output ./mascot.png
  11. # With style reference (keep same visual style)
  12. python scripts/generate_image.py "Same style, new content" --ref ./reference.jpg --output ./new.png
  13. ```
  14. ## Script Usage
  15. ```bash
  16. python scripts/generate_image.py <prompt> --output <path> [options]
  17. ```
  18. **Required:**
  19. - `prompt` - Image description
  20. - `--output, -o` - Output file path
  21. **Options:**
  22. - `--aspect, -a` - Aspect ratio (default: `1:1`)
  23. - Square: `1:1`
  24. - Portrait: `2:3`, `3:4`, `4:5`, `9:16`
  25. - Landscape: `3:2`, `4:3`, `5:4`, `16:9`, `21:9`
  26. - `--size, -s` - Resolution: `1K`, `2K` (default), `4K`
  27. - `--ref, -r` - Reference image (can use multiple times, max 14)
  28. ## Reference Images
  29. Gemini supports up to **14 reference images** for:
  30. ### Style Transfer
  31. Keep the visual style (colors, textures, mood) from a reference:
  32. ```bash
  33. python scripts/generate_image.py "New scene with mountains, same visual style as reference" \
  34. --ref ./style-reference.jpg --output ./styled-mountains.png
  35. ```
  36. ### Character Consistency
  37. Maintain character appearance across multiple images:
  38. ```bash
  39. python scripts/generate_image.py "Same character now in a forest setting" \
  40. --ref ./character.png --output ./character-forest.png
  41. ```
  42. ### Multi-Image Fusion
  43. Combine elements from multiple references:
  44. ```bash
  45. python scripts/generate_image.py "Combine the style of first image with subject of second" \
  46. --ref ./style.png --ref ./subject.png --output ./combined.png
  47. ```
  48. ### Serial Image Generation (Batch Workflow)
  49. For generating a series with consistent style:
  50. 1. Generate first image
  51. 2. Use first image as `--ref` for subsequent images
  52. 3. Each new image inherits the established style
  53. ```bash
  54. # Generate cover
  55. python scripts/generate_image.py "Tech knowledge card cover" -o ./01-cover.png
  56. # Generate subsequent cards with style reference
  57. python scripts/generate_image.py "Card 2 content, same style" --ref ./01-cover.png -o ./02-card.png
  58. python scripts/generate_image.py "Card 3 content, same style" --ref ./01-cover.png -o ./03-card.png
  59. ```
  60. ## Workflow
  61. 1. **Determine output location** - Place images where contextually appropriate:
  62. - App icons → `./assets/icons/`
  63. - Marketing → `./marketing/`
  64. - UI elements → `./src/assets/`
  65. - General → `./generated/`
  66. 2. **Craft effective prompts** - Be specific and descriptive:
  67. - Include style: "flat design", "3D rendered", "watercolor", "minimalist"
  68. - Include context: "for a mobile app", "website hero image"
  69. - Include details: colors, mood, composition
  70. - For references: mention "same style as reference" or "keep the visual style"
  71. 3. **Choose appropriate settings:**
  72. - Icons/logos → `--aspect 1:1`
  73. - Banners/headers → `--aspect 16:9` or `21:9`
  74. - Mobile screens → `--aspect 9:16`
  75. - Xiaohongshu cards → `--aspect 3:4`
  76. - Photos → `--aspect 3:2` or `4:3`
  77. ## Examples
  78. **App icon:**
  79. ```bash
  80. python scripts/generate_image.py "Minimalist flat design app icon of a lightning bolt, purple gradient background, modern iOS style" \
  81. --output ./assets/app-icon.png --aspect 1:1
  82. ```
  83. **Marketing banner:**
  84. ```bash
  85. python scripts/generate_image.py "Professional website hero banner for a productivity app, abstract geometric shapes, blue and white color scheme" \
  86. --output ./public/images/hero-banner.png --aspect 16:9
  87. ```
  88. **Xiaohongshu knowledge card:**
  89. ```bash
  90. python scripts/generate_image.py "Tech knowledge card, dark blue purple gradient, neon cyan accents, code block style, Chinese text '标题'" \
  91. --output ./xiaohongshu/card.png --aspect 3:4
  92. ```
  93. **Style transfer:**
  94. ```bash
  95. python scripts/generate_image.py "Transform this photo into watercolor painting style" \
  96. --ref ./photo.jpg --output ./watercolor.png
  97. ```
  98. **Character in new scene:**
  99. ```bash
  100. python scripts/generate_image.py "Same character from reference, now sitting in a cafe, warm lighting" \
  101. --ref ./character.png --output ./character-cafe.png --aspect 3:2
  102. ```
  103. ## Prompt Tips
  104. - **Be specific** - "A red apple on a wooden table" vs "an apple"
  105. - **Include style** - "in the style of pixel art" or "photorealistic"
  106. - **Mention purpose** - "for a children's book" affects the output style
  107. - **Describe composition** - "centered", "rule of thirds", "close-up"
  108. - **Specify colors** - Explicit color palettes yield better results
  109. - **Reference prompts** - Use "same style as reference", "keep the visual aesthetic", "match the color palette"
  110. - **Avoid** - Don't ask for complex text in images (use overlays instead)
  111. ## Limitations
  112. - Maximum 14 reference images per request
  113. - Text rendering may be imperfect (better to overlay text separately)
  114. - Very specific brand logos may not reproduce exactly
README.md · README · 130 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Nano Image Generator Skill
  2. [简体中文](./README_CN.md)
  3. A Claude Code skill for generating images using Gemini 3 Pro Preview (Nano Banana Pro).
  4. ## Features
  5. - **Text-to-image generation** - Describe what you want, get an image
  6. - **Reference image support** - Style transfer, character consistency (up to 14 images)
  7. - **Multiple aspect ratios** - Square, portrait, landscape, cinematic
  8. - **Resolution options** - 1K, 2K, 4K output
  9. ## Differences from [livelabs-ventures/nano-skills](https://github.com/livelabs-ventures/nano-skills)
  10. | Feature | Original | This Version |
  11. |---------|----------|--------------|
  12. | Reference images | ❌ Not supported | ✅ Up to 14 images |
  13. | API key config | Environment variable | Direct code edit |
  14. ## Setup
  15. ### 1. Get Gemini API Key
  16. Visit: https://aistudio.google.com/apikey
  17. ### 2. Configure API Key
  18. Edit `scripts/generate_image.py`, find the `get_api_key()` function (around line 37):
  19. ```python
  20. def get_api_key():
  21. """
  22. Get API key.
  23. ⚠️ SETUP REQUIRED: Replace the placeholder below with your Gemini API key.
  24. Get your API key from: https://aistudio.google.com/apikey
  25. """
  26. return "YOUR_GEMINI_API_KEY_HERE" # <-- Replace this with your API key
  27. ```
  28. Replace `YOUR_GEMINI_API_KEY_HERE` with your actual API key:
  29. ```python
  30. return "AIzaSy..." # Your actual key
  31. ```
  32. ## Installation
  33. ### From Local Path
  34. ```bash
  35. git clone https://github.com/YOUR_USERNAME/nano-image-generator-skill.git
  36. ```
  37. Add to your `~/.claude/settings.json`:
  38. ```json
  39. {
  40. "skills": [
  41. "/path/to/nano-image-generator-skill"
  42. ]
  43. }
  44. ```
  45. ### From GitHub
  46. ```bash
  47. claude skill add github:YOUR_USERNAME/nano-image-generator-skill
  48. ```
  49. ## Plugin Structure
  50. ```
  51. nano-image-generator-skill/
  52. ├── SKILL.md # Skill definition for Claude Code
  53. ├── README.md # This file
  54. ├── README_CN.md # Chinese documentation
  55. └── scripts/
  56. └── generate_image.py # Image generation script (edit API key here)
  57. ```
  58. ## Usage
  59. Once installed, Claude Code will automatically use this skill when you ask to:
  60. - "Generate an image of..."
  61. - "Create an icon for..."
  62. - "Design a logo..."
  63. - "Make a banner..."
  64. - "Same style as this image..."
  65. ## Direct Script Usage
  66. ### Basic
  67. ```bash
  68. python scripts/generate_image.py "A cute robot mascot" --output ./robot.png
  69. ```
  70. ### With Aspect Ratio
  71. ```bash
  72. python scripts/generate_image.py "Website banner" --aspect 16:9 --output ./banner.png
  73. ```
  74. ### With Reference Image
  75. ```bash
  76. python scripts/generate_image.py "Same character in a forest" --ref ./character.png --output ./forest.png
  77. ```
  78. ### Multiple References
  79. ```bash
  80. python scripts/generate_image.py "Combine styles" --ref ./img1.png --ref ./img2.png --output ./combined.png
  81. ```
  82. ## Options
  83. | Option | Values | Default | Description |
  84. |--------|--------|---------|-------------|
  85. | `--aspect`, `-a` | `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9` | `1:1` | Aspect ratio |
  86. | `--size`, `-s` | `1K`, `2K`, `4K` | `2K` | Resolution |
  87. | `--ref`, `-r` | Image path | - | Reference image (repeatable, max 14) |
  88. ## License
  89. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.