返回 Skills

Ecommerce Main Images

ecommerce-main-images

Generate ecommerce main images from product photos with optional reference images. Use when the user asks to create Amazon, Taobao, Tmall, 1688, Temu, Shopee, or marketplace-ready hero images, white-background main images, clean listing covers, or polished product-first commercial images with GPT Image 2.

SKILL.md

Ecommerce Main Images

When to Use

Use this skill when the user wants marketplace-ready ecommerce main images from one or more real product photos. Typical requests include:

  • Create listing cover images, hero images, first images, white-background main images, clean product covers, or polished product-first commercial images.
  • Rebuild a rough product photo into a cleaner Amazon, Taobao, Tmall, 1688, Temu, Shopee, TikTok Shop, Xiaohongshu, JD, or Pinduoduo main image.
  • Use optional reference images for background, lighting, crop, composition, props, or premium ecommerce style while preserving the user’s actual product.
  • Generate a small set of main-image variants for A/B testing, such as white-background, light lifestyle, premium studio, or platform-specific covers.

Use this skill for first-screen product covers. Use ecommerce-selling-point-images when the image should include multiple feature callouts, explanatory text blocks, or benefit diagrams. Use tmall-product-images for a full listing image set.

Inputs

  • Required: at least one original product image. Preserve the product’s identity, shape, proportions, color, material appearance, logo placement, packaging, SKU details, and distinctive marks.
  • Optional: reference images. Use them as composition, background, lighting, crop, styling, or prop references only. Do not copy unrelated products, competitor branding, watermarks, or exact ad layouts.
  • Optional: target platform. Default to a general clean ecommerce main image when unspecified. Use platform constraints when named: Amazon should be plain and product-dominant; Taobao/Tmall/1688 can be more commercial and styled; Xiaohongshu can be more lifestyle; Temu/Shopee should remain high-contrast and product-first.
  • Optional: main image type. Default to a clean studio hero image. Other useful modes: white background, premium studio, light lifestyle, scene hero, bundle/SKU display, or transparent-feel cutout.
  • Optional: text policy. Default to no visible text for main images unless the user requests a Chinese domestic ecommerce cover. If text is requested, keep it minimal and factual.
  • Optional: aspect ratio or output size. Default to square 1024x1024; use 1536x1024 for landscape and 1024x1536 for portrait when requested or category-appropriate.
  • Optional: output count. Default to 1. Pass n only when the user asks for multiple variations.
  • Optional: output format and quality. Default to PNG and quality: "high" for final deliverables.

Execution

Use $gpt-image-2 for the actual image operation. This skill provides ecommerce main-image strategy, prompt structure, product preservation rules, and platform constraints; $gpt-image-2 provides the execution path.

  1. Follow $gpt-image-2 image editing mode.

Because this workflow starts from real product imagery, use GPT Image Editing through fusion-api.openai_image_edit_async_submit, as documented by $gpt-image-2. Do not run new oo capability discovery during normal use.

  1. Upload local images that must be passed to $gpt-image-2:
oo file upload "<product-image-path>" --json
oo file upload "<reference-image-path>" --json

Pass each returned downloadUrl as an image reference in images, using the $gpt-image-2 shape:

{"image_url":"<downloadUrl>"}

Put primary product images first, then optional references. If the user provides multiple product angles, include the angles that are needed for product fidelity. If the user provides many references, select the useful ones and summarize the rest in the prompt.

  1. Choose the main-image mode.
  • white background: plain white or very light background, product centered and occupying most of the frame, no text, no props unless the platform/category permits them.
  • premium studio: clean light studio background, soft shadows, refined lighting, product-dominant composition, usually no text.
  • light lifestyle: simple usage context or subtle props, product remains the hero, avoid clutter.
  • scene hero: category-relevant environment, product still prominent and not hidden by props.
  • bundle/SKU display: clean arrangement of product, variants, or included accessories only when supplied or visible.
  1. Build a concise prompt with this structure:
Create a marketplace-ready ecommerce main image.
Primary product: preserve the product from image 1 accurately, including shape, proportions, color, material appearance, packaging, labels, logo placement, SKU details, and distinctive physical features.
Reference usage: use images 2+ only for background, lighting, crop, composition, props, or style inspiration; do not copy unrelated products, competitor brands, watermarks, platform badges, or text.
Platform: <platform or general ecommerce>.
Main-image mode: <white background | premium studio | light lifestyle | scene hero | bundle/SKU display>.
Text policy: <no text by default, or minimal factual text requested by user>.
Composition: product-first, clean commercial photography, strong first-thumbnail readability, centered or balanced framing, natural shadow, uncluttered background, high perceived quality.
Avoid: QR codes, phone numbers, social handles, external URLs, watermarks, platform badges, fake discounts, unsupported claims, fake certificates, extra products not provided, distorted product details, messy props, unreadable or excessive text.
  1. Execute with $gpt-image-2.

The underlying command shape is:

oo connector run "fusion-api" \
  --action "openai_image_edit_async_submit" \
  --data @payload.json \
  --json

Example payload:

{
  "model": "gpt-image-2",
  "prompt": "Create a marketplace-ready ecommerce main image...",
  "images": [
    {"image_url": "<product-downloadUrl>"},
    {"image_url": "<optional-reference-downloadUrl>"}
  ],
  "output_format": "png",
  "quality": "high",
  "size": "1024x1024"
}

Use exact $gpt-image-2 field names: output_format, quality, size, and optional n. oo connector run --json usually waits internally and returns completed image results directly; if it returns a handle, follow $gpt-image-2 polling guidance.

Result Handling

Read GPT Image 2 results according to $gpt-image-2:

  • Image URLs are usually in .data.data[].url.
  • Revised prompts may be in .data.data[].revised_prompt.
  • Returned metadata may include .data.size, .data.quality, .data.output_format, .data.model, and .data.usage.

Download each returned HTTP image URL with oo file download "<url>" "<output-dir>" --name "<fileNameWithoutExtension>" --ext "<png|jpeg|webp|jpg>". oo file download prints Saved to: <path> and does not support --json.

  • Use a clear local output directory such as /Users/yunshi/Downloads/ecommerce-main-images/<short-product-name>-<timestamp>/.
  • Name files predictably, for example main-image-01.png, main-image-02.png, etc.
  • Preview the generated image when practical, or return the local file path and a short note describing platform, mode, size, and reference use.
  • If the task returns structured result data instead of direct URLs, report the actual returned fields and do not invent file URLs.

Failure Handling

  • Missing original product image: stop and ask for one product image.
  • Unclear main-image mode: default to premium studio for non-Amazon domestic ecommerce and white background for Amazon-style requests.
  • Too many reference images: select the most relevant references for composition/style and summarize the rest in the prompt.
  • User asks for claims or text without proof: keep main image text minimal or omit it; do not invent certifications, rankings, performance numbers, brand authorization, discounts, warranties, or regulated claims.
  • Unsupported size, output format, quality, or count: use the nearest $gpt-image-2 supported value and mention the adjustment.
  • Upload failure: report the exact file that failed and retry only after the path or network issue is resolved.
  • Connector handle or timeout: follow $gpt-image-2 result/polling guidance before rerunning. Do not start a duplicate task only because a wait window ended.
  • GPT Image 2 connector failure or billing/auth blocker: report the exact blocker from oo output and the next useful action.