Agent skill
nano-banana
REQUIRED for all image generation requests. Generate and edit images using Nano Banana (Gemini CLI). Handles blog featured images, YouTube thumbnails, icons, diagrams, patterns, illustrations, photos, visual assets, graphics, artwork, pictures. Use this skill whenever the user asks to create, generate, make, draw, design, or edit any image or visual content.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/nano-banana
SKILL.md
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.
Command Selection
| User Request | Command |
|---|---|
| "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 and
the --allowed-mcp-server-names nanobanana flag to auto-enable the required MCP.
| Command | Use Case |
|---|---|
gemini "/generate 'prompt'" |
Text-to-image generation |
gemini "/edit file.jpg 'instruction'" |
Modify existing image |
gemini "/restore old_photo.jpg 'fix scratches'" |
Repair damaged photos |
gemini "/icon 'description'" |
App icons, favicons, UI elements |
gemini "/diagram 'description'" |
Flowcharts, architecture diagrams |
gemini "/pattern 'description'" |
Seamless textures and patterns |
gemini "/story 'description'" |
Sequential/narrative images |
gemini "/nanobanana prompt" |
Natural language interface |
Command Options
--yolo- Required. Auto-approve all tool actions (no confirmation prompts)--allowed-mcp-server-names nanobananaRequired.
Prompt Options
--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 Case | Dimensions | Notes |
|---|---|---|
| YouTube thumbnail | 1280x720 | --aspect=16:9 |
| Blog featured image | 1200x630 | Social preview friendly |
| Square social | 1080x1080 | Instagram, LinkedIn |
| Twitter/X header | 1500x500 | Wide banner |
| Vertical story | 1080x1920 | --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 Example
# Modern illustration style
gemini --allowed-mcp-server-names nanobanana --yolo "/generate 'modern flat illustration of developer coding at laptop, purple and blue gradient background, minimalist style, no text' --preview --count=3"
Icon Generation
gemini --allowed-mcp-server-names nanobanana --yolo "/icon 'minimalist app logo for productivity tool' --sizes='64,128,256,512' --type='app-icon' --corners='rounded'"
Diagram Generation
gemini --allowed-mcp-server-names nanobanana --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:
- List contents of
./nanobanana-output/to find generated files. - Verify using
file <path>that the image is valid and the image type matches the file extension. Rename the file if the extension doesn't match. - Present the most recent image(s) to the user.
- 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 --allowed-mcp-server-names nanobanana --yolo "/edit nanobanana-output/filename.jpg 'adjustment'" - "Different style": Add
--styles="requested_style"to the command
Prompt Tips
- Be specific: Include style, mood, colors, composition details
- Add "no text": If you don't want text rendered in the image
- Reference styles: "editorial photography", "flat illustration", "3D render", "watercolor"
- Specify aspect ratio context: "wide banner", "square thumbnail", "vertical story"
Troubleshooting
| Problem | Solution |
|---|---|
| Extension not found | Run install command from setup section |
| Quota exceeded | Wait for reset or switch to flash model |
| Image generation failed | Check prompt for policy violations, simplify request |
| Output directory missing | Will be created automatically on first run |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?