Sandbox
@Emily2040/nano-banana-image-skill

Agent skill for Gemini image prompting

This repo packages a Nano Banana image prompting workflow as a reusable skill for agent-based builders. It includes a canonical SKILL.md entrypoint, companion loader files for different agents, and supporting registries, schemas, examples, and scripts for generating and validating prompts and runtime payloads.

30 stars5 forksPythonUpdated 3mo ago
Who it's for

Builders who want their agent to turn rough image ideas into structured Gemini prompts and edit-safe instructions.

What it delivers

You can move from vague creative ideas to clear, model-aware image prompts and JSON payloads your agent can reuse.

What it does

Canonical skill entrypoint

Uses SKILL.md as the main skill file, with AGENTS.md, CLAUDE.md, and GEMINI.md for different loaders.

Model-aware prompt routing

Routes requests for Nano Banana Pro, Nano Banana 2 / V2, and the legacy Nano Banana path.

Interview and grounding workflow

Asks missing questions, grounds the scene and subject, and compiles a fuller production brief.

Edit preservation support

Keeps subject identity and preserved elements stable across variants and edits.

Structured runtime output

Produces authoring and runtime JSON schemas for downstream apps or API calls.

Validation and compilation scripts

Includes scripts to validate the repo and compile runtime and Gemini request payloads.

How to get it

  1. 1Run
    git clone https://github.com/Emily2040/nano-banana-image-skill.git
    cd nano-banana-image-skill
  2. 2Codex / skill-aware clients
    mkdir -p ~/.agents/skills
    ln -s /path/to/nano-banana-image-skill ~/.agents/skills/nano-banana-image-skill
  3. 3Claude Code
    mkdir -p ~/.claude/skills
    cp -R nano-banana-image-skill ~/.claude/skills/
  4. 4Run
    python -m pip install -r requirements-dev.txt

README

Nano Banana Image Skill

License Validate Agent Skills GitHub Pages

Nano Banana Image Skill hero

A production-grade, agent-portable image prompting skill for Nano Banana Pro and Nano Banana 2 / V2 in the Gemini image family. It turns fuzzy creative requests into clean interview questions, grounded art direction, model-aware prompt stacks, edit-preservation deltas, and structured JSON payloads.

The skill is built as an open Agent Skills package with a canonical SKILL.md entrypoint, plus companion files for agents that prefer AGENTS.md, CLAUDE.md, or GEMINI.md.


What this skill is for

Use this repo when you want an agent to do any of the following well:

  • write high-precision prompts for Gemini image generation,
  • transform vague art direction into a complete production brief,
  • preserve subject identity across edits and variants,
  • create text-in-image layouts that do not collapse into typographic soup,
  • route a request into the right style family, genre, movement, culture, capture mode, rendering pipeline, and output profile,
  • package the final answer as structured JSON for downstream apps or API calls.

The skill is optimized for both speed workflows using Nano Banana 2 / V2 for fast iteration, and high-fidelity workflows using Nano Banana Pro for complex reasoning, stronger text rendering, and tighter instruction following.


Companion package

This repository now includes a broader companion skill at packages/model-aware-image-prompt-engineer.

Use it when the target is not only Nano Banana. It routes image prompts across Gemini, OpenAI image models, Midjourney, FLUX, Qwen-Image, Z-Image, Stable Diffusion, Pony, Illustrious, NoobAI, Animagine, HunyuanImage, HiDream, OmniGen2, Sana, PixArt, Kolors, Chroma, Runway, Ideogram, Firefly, Recraft, Luma, local ComfyUI workflows, and hosted wrappers.

It also includes a public README hero and infographic:


Model targets

Friendly nameCanonical model targetBest for
Nano Banana Progemini-3-pro-image-previewpremium text rendering, complex layouts, infographics, poster work, careful edits
Nano Banana 2 / V2gemini-3.1-flash-image-previewfast ideation, multi-variant batches, speedy edits, responsive iteration
Nano Bananagemini-2.5-flash-imagelegacy fast path, lightweight tasks

The skill keeps model choice explicit in both the human-readable brief and the runtime JSON.

Gemini API note: Google currently documents Gemini image generation through generateContent, with gemini-3-pro-image-preview for Nano Banana Pro, gemini-3.1-flash-image-preview for Nano Banana 2 / V2, and gemini-2.5-flash-image for the legacy fast path. Keep prompt text, image config, source references, and provenance notes separate in runtime payloads.


Design goals

GoalHow
PortableCanonical SKILL.md for skill-aware agents, plus AGENTS.md, CLAUDE.md, and GEMINI.md for ecosystem-specific loaders.
ModularCore prompting logic split into focused files under skills/core/. Style and output families live in their own registries. Schemas and examples separated cleanly.
BeautifulIncludes a GitHub Pages front-end in docs/ with ImageGen raster artwork, SVG diagrams, and a polished landing page.
DeployableShips with a validation script, example compiler, and GitHub Actions CI workflow.

Repository structure

nano-banana-image-skill/
├─ README.md
├─ SKILL.md                  # Canonical entrypoint (slim, under 500 chars)
├─ references/
│  └─ 00-orchestrator.md     # Full workflow (progressive disclosure)
├─ AGENTS.md                 # Codex / AGENTS-style context
├─ CLAUDE.md                 # Claude Code memory
├─ GEMINI.md                 # Gemini CLI memory
├─ agents/
│  └─ openai.yaml            # Codex UI metadata
├─ LICENSE                   # Apache-2.0
├─ .gitignore
├─ Makefile
├─ requirements-dev.txt
├─ schemas/
│  ├─ authoring-base.json    # Rich authoring contract
│  ├─ runtime-compact.json   # Compact runtime payload
│  └─ pack-format.json       # Pack manifest schema
├─ registry/
│  ├─ style-axes.md          # Style taxonomy
│  ├─ aliases.json           # Model and style aliases
│  ├─ forbidden-slop.json    # Slop scrubbing rules
│  ├─ interview-question-bank.json
│  └─ token-budgets.json
├─ skills/
│  ├─ core/                  # 20+ modular guidance files
│  ├─ families/              # Style family modules
│  ├─ genres/                # Genre modules
│  ├─ movements/             # Art movement modules
│  └─ ...                    # cultures, capture, pipelines, etc.
├─ examples/
│  ├─ authoring/             # 5 rich authoring briefs
│  └─ runtime/               # 5 matching runtime payloads
├─ scripts/
│  ├─ validate_repo.py       # Repository validator
│  ├─ compile_runtime.py     # Authoring-to-runtime compiler
│  └─ compile_gemini_request.py # Runtime-to-Gemini request skeleton
├─ docs/
│  ├─ index.html             # GitHub Pages landing page
│  └─ assets/                # Raster and SVG artwork (hero, infographic, flow, etc.)
└─ .github/workflows/
   └─ validate.yml           # CI validation workflow

Compatibility strategy

Client stylePrimary fileBehavior
Open Agent Skills / skill-aware agentsSKILL.mdCanonical root entrypoint with progressive disclosure via references/.
AGENTS-style project guidanceAGENTS.mdPoints the agent to the canonical skill and repo workflow.
Claude Code memoryCLAUDE.mdLoads concise repo-specific memory without replacing the skill.
Gemini CLI / Gemini Code AssistGEMINI.mdImports the canonical skill and references supporting files.

Quick start

Clone the repository

git clone https://github.com/Emily2040/nano-banana-image-skill.git
cd nano-banana-image-skill

Install as a skill

Codex / skill-aware clients:

mkdir -p ~/.agents/skills
ln -s /path/to/nano-banana-image-skill ~/.agents/skills/nano-banana-image-skill

Claude Code:

mkdir -p ~/.claude/skills
cp -R nano-banana-image-skill ~/.claude/skills/

Gemini CLI / Gemini Code Assist: Open the full repository as a workspace. Gemini reads GEMINI.md which imports the canonical SKILL.md.


How the skill thinks

The high-level workflow is:

  1. Interview the request and ask only the missing high-value questions.
  2. Ground the scene, subject, era, materials, and real-world logic.
  3. Route style, profile, platform, and overlays.
  4. Bind references so identity and preserved elements do not drift.
  5. Compile a clean prompt with explicit composition, lighting, and constraints.
  6. Scrub slop and remove fashionable nonsense that wastes tokens.
  7. Validate risk around ambiguity, policy, copyright, likeness, and text claims.
  8. Emit schema output for both authoring and runtime.

The modular files under skills/core/ document each step in detail. The full orchestrator lives in references/00-orchestrator.md.


Example scenarios

ScenarioModeModelKey modules
Fast concept batch (sci-fi alley, drone shot)generateNano Banana 2sci-fi, drone, volumetric-lighting, vfx-shot
Festival poster with readable textgenerate + text-in-imageNano Banana Proposter-layout, text-layout, japanese-edo, ukiyo-e
Precise product relightedit + relightNano Banana Propreservation, edit-delta, background-swap
Character continuity across 3 framesvariationNano Banana Procontinuity, reference-binding, preservation
Classroom infographic with labelsgenerateNano Banana Proinfographic, text-layout, educational

Five validated authoring + runtime example pairs live in examples/.


Validation

Install dev dependencies

python -m pip install -r requirements-dev.txt

Run the repository validator

python scripts/validate_repo.py

Compile a runtime payload from an authoring brief

python scripts/compile_runtime.py examples/authoring/poster-edo-festival-text.json \
  -o /tmp/poster.runtime.json

Compile a Gemini request skeleton

python scripts/compile_gemini_request.py examples/runtime/poster-edo-festival-text.json \
  -o /tmp/poster.gemini-request.json

Make targets

make validate
make compile-examples

GitHub Pages front-end

This repository includes a static landing page in docs/. To publish it:

  1. Push the repo to GitHub.
  2. Open Settings > Pages.
  3. Choose Deploy from a branch.
  4. Select the master branch and the /docs folder, or main if you rename the default branch.
  5. Save.

A .nojekyll file is included to keep the static assets untouched.

Constellation map


Author

Created by Iamemily2050


License

Apache-2.0. See LICENSE.

Files in the repo

Repository payload19 top-level entries
  • .github
  • agents
  • docs
  • examples
  • packages
  • references
  • registry
  • schemas
  • scripts
  • skills
  • .gitignore
  • AGENTS.md
  • CLAUDE.md
  • GEMINI.md
  • LICENSE
  • Makefile
  • README.md
  • requirements-dev.txt
  • SKILL.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k

Taste-Skill - gives your AI good taste. stops the AI from generating boring, generic slop

86k

Agent skill for beautiful, verifiable architecture, workflow, sequence, data-flow, and lifecycle diagrams—self-contained HTML with motion and crisp export.

57k