Get the FREE Ultimate OpenClaw Setup Guide →

nano-banana

Scanned
npx machina-cli add skill nicepkg/ai-workflow/nano-banana --openclaw
Files (1)
SKILL.md
5.4 KB

Nano Banana Image Generation

Generate professional images via the Gemini CLI's nanobanana extension.

When to Use This Skill

ALWAYS use this skill when the user:

  • Asks for any image, graphic, illustration, or visual
  • Wants a thumbnail, featured image, or banner
  • Requests icons, diagrams, or patterns
  • Asks to edit, modify, or restore a photo
  • Uses words like: generate, create, make, draw, design, visualize

Do NOT attempt to generate images through any other method.

Before First Use

  1. Verify extension is installed:
    gemini extensions list | grep nanobanana
    
  2. If missing, install it:
    gemini extensions install https://github.com/gemini-cli-extensions/nanobanana
    
  3. Verify API key is set:
    [ -n "$GEMINI_API_KEY" ] && echo "API key configured" || echo "Missing GEMINI_API_KEY"
    

Command Selection

User RequestCommand
"make me a blog header"/generate
"create an app icon"/icon
"draw a flowchart of..."/diagram
"fix this old photo"/restore
"remove the background"/edit
"create a repeating texture"/pattern
"make a comic strip"/story

Available Commands

Note: Always use the --yolo flag to automatically approve all tool actions.

CommandUse Case
gemini --yolo "/generate 'prompt'"Text-to-image generation
gemini --yolo "/edit file.png 'instruction'"Modify existing image
gemini --yolo "/restore old_photo.jpg 'fix scratches'"Repair damaged photos
gemini --yolo "/icon 'description'"App icons, favicons, UI elements
gemini --yolo "/diagram 'description'"Flowcharts, architecture diagrams
gemini --yolo "/pattern 'description'"Seamless textures and patterns
gemini --yolo "/story 'description'"Sequential/narrative images
gemini --yolo "/nanobanana prompt"Natural language interface

Common Options

  • --yolo - Required. Auto-approve all tool actions (no confirmation prompts)
  • --count=N - Generate N variations (1-8)
  • --preview - Auto-open generated images
  • --styles="style1,style2" - Apply artistic styles
  • --format=grid|separate - Output arrangement

Common Sizes

Use CaseDimensionsNotes
YouTube thumbnail1280x720--aspect=16:9
Blog featured image1200x630Social preview friendly
Square social1080x1080Instagram, LinkedIn
Twitter/X header1500x500Wide banner
Vertical story1080x1920--aspect=9:16

Model Selection

Default: gemini-2.5-flash-image (~$0.04/image)

For higher quality (4K, better reasoning):

export NANOBANANA_MODEL=gemini-3-pro-image-preview

Blog Featured Image Examples

# Modern illustration style
gemini --yolo "/generate 'modern flat illustration of developer coding at laptop, purple and blue gradient background, minimalist style, no text' --preview"

# Professional photography style
gemini --yolo "/generate 'professional editorial photo of coffee cup next to laptop on wooden desk, morning sunlight, shallow depth of field, no text' --count=3"

# Tech/abstract
gemini --yolo "/generate 'abstract visualization of neural network connections, dark background with glowing blue nodes, futuristic style' --preview"

Icon Generation

gemini --yolo "/icon 'minimalist app logo for productivity tool' --sizes='64,128,256,512' --type='app-icon' --corners='rounded'"

Diagram Generation

gemini --yolo "/diagram 'user authentication flow with OAuth' --type='flowchart' --style='modern'"

Output Location

All generated images are saved to ./nanobanana-output/ in the current directory.

Presenting Results

After generation completes:

  1. List contents of ./nanobanana-output/ to find generated files
  2. Present the most recent image(s) to the user
  3. Offer to regenerate with variations if needed

Refinements and Iterations

When the user asks for changes:

  • "Try again" / "Give me options": Regenerate with --count=3
  • "Make it more [adjective]": Adjust prompt and regenerate
  • "Edit this one": Use gemini --yolo "/edit nanobanana-output/filename.png 'adjustment'"
  • "Different style": Add --styles="requested_style" to the command

Prompt Tips

  1. Be specific: Include style, mood, colors, composition details
  2. Add "no text": If you don't want text rendered in the image
  3. Reference styles: "editorial photography", "flat illustration", "3D render", "watercolor"
  4. Specify aspect ratio context: "wide banner", "square thumbnail", "vertical story"

Troubleshooting

ProblemSolution
GEMINI_API_KEY not setexport GEMINI_API_KEY="your-key"
Extension not foundRun install command from setup section
Quota exceededWait for reset or switch to flash model
Image generation failedCheck prompt for policy violations, simplify request
Output directory missingWill be created automatically on first run

Source

git clone https://github.com/nicepkg/ai-workflow/blob/main/workflows/content-creator-workflow/.claude/skills/nano-banana/SKILL.mdView on GitHub

Overview

Nano Banana lets you generate and edit images using the Gemini CLI's nanobanana extension. It supports blog featured images, YouTube thumbnails, icons, diagrams, patterns, illustrations, photos, visuals, graphics, and artwork. Use this skill whenever you need to create, modify, or restore any image or visual content.

How This Skill Works

Invoke Gemini with the nanobanana extension to perform text-to-image generation, icon creation, diagrams, patterns, or edits. Use commands like /generate, /icon, /diagram, /pattern, /edit, or /restore with the --yolo flag to auto-approve actions, and leverage options such as --count, --styles, and --format to tailor outputs and sizes.

When to Use It

  • You need any image, graphic, illustration, or visual
  • You want a blog featured image or YouTube thumbnail
  • You require icons, diagrams, or seamless patterns
  • You want to edit, restore, or fix a photo
  • You use action words like generate, create, make, draw, design, or visualize

Quick Start

  1. Step 1: Ensure the nanobanana extension is installed and API key is configured
  2. Step 2: Choose a command like /generate, /icon, /diagram, /edit, or /restore and craft your prompt
  3. Step 3: Run gemini --yolo with the chosen command and optional flags (e.g., --count, --styles, --format, --preview)

Best Practices

  • Verify the nanobanana extension is installed (gemini extensions list) and install it if missing
  • Clearly define the target image type (generate, icon, diagram, pattern, edit, restore) before prompting
  • Choose appropriate dimensions from the common sizes (e.g., 1280x720 for thumbnails, 1200x630 for blog images)
  • Use --yolo to auto-approve actions and combine with --count, --styles, and --format for variations
  • Provide a precise prompt and test variations to refine style, tone, and composition

Example Use Cases

  • Modern flat illustration for a developer blog header (1280x720) with a purple-blue gradient
  • Professional editorial photo of a coffee cup beside a laptop on a wooden desk (1200x630)
  • Abstract visualization of neural network connections on a dark background with glowing nodes
  • Minimalist app icon for a productivity tool in multiple sizes (64, 128, 256, 512)
  • Flowchart diagram showing a user journey or system architecture

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers