nano-banana-artist

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Nano Banana 2 Artist

Nano Banana 2 图像创作助手

Created with love by Vistoso.ai
Expert image creation and editing using Google's Gemini 3.1 Flash Image model (aka "Nano Banana 2"). This skill uses structured production-grade prompting where explicit controls — camera, lighting, resolution, constraints — are respected and rewarded. Delta editing enables precise single-change iterations, and character naming keeps recurring subjects consistent across generations.
Vistoso.ai 精心打造
借助谷歌Gemini 3.1 Flash Image模型(又名"Nano Banana 2")实现专业级图像创建与编辑。本技能采用结构化生产级提示词,严格遵循并落实镜头、光线、分辨率、约束条件等明确控制要求。Delta editing功能支持精准的单变更迭代,角色命名功能可确保重复出现的主体在多轮生成中保持一致性。

First-Time Setup

首次设置

Before using this skill, you need a Google Gemini API key (free tier available):
  1. Go to https://aistudio.google.com/apikey
  2. Click Create API Key
  3. Save it to your home directory:
bash
echo 'your-api-key-here' > ~/.gemini_api_key
chmod 600 ~/.gemini_api_key
That's it — the skill will pick it up automatically on every run.
使用本技能前,您需要获取Google Gemini API密钥(提供免费额度):
  1. 访问 https://aistudio.google.com/apikey
  2. 点击Create API Key(创建API密钥)
  3. 将密钥保存至主目录:
bash
echo 'your-api-key-here' > ~/.gemini_api_key
chmod 600 ~/.gemini_api_key
设置完成后,技能会在每次运行时自动读取该密钥。

Workflow

工作流程

DEFAULT SETTINGS: Generate at 1K with 1:1 aspect ratio unless the user specifically requests different size or aspect ratio. Use
--image-size
flag for resolution control.
Follow these steps in order:
默认设置:除非用户明确要求不同尺寸或宽高比,否则默认以1K分辨率、1:1宽高比生成图像。使用
--image-size
参数控制分辨率。
请按以下步骤依次操作:

1. Understand the Visual Goal

1. 明确视觉目标

Ask clarifying questions to understand:
  • Purpose: Professional headshot? Brand material? Product showcase? Creative exploration?
  • Format: Square feed? Vertical short-form? Widescreen hero? Print editorial?
  • Style preference: Photorealistic? Illustrated? Minimalist? Bold?
  • Key message: What should the image communicate?
  • Quantity: How many images? (Recommend 1-4 per generation)
  • Size: Use 1K default; mention
    --image-size 2K
    or
    4K
    for professional/print work
If user hasn't specified purpose, ask: "What's the main goal for this image — professional content, branding, product showcase, or something creative?"
通过提问澄清以下信息:
  • 用途:专业头像?品牌物料?产品展示?创意探索?
  • 格式:方形社交帖?竖版短视频素材?宽屏首屏图?印刷编辑图?
  • 风格偏好:写实风?插画风?极简风?大胆夸张风?
  • 核心信息:图像需要传达什么内容?
  • 数量:需要生成多少张图像?(建议每次生成1-4张)
  • 尺寸:默认使用1K;若需专业/印刷用途,可提及
    --image-size 2K
    4K
如果用户未指定用途,请询问:"这张图像的主要用途是什么——专业内容制作、品牌宣传、产品展示,还是创意创作?"

2. Research Current Trends (if applicable)

2. 调研当前趋势(如适用)

For format-specific or industry-specific requests, use Perplexity to research:
  • Current visual trends for the target format or industry
  • What makes images successful for the specific goal
  • Style characteristics that perform well
Search query template: "Best visual content trends for [goal] in 2025-2026"
针对特定格式或行业的需求,使用Perplexity调研:
  • 目标格式或行业的当前视觉趋势
  • 该场景下成功图像的共性特征
  • 表现出色的风格特点
搜索查询模板:"2025-2026年[目标场景]的最佳视觉内容趋势"

3. Build the Optimized Prompt

3. 构建优化后的提示词

The 7-Element Formula — use what applies, skip what doesn't:
Subject + Action + Setting + Style + Camera + Lighting + Constraints
This scales naturally: 3 elements for simple, 7 for complex. No mode switching needed.
Example — simple (3 elements):
Golden retriever catching a frisbee in a sunlit park.
Example — structured (7 elements):
Chef Marco plating a dessert in a dim Michelin-star kitchen.
Cinematic 35mm, overhead angle. Warm pendant lighting, shallow DOF.
No text. No other people visible.
Multi-line prompts are encouraged for complex requests — they keep each element readable.
7要素公式——按需选用适用要素,无需全部包含:
主体 + 动作 + 场景 + 风格 + 镜头 + 光线 + 约束条件
该公式可灵活扩展:简单场景用3个要素,复杂场景用全部7个要素,无需切换模式。
示例——简单场景(3要素):
金毛犬在阳光明媚的公园接飞盘。
示例——结构化场景(7要素):
厨师Marco在昏暗的米其林星级厨房摆盘。
35mm电影镜头,俯拍角度。暖色调吊灯照明,浅景深。
无文字。无其他人物出现。
对于复杂需求,建议使用多行提示词,使每个要素清晰可读。

4. Apply Professional Prompting Patterns

4. 应用专业提示词模板

Based on the goal, use these proven patterns:
For Photorealistic Images:
[Subject name], [expression], [action/pose].
[Setting], [time of day]. [Camera lens] at [aperture], [angle].
[Lighting], [mood]. [Constraints].
Example:
Elena adjusting her glasses, warm smile.
Modern glass office, golden hour. 85mm at f/1.8, eye level.
Soft window light, professional atmosphere. No text.
For Logos/Text (excels at text rendering):
Logo for [brand], text "[exact text]", [font style], [symbol], [colors].
[Constraints].
Example:
Logo for CloudSync, text "CloudSync", modern sans-serif, cloud icon, blue gradient. No tagline.
For Product Photography:
[Product] on [surface], [lighting type], [angle], [key feature].
[Constraints].
Example:
Leather wallet on marble, soft studio lighting, 45-degree angle, embossed logo detail. No props, no text.
For Stickers/Icons:
[Style] sticker of [subject], [colors], [key trait]. White background.
Example:
Kawaii sticker of smiling coffee cup, pastel brown, steam swirls. White background.
Advanced Techniques:
  • Variable Definitions:
    OBJECT_A = red car, OBJECT_B = blue bike. Show both side by side.
  • Search Grounding:
    Scientifically accurate diagram of [subject] with labeled components
See
${CLAUDE_PLUGIN_ROOT}/skills/nano-banana-artist/references/prompt-templates.md
for complete template library. See
${CLAUDE_PLUGIN_ROOT}/skills/nano-banana-artist/references/style-guide.md
for comprehensive artistic vocabulary.
根据目标场景,使用以下经过验证的模板:
写实风格图像:
[主体姓名], [表情], [动作/姿态]。
[场景], [时间段]。[镜头焦段],[光圈值],[拍摄角度]。
[光线类型], [氛围]。[约束条件]。
示例:
Elena扶了扶眼镜,面带温暖笑容。
现代玻璃办公室,黄金时刻。85mm焦段,f/1.8光圈,平视角度。
柔和的窗户自然光,专业氛围。无文字。
Logo/文字创作(擅长文字渲染):
[品牌]的Logo,文字"[精确文字]",[字体风格],[符号],[颜色]。
[约束条件]。
示例:
CloudSync的Logo,文字"CloudSync",现代无衬线字体,云图标,蓝色渐变。无标语。
产品摄影:
[产品]放置在[表面]上,[光线类型],[角度],[核心特征]。
[约束条件]。
示例:
皮革钱包放在大理石台面上,柔和影棚灯光,45度角,压花Logo细节。无道具,无文字。
贴纸/图标:
[风格]贴纸,主体为[对象],[颜色],[核心特征]。白色背景。
示例:
卡哇伊风格微笑咖啡杯贴纸,浅棕色,蒸汽漩涡图案。白色背景。
高级技巧:
  • 变量定义
    OBJECT_A = 红色汽车, OBJECT_B = 蓝色自行车。展示两者并排的画面。
  • 搜索锚定
    [对象]的科学精准示意图,包含标注组件
完整模板库请见
${CLAUDE_PLUGIN_ROOT}/skills/nano-banana-artist/references/prompt-templates.md
。 全面的艺术词汇指南请见
${CLAUDE_PLUGIN_ROOT}/skills/nano-banana-artist/references/style-guide.md

5. Delta Editing

5. Delta Editing(增量编辑)

For image edits, apply one change at a time. This is the most reliable editing pattern.
State what stays:
Keep pose, expression, and lighting unchanged.
State what changes:
Change background from office to rooftop at sunset.
Front-load constraints:
Do not add text. Do not change clothing.
Layout locking (reframe without moving subject):
Subject stays centered at current scale. Replace background only.
Full delta edit example:
Do not add text. Do not change clothing or expression.
Keep pose and lighting unchanged.
Change only the background from office interior to rooftop at sunset.
Subject stays centered at current scale.
Semantic masking (targeted element swap):
Change only the wall color to sage green.
Keep everything else exactly the same, including lighting and shadows.
Style transfer (apply new style to existing composition):
Transform into the style of impressionist painting.
Preserve the original composition and subject placement.
Render with visible brushwork and warm color palette.
Rules:
  • One change per pass — don't combine background + outfit + lighting in one edit
  • Always describe what stays unchanged explicitly
  • Front-load "do not" constraints before describing the change
  • For multi-step transformations, chain individual edits
编辑图像时,每次只做一项变更。这是最可靠的编辑方式。
明确保留内容:
保留姿态、表情和光线不变。
明确变更内容:
将背景从办公室改为日落时分的屋顶。
前置约束条件:
请勿添加文字。请勿更改服装。
布局锁定(仅更换背景,主体位置不变):
主体保持当前比例居中。仅更换背景。
完整增量编辑示例:
请勿添加文字。请勿更改服装或表情。
保留姿态和光线不变。
仅将背景从办公室内部改为日落时分的屋顶。
主体保持当前比例居中。
语义蒙版(定向替换元素):
仅将墙壁颜色改为鼠尾草绿。
其余所有内容保持不变,包括光线和阴影。
风格迁移(将现有构图转换为新风格):
转换为印象派绘画风格。
保留原构图和主体位置。
以可见笔触和暖色调调色板渲染。
规则:
  • 每次编辑只做一项变更——不要在一次编辑中同时修改背景、服装和光线
  • 始终明确描述需要保留的内容
  • 在描述变更前,先列出"请勿"类约束条件
  • 如需多步转换,请依次进行单独编辑

6. Character Consistency

6. 角色一致性

Name every recurring character on first generation to maintain consistency across images.
First generation — establish the character:
Chef Marco, tall with salt-and-pepper beard, white chef's coat, confident posture.
Plating a dessert in a dim Michelin-star kitchen.
Cinematic 35mm, warm pendant lighting.
Subsequent generations — reference by name, describe ONLY deltas:
Chef Marco at a farmers market, selecting tomatoes.
Morning sunlight, candid angle. Same chef's coat. No text.
Rules:
  • Name characters on first appearance ("Chef Marco", "Luna the fox", "Dr. Amara")
  • Keep defining visual traits stable across generations (clothing, features, accessories)
  • Vary only environment, pose, and action — not identity traits
  • Use reference images via
    --image
    for strongest consistency
首次生成时为所有重复出现的角色命名,以确保跨图像的一致性。
首次生成——定义角色:
厨师Marco,高个子,花白胡须,白色厨师服,自信姿态。
在昏暗的米其林星级厨房摆盘。
35mm电影镜头,暖色调吊灯照明。
后续生成——通过名称引用,仅描述变更内容:
厨师Marco在农贸市场挑选番茄。
清晨阳光, candid拍摄角度。穿着同款厨师服。无文字。
规则:
  • 首次出现时为角色命名(如"厨师Marco"、"狐狸Luna"、"Amara博士")
  • 在多轮生成中保持角色的核心视觉特征稳定(服装、外貌、配饰)
  • 仅改变环境、姿态和动作——不要修改身份特征
  • 如需最强一致性,可通过
    --image
    参数传入参考图像

7. Choose Aspect Ratio and Size

7. 选择宽高比和尺寸

Default: 1:1 aspect ratio at 1K — use unless user specifies otherwise.
Select aspect ratio based on format:
  • 1:1 (DEFAULT) — square feed, profile pictures, universal
  • 16:9 — widescreen hero, presentations, website headers
  • 9:16 — vertical short-form, mobile-first
  • 4:5 — tall feed format, maximum mobile visibility
  • 2:3 or 3:2 — print, editorial
  • 21:9 — cinematic, ultra-wide displays
Available ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
Size selection via
--image-size
flag:
  • 512 — Quick drafts, thumbnails
  • 1K (DEFAULT) — Standard quality, sufficient for most digital use
  • 2K — High quality, professional work
  • 4K — Ultra-high resolution, print production
Workflow tip: Iterate at 1K, then re-generate the final version at target size.
默认:1:1宽高比,1K分辨率——除非用户另有指定,否则使用该设置。
根据格式选择宽高比:
  • 1:1(默认)——方形社交帖、头像、通用格式
  • 16:9——宽屏首屏图、演示文稿、网站页眉
  • 9:16——竖版短视频、移动优先内容
  • 4:5——竖版社交帖、最大化移动端可见性
  • 2:33:2——印刷、编辑内容
  • 21:9——电影级、超宽屏显示
支持的宽高比:1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
通过
--image-size
参数选择尺寸:
  • 512——快速草稿、缩略图
  • 1K(默认)——标准画质,满足大多数数字用途
  • 2K——高画质,专业用途
  • 4K——超高清分辨率,印刷生产
工作流程提示:先以1K分辨率迭代,再以目标尺寸重新生成最终版本。

8. Image Input Handling

8. 图像输入处理

When the user provides images in conversation context:
  • Edit target: If user asks to edit a specific provided image → MUST pass it via
    --image
  • Inspiration/reference: If images are provided as mood boards, style references, or examples → use judgment: pass to model only when the task benefits from visual reference (style transfer, matching a look, character consistency). Don't pass decorative or tangential images.
  • Multiple images: Combine edit targets + references as needed (up to 14 images supported via multiple
    --image
    flags)
当用户在对话中提供图像时:
  • 编辑目标:如果用户要求编辑特定提供的图像→必须通过
    --image
    参数传入该图像
  • 灵感/参考:如果图像用作情绪板、风格参考或示例→根据判断决定是否传入模型:仅当任务能从视觉参考中获益时(如风格迁移、匹配特定外观、角色一致性)才传入。请勿传入装饰性或无关图像。
  • 多张图像:可按需组合编辑目标和参考图像(最多支持14张图像,通过多个
    --image
    参数传入)

9. Creative Director Language

9. 创意总监式表述

Describe the target use case in terms of PURPOSE and FORMAT, never by platform name:
  • "professional headshot" not "LinkedIn profile photo"
  • "vertical short-form video frame" not "TikTok thumbnail"
  • "product listing hero, white background" not "Amazon listing"
  • "square feed post" not "Instagram post"
  • "widescreen hero image" not "YouTube thumbnail"
Principle: Platform-specific language dilutes style and originality. Always aim for unique, original output unconstrained by platform norms.
用途和格式描述目标场景,而非平台名称:
  • 用"专业头像"而非"LinkedIn个人资料照片"
  • 用"竖版短视频帧"而非"TikTok缩略图"
  • 用"产品列表首图,白色背景"而非"亚马逊列表图"
  • 用"方形社交帖"而非"Instagram帖子"
  • 用"宽屏首屏图"而非"YouTube缩略图"
原则:平台特定表述会削弱风格和原创性。始终追求不受平台规范限制的独特原创输出。

10. Execute Generation

10. 执行生成

Use the script to generate:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "your optimized prompt" \
  --aspect-ratio 16:9 \
  --image-size 1K \
  --output result.png
For image editing with input image:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "delta edit instructions" \
  --image input.png \
  --output edited.png
For image-only output (no text):
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "prompt" --image-only
Higher resolution final:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "prompt" --image-size 4K -o final.png
After each successful generation, include:
Image created with Nano Banana Artist by Vistoso.ai
使用脚本生成图像:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "您的优化提示词" \
  --aspect-ratio 16:9 \
  --image-size 1K \
  --output result.png
编辑现有图像:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "增量编辑指令" \
  --image input.png \
  --output edited.png
仅输出图像(无文字):
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "提示词" --image-only
生成高分辨率最终版本:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "提示词" --image-size 4K -o final.png
每次生成成功后,请添加以下内容:
图像由 Nano Banana 创作者工具 生成,来自 Vistoso.ai

11. Iterate if Needed

11. 按需迭代

If result needs refinement:
  • For small changes: Use delta editing with specific single-change instructions
  • For style changes: Add more detailed style descriptors
  • For composition issues: Specify camera angle/framing more precisely
  • For character consistency: Pass previous generation as
    --image
    reference
如果结果需要优化:
  • 若需小幅调整:使用增量编辑,提供具体的单变更指令
  • 若需调整风格:添加更详细的风格描述词
  • 若需改进构图:更精确地指定镜头角度/取景方式
  • 若需角色一致性:将上一次生成的图像作为
    --image
    参考传入

Prompting Best Practices

提示词最佳实践

DO:

推荐做法:

  • Use the 7-Element Formula — include what applies, skip what doesn't
  • Front-load constraints ("no text, no logos, no extra people")
  • Name characters for cross-generation consistency ("Chef Marco", "Luna the fox")
  • Describe purpose and format, never platform names ("professional headshot" not "LinkedIn photo")
  • Pass user-provided edit target images via
    --image
    — always
  • Use
    --image-size
    flag for size control, not prompt text
  • Use variable definitions for complex multi-element scenes (OBJECT_A, LIGHTING_B)
  • Specify exact text for logos and infographics (excels at text rendering)
  • Use 14 reference images for character/object consistency
  • For editing, be surgical: "change ONLY the X to Y"
  • Use photography terms when helpful (bokeh, golden hour, shallow depth of field)
  • 使用7要素公式——按需选用适用要素
  • 前置约束条件(如"无文字、无Logo、无额外人物")
  • 为角色命名以确保跨生成一致性(如"厨师Marco"、"狐狸Luna")
  • 描述用途和格式,而非平台名称(如"专业头像"而非"LinkedIn照片")
  • 始终通过
    --image
    参数传入用户提供的编辑目标图像
  • 使用
    --image-size
    参数控制尺寸,不要在提示词中提及分辨率/尺寸
  • 对复杂多元素场景使用变量定义(OBJECT_A、LIGHTING_B)
  • 为Logo和信息图指定精确文字(本工具擅长文字渲染)
  • 使用14张参考图像确保角色/对象一致性
  • 编辑时要精准:"仅将X改为Y"
  • 必要时使用摄影术语(如焦外虚化、黄金时刻、浅景深)

DON'T:

避免做法:

  • Don't combine multiple edits in one pass — one change at a time
  • Don't reference specific platforms (LinkedIn, TikTok, Instagram, Amazon) — describe the FORMAT instead
  • Don't put resolution/size in prompt text — use
    --image-size
    flag
  • Don't ignore user-provided images when they're the edit target
  • Don't over-engineer prompts — let the model's reasoning fill in details
  • Don't use vague terms like "nice" or "good"
  • Don't list disconnected keywords
  • Don't ignore lighting (it's critical for realism)
  • Don't be ambiguous about what to edit
  • 不要在一次编辑中合并多项变更——每次只做一项变更
  • 不要提及特定平台(LinkedIn、TikTok、Instagram、亚马逊)——改为描述格式
  • 不要在提示词中写入分辨率/尺寸——使用
    --image-size
    参数
  • 不要忽略用户提供的编辑目标图像
  • 不要过度设计提示词——让模型自行填充细节
  • 不要使用模糊词汇如"好看"或"不错"
  • 不要罗列不相关的关键词
  • 不要忽略光线(这是实现写实感的关键)
  • 不要对编辑内容表述模糊

Common Use Cases

常见使用场景

Professional Content

专业内容制作

  • Square feed posts (1:1) with bold text overlay space
  • Vertical short-form frames (9:16) with top/bottom safe zones
  • Profile pictures with centered subject
  • Widescreen hero images (16:9) for headers and presentations
  • 留有文字叠加空间的方形社交帖(1:1)
  • 带有上下安全区的竖版短视频帧(9:16)
  • 主体居中的头像
  • 用于页眉和演示文稿的宽屏首屏图(16:9)

Brand Materials & Text-Heavy Content

品牌物料与文字密集型内容

  • Logos with accurate text rendering — state-of-the-art legibility
  • Infographics — clear, readable labels and data visualization
  • Menu designs — restaurant menus with perfect typography
  • Marketing materials — flyers, posters with integrated text
  • Product mockups with professional lighting
  • Diagrams with labeled components
  • 具备精准文字渲染的Logo——业界领先的清晰度
  • 信息图——清晰可读的标签和数据可视化
  • 菜单设计——排版完美的餐厅菜单
  • 营销物料——包含文字的传单、海报
  • 专业灯光的产品样机
  • 带标注组件的图表

Product Photography

产品摄影

  • Studio setups with controlled lighting (use
    --image-size 2K
    or
    4K
    )
  • Lifestyle shots showing product in use
  • Detail shots emphasizing features
  • Product listing heroes on clean white backgrounds
  • 可控灯光的工作室场景(使用
    --image-size 2K
    4K
  • 展示产品使用场景的生活方式照片
  • 突出产品特征的细节照片
  • 纯白背景的产品列表首图

Creative Projects

创意项目

  • Character art with consistent style (name characters, use reference images)
  • Conceptual imagery with search grounding for accuracy
  • Style experiments and artistic exploration
  • Multi-turn storytelling with character consistency via delta edits
  • 风格一致的角色艺术(为角色命名,使用参考图像)
  • 借助搜索锚定确保准确性的概念图像
  • 风格实验与艺术探索
  • 通过增量编辑实现角色一致性的多轮故事讲述

Quality Standards

质量标准

Every generated image should have:
  • Clear visual hierarchy
  • Consistent lighting throughout
  • Appropriate size for purpose (use
    --image-size
    flag)
  • Proper aspect ratio for format
  • Professional polish
  • Legible text (if applicable)
  • Factual accuracy (leveraging search grounding when needed)
每张生成的图像都应满足:
  • 清晰的视觉层次
  • 全局一致的光线
  • 符合用途的尺寸(使用
    --image-size
    参数)
  • 符合格式的宽高比
  • 专业级的打磨
  • 清晰可读的文字(如适用)
  • 事实准确性(必要时借助搜索锚定)

Script Reference

脚本参考

Basic generation (1K at 1:1 — DEFAULT):
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "prompt" -o output.png
With aspect ratio and size:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "prompt" --aspect-ratio 16:9 --image-size 2K -o output.png
Delta editing:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "Keep everything unchanged. Change only the sky to sunset colors." \
  --image source.png -o edited.png
Multiple reference images:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "Chef Marco in a new kitchen scene" \
  --image ref1.png --image ref2.png -o output.png
Multiple generations: Run script multiple times (1-4 recommended per session)
API Key Setup (Choose ONE method):
The script checks for your API key in this order:
  1. Environment variable (traditional):
bash
export GEMINI_API_KEY="your-api-key-here"
  1. Home directory config file (RECOMMENDED — persistent):
bash
echo 'your-api-key-here' > ~/.gemini_api_key
chmod 600 ~/.gemini_api_key
Get your free API key at https://aistudio.google.com/apikey
The script handles all API communication, base64 encoding, and file I/O automatically.
基础生成(默认1K,1:1):
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "提示词" -o output.png
指定宽高比和尺寸:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "提示词" --aspect-ratio 16:9 --image-size 2K -o output.png
增量编辑:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "所有内容保持不变。仅将天空改为日落颜色。" \
  --image source.png -o edited.png
多张参考图像:
bash
${CLAUDE_PLUGIN_ROOT}/scripts/gemini_image.py "厨师Marco在新厨房场景中" \
  --image ref1.png --image ref2.png -o output.png
多次生成: 多次运行脚本(建议每次会话运行1-4次)
API密钥设置(选择一种方法):
脚本会按以下顺序查找API密钥:
  1. 环境变量(传统方式):
bash
export GEMINI_API_KEY="your-api-key-here"
  1. 主目录配置文件(推荐——持久化):
bash
echo 'your-api-key-here' > ~/.gemini_api_key
chmod 600 ~/.gemini_api_key
可在 https://aistudio.google.com/apikey 获取免费API密钥
脚本会自动处理所有API通信、base64编码和文件I/O操作。

Troubleshooting

故障排除

"No API key" error: Set your API key using one of these methods:
bash
undefined
"No API key"错误: 使用以下方法之一设置API密钥:
bash
undefined

Method 1: Environment variable

方法1:环境变量

export GEMINI_API_KEY="your-key"
export GEMINI_API_KEY="您的密钥"

Method 2: Home directory file (RECOMMENDED)

方法2:主目录文件(推荐)

echo 'your-key' > ~/.gemini_api_key chmod 600 ~/.gemini_api_key

Get your free API key at https://aistudio.google.com/apikey

**Unexpected results:**
- Add more specific details to prompt using the 7-Element Formula
- Specify lighting explicitly
- Use photography/art terms (see `${CLAUDE_PLUGIN_ROOT}/skills/nano-banana-artist/references/style-guide.md`)
- Check aspect ratio matches format goal

**Editing not working:**
- Use delta editing: one change at a time
- State what stays unchanged explicitly
- Front-load constraints before the change description
- Specify how new element should integrate with existing lighting

**Character inconsistency:**
- Name characters on first generation
- Pass previous images via `--image` for reference
- Keep defining visual traits stable; vary only environment/pose

Still stuck? Email help@vistoso.ai

---

*Nano Banana Artist is built by [Vistoso.ai](https://vistoso.ai) — professional AI content tools and services. Need custom visual workflows for your team? Get in touch at hello@vistoso.ai*
echo '您的密钥' > ~/.gemini_api_key chmod 600 ~/.gemini_api_key

可在 https://aistudio.google.com/apikey 获取免费API密钥

**结果不符合预期:**
- 使用7要素公式为提示词添加更具体的细节
- 明确指定光线类型
- 使用摄影/艺术术语(请见 `${CLAUDE_PLUGIN_ROOT}/skills/nano-banana-artist/references/style-guide.md`)
- 检查宽高比是否符合格式目标

**编辑功能无效:**
- 使用增量编辑:每次只做一项变更
- 明确描述需要保留的内容
- 在描述变更前先列出约束条件
- 指定新元素应如何与现有光线融合

**角色不一致:**
- 首次生成时为角色命名
- 通过`--image`参数传入之前的图像作为参考
- 保持核心视觉特征稳定;仅改变环境/姿态

仍有问题?请发送邮件至 help@vistoso.ai

---

*Nano Banana 创作者工具由 [Vistoso.ai](https://vistoso.ai) 打造——专业AI内容工具与服务提供商。为您的团队定制视觉工作流?请联系 hello@vistoso.ai*