The Agent Skills Directory
npx skills add https://smithery.ai/skills/The-Focus-AI/nano-banana-image-generation通过 nano-banana CLI 使用 Google 的 Gemini 图像模型生成和编辑图像。
GEMINI_API_KEY 环境变量npx @the-focus-ai/nano-banana 安装# 生成新图像
npx @the-focus-ai/nano-banana "日落时分宁静的山景"
# 编辑现有图像
npx @the-focus-ai/nano-banana "在天空中添加一个热气球" --file photo.jpg
# 指定输出路径
npx @the-focus-ai/nano-banana "一个极简风格的标志" --output logo.png
# 使用特定模型
npx @the-focus-ai/nano-banana "细节丰富的插画" --model gemini-2.5-flash-image
在生成之前,请明确:
请参阅 prompting-guide.md 获取全面的指导。
关键原则:
示例 - 弱提示词:
"一只猫"
示例 - 强提示词:
"一只毛茸茸的橙色虎斑猫蜷缩在天鹅绒扶手椅上,柔和的午后阳光透过窗户洒进来,温暖舒适的内饰,照片级真实感风格,浅景深"
npx @the-focus-ai/nano-banana "你的详细提示词"
默认输出:output/generated-<timestamp>.png
如果结果不理想:
--file 修改生成的图像npx @the-focus-ai/nano-banana "<提示词>"
npx @the-focus-ai/nano-banana "<编辑指令>" --file <输入图像>
编辑指令应描述要做的更改:
| 选项 | 描述 |
|---|---|
--file <图像> | 用于编辑的输入图像 |
--output <路径> | 自定义输出路径 |
--model <名称> | 特定的 Gemini 模型 |
--flash | 使用 gemini-2.5-flash-image(更快,图像更简单) |
--prompt-file <路径> | 从文件读取提示词 |
--list-models | 显示可用模型 |
当创建多个相关图像时:
请参阅 examples/ 目录以获取完整的提示词示例。
"科技博客的 16:9 宽屏横幅图像。简洁的极简主义设计,带有青绿色和橙色的抽象几何形状。明亮的白色背景,社论杂志美学。无文字,无深色,无渐变。"
"陶瓷咖啡杯在大理石表面上的专业产品照片。来自左侧的柔和自然光,微妙的阴影,干净的白色背景。商业摄影风格,4K 质量,产品对焦清晰。"
"儿童读物风格的插画,描绘了一只狐狸在一棵大橡树下读书。柔和的水彩风格,温暖的秋色,温柔而诱人的氛围。简单的构图,以狐狸为焦点。"
"冥想应用的极简主义应用图标。柔和的紫色渐变中的简单莲花符号。干净的几何设计,在小尺寸下效果良好,现代而平静的美学。"
gemini-2.5-flash-image)确保已设置 GEMINI_API_KEY:
export GEMINI_API_KEY="你的-api-key-here"
或者在项目中创建一个 .env 文件:
GEMINI_API_KEY=你的-api-key-here
每周安装次数
–
来源
首次出现
–
Generate and edit images using Google's Gemini image models via the nano-banana CLI.
GEMINI_API_KEY environment variable must be setnpx @the-focus-ai/nano-banana# Generate a new image
npx @the-focus-ai/nano-banana "a serene mountain landscape at sunset"
# Edit an existing image
npx @the-focus-ai/nano-banana "add a hot air balloon to the sky" --file photo.jpg
# Specify output path
npx @the-focus-ai/nano-banana "a minimalist logo" --output logo.png
# Use a specific model
npx @the-focus-ai/nano-banana "detailed illustration" --model gemini-2.5-flash-image
Before generating, clarify:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
See prompting-guide.md for comprehensive guidance.
Key principles:
Example - Weak prompt:
"a cat"
Example - Strong prompt:
"A fluffy orange tabby cat curled up on a velvet armchair, soft afternoon sunlight streaming through a window, warm cozy interior, photorealistic style, shallow depth of field"
npx @the-focus-ai/nano-banana "your detailed prompt here"
Default output: output/generated-<timestamp>.png
If the result isn't right:
--file to modify the generated imagenpx @the-focus-ai/nano-banana "<prompt>"
npx @the-focus-ai/nano-banana "<edit instruction>" --file <input-image>
Edit instructions should describe the change:
| Option | Description |
|---|---|
--file <image> | Input image for editing |
--output <path> | Custom output path |
--model <name> | Specific Gemini model |
--flash | Use gemini-2.5-flash-image (faster, simpler images) |
--prompt-file <path> | Read prompt from file |
--list-models | Show available models |
When creating multiple related images:
See the examples/ directory for full prompt examples.
"Wide 16:9 header image for a technology blog. Clean minimalist design with
abstract geometric shapes in teal and orange. Bright white background,
editorial magazine aesthetic. No text, no dark colors, no gradients."
"Professional product photo of a ceramic coffee mug on a marble surface.
Soft natural lighting from the left, subtle shadow, clean white background.
Commercial photography style, 4K quality, sharp focus on the product."
"Whimsical children's book illustration of a fox reading a book under a
large oak tree. Soft watercolor style, warm autumn colors, gentle and
inviting mood. Simple composition with the fox as the focal point."
"Minimalist app icon for a meditation app. Simple lotus flower symbol in
a soft purple gradient. Clean geometric design, works at small sizes,
modern and calming aesthetic."
gemini-2.5-flash-image)Ensure GEMINI_API_KEY is set:
export GEMINI_API_KEY="your-api-key-here"
Or create a .env file in your project:
GEMINI_API_KEY=your-api-key-here
Weekly Installs
–
Source
First Seen
–
超能力技能使用指南:AI助手技能调用优先级与工作流程详解
45,100 周安装