agentleFS
oztenozten/skills/nano-banana-image-gen/SKILL.md

nano-banana-image-gen

Skill7 starsChanged 9 months agoMITView on GitHub

Generate images using the `imagen` CLI (Gemini and OpenAI models). Use when the user says "nano banana", "generate an image", "create an image", "make me a picture", "image gen", "draw", "illustrate", or wants to create images from text prompts.

  • Pipes a download into a shell
  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the user provides $ARGUMENTS, treat them as the image prompt.

    line 62
  2. Very specific:

    Before generating, verify imagen is available:

    line 66
  3. Very specific:

    Ask them: "Would you like me to install the imagen CLI?

    line 74
  4. Distinctive:

    If they agree, run:

    line 75
  5. Very specific:

    After installation, verify it worked: imagen --version

    line 79
  6. Distinctive:

    Check for API keys:

    line 83
  7. Distinctive:

    If no keys are found for the provider needed by the chosen model:

    line 92
  8. Distinctive:

    Ask them to set up keys via environment variable or config file:

    line 94
  9. Distinctive:

    Do NOT proceed with generation until at least one relevant key is configured

    line 102
  10. Distinctive:

    Only include flags that differ from defaults.

    line 117

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Image Generation with imagen CLI

Generate images using the imagen CLI — a unified interface for Google Gemini and OpenAI image models. Supports text prompts, multiple aspect ratios, output formats, batch generation, and more.

Prerequisites

  1. imagen CLI: Install via curl -fsSL https://raw.githubusercontent.com/ozten/imagen/main/scripts/install.sh | bash
  2. API Keys: Configure via environment variables or config file (see below)

Quick Start

# Basic generation (uses default nano-banana / gemini-3-pro-image-preview)
imagen "A cat wearing a top hat" -o cat.jpg

# With aspect ratio
imagen "Mountain panorama" --aspect-ratio 16:9 -o mountains.jpg

# Using OpenAI model
imagen "Cyberpunk cityscape" -m gpt-1.5 -o city.png

# Multiple images
imagen "Abstract art" -n 3 -o art.jpg

# Higher resolution
imagen "Detailed landscape" --size 2K -o landscape.jpg

# Read prompt from file
imagen --prompt-file prompt.txt -o result.jpg

Models

AliasModel IDProvider
nano-banana (default)gemini-3-pro-image-previewGemini
gpt-1.5gpt-image-1.5OpenAI
gpt-1gpt-image-1OpenAI
gpt-1-minigpt-image-1-miniOpenAI

Options

OptionValuesDefaultDescription
-m, --modelsee Models tablenano-bananaImage generation model
-a, --aspect-ratio1:1, 16:9, 9:16, 4:3, 3:4, etc.1:1Output aspect ratio
-s, --size1K, 2K, 4K1KImage resolution
-q, --qualityauto, low, medium, highautoQuality (OpenAI models only)
-f, --formatjpeg, png, webpjpegOutput format
-o, --outputpathauto-generatedOutput file path
-n, --countinteger1Number of images to generate
-p, --prompt-filepathnoneRead prompt from file
-v, --verboseflagoffVerbose output

Workflow

If the user provides $ARGUMENTS, treat them as the image prompt. Otherwise ask what they'd like to generate.

Step 0: Check imagen is installed

Before generating, verify imagen is available:

which imagen

If imagen is NOT found:

  1. Tell the user that the imagen CLI is required but not installed
  2. Ask them: "Would you like me to install the imagen CLI? It's a lightweight Rust binary from https://github.com/ozten/imagen"
  3. If they agree, run:
    curl -fsSL https://raw.githubusercontent.com/ozten/imagen/main/scripts/install.sh | bash
  4. After installation, verify it worked: imagen --version

If API keys are NOT configured:

Check for API keys:

# Check env vars
echo "${GEMINI_API_KEY:+gemini_ok}" "${OPENAI_API_KEY:+openai_ok}"

# Check config file
cat ~/.config/imagen/config.toml 2>/dev/null

If no keys are found for the provider needed by the chosen model:

  1. Tell the user which API key is needed (Gemini for nano-banana, OpenAI for gpt-* models)
  2. Ask them to set up keys via environment variable or config file:
    • Environment variable: export GEMINI_API_KEY="your-key" or export OPENAI_API_KEY="your-key"
    • Config file (~/.config/imagen/config.toml):
      [keys]
      gemini = "your-gemini-api-key"
      openai = "your-openai-api-key"
  3. Do NOT proceed with generation until at least one relevant key is configured

Step 1: Generate the image

Determine the prompt, output path, model, aspect ratio, and other options, then run:

imagen "PROMPT" \
    --model MODEL \
    --aspect-ratio ASPECT_RATIO \
    --size SIZE \
    --format FORMAT \
    --output OUTPUT_PATH

Only include flags that differ from defaults.

Step 2: Report results

Report the output file path and parameters used. If generation fails, check:

  • API key is configured for the chosen provider
  • Prompt doesn't violate content policies
  • Model alias is valid

Batch Generation

For multiple images, either use -n for the same prompt or run imagen multiple times with different prompts:

# Same prompt, multiple variations
imagen "Abstract art" -n 3 -o abstract.jpg

# Different prompts in sequence
imagen "Panel 1: A sunny beach" -o panel_1.jpg
imagen "Panel 2: Same beach at sunset" -o panel_2.jpg

Integration

Other skills and pipelines can delegate image generation to this skill by invoking the imagen CLI directly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.