ads-generate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAds Generate: AI Ad Image Generator
广告生成:AI广告图像生成器
Generates platform-sized ad creative images from your campaign brief and brand
profile. Uses banana-claude as the image generation provider.
根据你的活动brief和品牌资料生成适配平台尺寸的广告创意图片。使用banana-claude作为图像生成服务提供商。
Quick Reference
快速参考
| Command | What it does |
|---|---|
| Generate all images from campaign-brief.md |
| Generate Meta assets only |
| Standalone generation without brief |
| 命令 | 功能 |
|---|---|
| 从campaign-brief.md生成所有图片 |
| 仅生成Meta平台素材 |
| 无需brief的独立生成模式 |
Environment Setup
环境配置
Required before running:
- Requires banana-claude (v1.4.1+) with nanobanana-mcp configured
- Run to configure API key and MCP
/banana setup - Fallback: if banana is not available, use (deprecated)
scripts/generate_image.py
If banana-claude is not installed, this skill will display setup instructions
and stop. It will never fail silently.
运行前必备条件:
- 需要安装配置了nanobanana-mcp的banana-claude(v1.4.1及以上版本)
- 运行配置API密钥和MCP
/banana setup - 备选方案:如果无法使用banana,可使用(已废弃)
scripts/generate_image.py
如果未安装banana-claude,该技能会展示配置指引并终止运行,不会无提示静默失败。
Process
运行流程
Step 1: Verify banana-claude
步骤1:验证banana-claude
Verify banana-claude is installed (run to check). If not installed,
display setup instructions and exit.
/banana setup验证banana-claude是否已安装(可运行检查)。如果未安装,展示配置指引并退出。
/banana setupStep 2: Locate Source Files
步骤2:定位源文件
Check for:
- → primary source for prompts and dimensions
campaign-brief.md - → brand color/style injection (optional but recommended)
brand-profile.json
If campaign-brief.md is found: Use section as the
generation job list.
## Image Generation BriefsIf no campaign-brief.md: Enter standalone mode (Step 2b).
检查以下文件:
- → 提示词和尺寸的主要来源
campaign-brief.md - → 品牌颜色/风格注入(可选但推荐提供)
brand-profile.json
如果找到campaign-brief.md:使用章节作为生成任务列表。
## Image Generation Briefs如果未找到campaign-brief.md:进入独立生成模式(步骤2b)。
Step 2b: Standalone Mode
步骤2b:独立生成模式
Ask the user:
- Generation prompt (what should the image show?)
- Target platform (to set correct dimensions)
- Output filename (optional)
Then skip to Step 5.
询问用户以下信息:
- 生成提示词(图片需要展示什么内容?)
- 目标平台(用于设置正确的尺寸)
- 输出文件名(可选)
之后直接跳转至步骤5。
Step 3: Read Provider Config
步骤3:读取服务提供商配置
Load to confirm:
~/.claude/skills/ads/references/image-providers.md- Active provider pricing (show user the cost estimate)
- Rate limits for current tier
- Batch API availability
加载确认以下信息:
~/.claude/skills/ads/references/image-providers.md- 活跃服务商定价(向用户展示成本估算)
- 当前档位的速率限制
- 批量API可用性
Step 4: Read Platform Specs
步骤4:读取平台规范
For each platform in the campaign brief, load the relevant spec reference:
~/.claude/skills/ads/references/meta-creative-specs.md~/.claude/skills/ads/references/google-creative-specs.md~/.claude/skills/ads/references/tiktok-creative-specs.md~/.claude/skills/ads/references/linkedin-creative-specs.md~/.claude/skills/ads/references/youtube-creative-specs.md~/.claude/skills/ads/references/microsoft-creative-specs.md
针对活动brief中的每个平台,加载对应的规范参考文件:
~/.claude/skills/ads/references/meta-creative-specs.md~/.claude/skills/ads/references/google-creative-specs.md~/.claude/skills/ads/references/tiktok-creative-specs.md~/.claude/skills/ads/references/linkedin-creative-specs.md~/.claude/skills/ads/references/youtube-creative-specs.md~/.claude/skills/ads/references/microsoft-creative-specs.md
Step 5: Prepare banana Configuration
步骤5:准备banana配置
Create banana brand preset from brand-profile.json if one does not already exist
at .
~/.banana/presets/{brand-slug}.jsonSelect banana domain mode based on campaign brief content:
- Product: e-commerce, packshots
- Editorial: brand awareness, lifestyle
- Cinema: video thumbnails, dramatic
- UI/Web: app install, SaaS
- Portrait: testimonials, people
如果路径下不存在对应的品牌预设,就根据brand-profile.json创建banana品牌预设。
~/.banana/presets/{brand-slug}.json根据活动brief内容选择banana领域模式:
- Product:电商、产品展示图
- Editorial:品牌曝光、生活方式
- Cinema:视频缩略图、戏剧化风格
- UI/Web:应用安装、SaaS
- Portrait:用户评价、人物类素材
Step 6: Spawn Visual Designer Agent
步骤6:启动视觉设计师Agent
Spawn the agent using the Task tool with ,
passing the selected domain mode and preset name.
visual-designercontext: forkThe agent will:
- Parse the image generation briefs from campaign-brief.md
- Inject brand colors and mood from brand-profile.json
- Use banana-claude with the configured domain mode for each asset
- Save to directory structure
./ad-assets/[platform]/[concept]/ - Write
generation-manifest.json
使用Task工具以模式启动 Agent,传入选择的领域模式和预设名称。
context: forkvisual-designer该Agent将执行以下操作:
- 解析campaign-brief.md中的图像生成brief
- 注入brand-profile.json中的品牌颜色和风格基调
- 对每个素材使用配置好对应领域模式的banana-claude生成
- 保存到目录结构下
./ad-assets/[platform]/[concept]/ - 写入文件
generation-manifest.json
Step 7: Validate with Format Adapter
步骤7:格式适配器验证
After the visual-designer completes, spawn the agent
with to validate dimensions and report missing formats.
format-adaptercontext: fork视觉设计师Agent完成任务后,以模式启动 Agent,验证素材尺寸并报告缺失的格式。
context: forkformat-adapterStep 8: Quality Gate
步骤8:质量校验
Use Claude vision to assess each generated image against the brief (score 1 to 10
on brand alignment, composition, platform fit). If any image scores below 6,
regenerate once with an adjusted prompt.
使用Claude视觉能力将每张生成的图片与brief要求进行对比评估(从品牌匹配度、构图、平台适配性三个维度按1-10分打分)。如果任意图片得分低于6分,使用调整后的提示词重新生成一次。
Step 9: Aggregate Costs
步骤9:汇总成本
Read banana cost data from and include total creative spend
in generation-manifest.json.
~/.banana/costs.json从读取banana费用数据,将创意生成总支出计入generation-manifest.json。
~/.banana/costs.jsonStep 10: Report Results
步骤10:结果报告
Present a summary:
Generation complete:
Generated assets:
✓ ./ad-assets/meta/concept-1/feed-1080x1350.png
✓ ./ad-assets/tiktok/concept-1/vertical-1080x1920.png
✗ ./ad-assets/google/concept-1/landscape-1200x628.png [error reason]
Format validation: See format-report.md
Cost: $[N] total creative spend (from ~/.banana/costs.json)
Next steps:
1. Review assets in ./ad-assets/
2. Check format-report.md for any missing formats
3. Upload to your ad platform managers展示生成总结:
生成完成:
已生成素材:
✓ ./ad-assets/meta/concept-1/feed-1080x1350.png
✓ ./ad-assets/tiktok/concept-1/vertical-1080x1920.png
✗ ./ad-assets/google/concept-1/landscape-1200x628.png [错误原因]
格式验证:详见format-report.md
成本:总创意支出$[N](数据来自~/.banana/costs.json)
后续步骤:
1. 查看./ad-assets/目录下的素材
2. 检查format-report.md确认是否有缺失格式
3. 上传到你的广告平台管理后台Cost Transparency
成本透明化
Before generating, estimate and show the cost:
- Count the number of image briefs in campaign-brief.md
- Show estimated cost based on banana pricing tiers
- If >$1.00, ask for confirmation before proceeding
生成前会估算并展示费用:
- 统计campaign-brief.md中的图像生成brief数量
- 根据banana定价档位展示预估成本
- 如果预估成本超过1美元,生成前会询问用户确认
Standalone Mode (No campaign-brief.md)
独立生成模式(无campaign-brief.md)
When running without a campaign brief:
Platform target → dimensions used:
meta-feed → 1080×1350 (4:5)
meta-reels → 1080×1920 (9:16)
tiktok → 1080×1920 (9:16)
google-pmax → 1200×628 (1.91:1)
linkedin → 1080×1080 (1:1)
youtube → 1280×720 (16:9)
youtube-short → 1080×1920 (9:16)Use directly with the specified prompt and aspect ratio.
/banana generate未提供活动brief时运行的规则:
目标平台 → 对应尺寸:
meta-feed → 1080×1350 (4:5)
meta-reels → 1080×1920 (9:16)
tiktok → 1080×1920 (9:16)
google-pmax → 1200×628 (1.91:1)
linkedin → 1080×1080 (1:1)
youtube → 1280×720 (16:9)
youtube-short → 1080×1920 (9:16)直接使用指定提示词和宽高比调用生成。
/banana generateReference Files
参考文件
- : provider config, pricing, limits
~/.claude/skills/ads/references/image-providers.md - : per-platform specs
~/.claude/skills/ads/references/[platform]-creative-specs.md - : brand injection schema
~/.claude/skills/ads/references/brand-dna-template.md
- :服务商配置、定价、限制
~/.claude/skills/ads/references/image-providers.md - :各平台素材规范
~/.claude/skills/ads/references/[platform]-creative-specs.md - :品牌注入配置Schema
~/.claude/skills/ads/references/brand-dna-template.md