Generate structured JSON prompts for AI image generation via Nano Banana 2. Use when the user wants to create, generate, or make an image, illustration, icon, mockup, concept art, or any visual asset. Supports adaptive questioning, 33 curated presets (web, game, app design), user presets, context-inferred settings, and iterative refinement with version branching.
Generate structured JSON prompts optimized for Nano Banana 2 image generation. This skill walks the user through an adaptive questioning flow, assembles a JSON prompt from a master schema, infers API parameters, and supports iterative refinement.
Before starting, read these files from the skill directory to understand the available fields and inference rules:
references/schema.json — the master prompt schema with all fields across 3 tiersassets/prompt_config.yaml — context inference rules for aspect ratio, resolution, thinking levelAsk the user what they want to create:
"What do you want to create? Describe it however you like — a sentence, a vibe, a reference. You can also say 'show presets' to browse options or 'use [preset name]' to start from a template."
Parse the user's freeform input and extract as many Tier 1 fields as possible:
Show what you extracted and ask for confirmation:
Here's what I picked up:
- Subject: [extracted]
- Environment: [extracted or "not specified"]
- Style: [extracted or "photorealistic"]
- Action: [extracted or "none"]
Anything to change? Or want to go deeper on lighting, camera, and composition?
Ask ONE question at a time for each Tier 2 field. Offer sensible defaults based on the subject/style. Use the schema enums to present valid options:
At any point if the user says "that's enough" or "skip the rest," stop asking and fill remaining fields with context-appropriate defaults.
After Tier 2, ask:
"Want full control over details, textures, and effects? Or is this good to go?"
Ask about each Tier 3 field one at a time:
Skip fields that don't apply to the current subject/scene. Don't ask about clothing for a landscape.
If the user says "use [name]" or "start from [name]" at any point:
.json file in the presets/ directoryListing presets — if user says "show presets" or "list presets":
Group by _meta.category and display:
General: cinematic, photorealistic, anime, oil-painting, product-shot, editorial-fashion, fantasy-art Web Design: web-hero-section, web-product-mockup, web-ui-illustration, web-avatar, web-blog-thumbnail, web-icon-asset, web-saas-dashboard-bg Game Design: game-character-concept, game-environment-concept, game-item-icon, game-card-art, game-pixel-sprite, game-ui-mockup, game-splash-screen, game-texture-tile App Design: app-onboarding-illustration, app-empty-state, app-store-screenshot, app-icon, app-notification-graphic, app-walkthrough-hero, app-feature-banner, app-avatar-pack, app-dark-mode-bg Cross-over: logo-concept, mood-board Your Presets: [list any user-saved presets with _meta.category = "user"]
Preset load precedence: If a user-saved preset shares a name with a curated preset, the user preset wins.
Before generating, infer API parameters by scanning the assembled JSON field VALUES using the rules in assets/prompt_config.yaml.
Aspect ratio inference:
Thinking level inference:
Resolution inference:
Show the inferred parameters for override:
Ready to generate:
- Resolution: [inferred] | Aspect Ratio: [inferred] | Thinking: [inferred] | Images: 1
Override anything? Or say 'go' to generate.
Flatten the structured JSON into a single narrative prompt string optimized for Nano Banana 2.
Assembly template:
[Style]. [Subject] [action] in [environment]. [Composition framing], [composition rule].
[Camera lens], [aperture], [angle], [depth of field]. [Lighting type] lighting from [direction], [color temperature].
[Mood] mood. Colors: [color palette with hex codes]. [Details]. [Textures]. [Effects]. [Style references].
[Negative prompt in ALL CAPS: "Do NOT include..."]
Assembly rules:
#FF6B6B instead of "coral red")Call the MCP tool:
mcp__nano-banana-2__generate_image(
prompt: [assembled prompt string],
resolution: [from api params],
aspectRatio: [from api params],
thinking: [from api params],
numberOfImages: [from api params]
)
After generation, store the complete JSON as a numbered version and present options:
Version 1 generated. What next?
- Describe changes in plain English (I'll update the JSON and re-generate)
- "save as preset [name]" to save this config for future use
- "show json" to see the current prompt JSON
- "done" to finish
Maintain a numbered list of complete JSON snapshots in context:
Version History:
├─ v1: [brief description] → generated
├─ v2: [changes from v1] → generated
└─ v3: branched from v1, [changes] → generated
Operations:
mcp__nano-banana-2__continue_editing with the edit descriptionmcp__nano-banana-2__generate_image with the full updated promptgenerate_image (MCP image context is lost when branching)Cap at 20 versions per session. At v20:
"You've hit 20 versions this session. Save your favorites as presets, then say 'clear history' to reset and keep going."
On "clear history": discard all in-memory JSON snapshots (branching to prior versions is no longer possible) and reset the counter to v1.
When the user says "save as preset [name]":
_meta block with "category": "user" and the user's chosen namepresets/[name].json in the skill directoryWhen the user says "delete preset [name]":
_meta.category: "user"): delete the fileThese are baked into the prompt assembly logic: