Execute according to the following process, and do not create custom code scripts for this skill.
Input specification
- Required input:
- Product original image path (local file, can be used as a reference image)
- Optional input:
mode:main|detail|both(defaultboth)mainStyle: main image style name (recommended)detailStyle: detail image style name (recommended)detailCount: number of detail images (whenmode=detail|both, must ask; if the user has not provided it, ask first)quality、imageSize、model(passed through to the image generation skill)ar(optional override; if not passed, use the default ratio)
Execution order
- Verify that the input image exists and is readable.
- Determine the generation target based on
mode:main: generate only the main imagedetail: generate only the detail image setboth: generate the main image first, then the detail image set
- When
mode=detail|both, first ask the user "How many detail images are needed?", and after obtainingdetailCount, execute. - Assemble Chinese prompts for each target image according to the style name.
- First call
banana-proxyto generate:- Use the reference image (
--ref) - Default ratio:
- Main image:
1:1 - Detail image:
3:4
- Main image:
- Suggested output paths:
- Main image:
out/ecommerce-images/<原图名>_main_<风格key>.png - Detail image i:
out/ecommerce-images/<原图名>_detail_<风格key>_n<i>.png
- Main image:
- Use the reference image (
- If
banana-proxyfails, immediately fall back tobaoyu-image-gen:- keep the same prompt, reference image, and output path conventions
- Return a structured result, including at least: mode, style name, number of detail images, final output path of each image, and the provider actually used.
Provider strategy
- Default:
banana-proxy - Fallback:
baoyu-image-gen - Reverse order is prohibited (unless the user explicitly requests it)
Style selection (extensible)
Main image styles (mainStyle):
白底极简(default)卖点文案轻场景
Detail image styles (detailStyle):
卖点总览(default)参数规格场景对比
When an undefined style name is received, fall back to the default style, and state in the result that a fallback occurred.
Detail image set rules
detailCountSuggested values for3-6: images (adjustable according to user requirements).- Each image in the set needs a clear division of roles to avoid repeated compositions. Example division of roles:
- Image 1: overview of core selling points
- Image 2: partial close-up
- Image 3: parameters/specifications
- Image 4: usage scenario
- Image 5: comparison or additional details
- If the user only says "generate detail images" but does not give a quantity, you must first ask for the quantity, then start generation.
Prompt template
Main image 白底极简:
基于参考图片中的商品,生成一张电商平台可用的商品主图。
要求:
1) 商品为唯一主体,完整不截断、无遮挡。
2) 使用干净白色或浅色背景,画面简洁。
3) 不添加Logo、水印、价格角标、二维码。
4) 光线均匀,突出材质与轮廓,符合主流电商审核要求。
Detail image 卖点总览:
基于参考图片中的商品,生成一张电商详情页模块图。
要求:
1) 以商品为主体,可展示2-3个局部特写。
2) 可添加少量简短中文卖点,排版清晰易读。
3) 背景可轻场景化,但不喧宾夺主。
4) 不添加Logo、水印、二维码或平台强绑定UI元素。
Environment variables
- When using
banana-proxy:LNAPI_KEY(required)
- When using
baoyu-image-genfallback:- Prefer
GOOGLE_API_KEY, orOPENAI_API_KEY
- Prefer
Output convention
mode=main: return the main image pathmode=detail: return the detail image pathmode=both: return the main image and detail image paths- Detail images return an array:
savedDetailImages[] - Include for each image the
provider(banana-proxyorbaoyu-image-gen) andstyleKey
user-facing wording
- First confirm the style in natural language, for example:
- "Should the main image be minimalist with a white background, or include selling-point copy?"
- "For the detail images, do you want a selling-point overview, parameter specifications, or scenario comparison?"
- If the user says "default style", then use for the main image
白底极简, and for the detail images卖点总览。