E-commerce Product Image Generator
Create professional product images optimized for e-commerce platforms with platform-specific requirements and multiple visual styles.
Usage
# Auto-select style based on product
/product-image-generator product-description.md
# Specify style
/product-image-generator product.md --style minimal
# Specify platform (auto-adjusts image requirements)
/product-image-generator product.md --platform amazon
# Specify scene type
/product-image-generator product.md --scene studio
# Combine options
/product-image-generator product.md --style premium --platform shopify --scene lifestyle
# Direct input
/product-image-generator
[paste product description]
# Direct input with options
/product-image-generator --style minimal --scene studio
[paste product description]
# With reference image (for style consistency)
/product-image-generator product.md --ref brand-style.png
# Multiple reference images
/product-image-generator product.md --ref style.png --ref competitor.jpg
Options
| Option |
Description |
--style <name> |
Visual style (see Style Gallery) |
--scene <type> |
Scene type (see Scene Gallery) |
--platform <name> |
E-commerce platform (auto-adjusts requirements) |
--ref <path> |
Reference image(s) for style consistency |
Three Dimensions
| Dimension |
Controls |
Options |
| Style |
Visual aesthetics: mood, color treatment |
minimal, premium, lifestyle, bold, soft, tech, natural, luxury |
| Scene |
Background and context |
studio, lifestyle, contextual, exploded, comparison, infographic |
| Platform |
Technical requirements |
amazon, shopify, ebay, etsy, taobao, jd, pinduoduo |
Style × Scene × Platform can be freely combined. Example: --style premium --scene lifestyle --platform amazon creates a high-end lifestyle shot meeting Amazon's image requirements.
Style Gallery
| Style |
Description |
Best For |
minimal (Default) |
Clean, white background, focus on product |
Electronics, accessories, professional products |
premium |
Sophisticated, elegant lighting, subtle shadows |
Luxury goods, jewelry, high-end cosmetics |
lifestyle |
Product in natural use context |
Home goods, fashion, outdoor products |
bold |
High contrast, vibrant, attention-grabbing |
Sports products, gaming, youth-oriented items |
soft |
Gentle lighting, pastel tones, warm |
Baby products, skincare, wellness items |
tech |
Futuristic, sleek, modern |
Electronics, gadgets, software, AI products |
natural |
Organic, eco-friendly, earthy tones |
Sustainable products, food, natural cosmetics |
luxury |
Gold accents, dramatic lighting, rich colors |
Premium brands, jewelry, high-end fashion |
Detailed style definitions: references/presets/<style>.md
Scene Gallery
| Scene |
Description |
Image Count |
studio (Default) |
Pure white/gradient background, professional studio lighting |
1-3 images |
lifestyle |
Product in real-life usage scenario |
2-5 images |
contextual |
Product in environment, staged setting |
2-4 images |
exploded |
Component breakdown, features highlighted |
3-6 images |
comparison |
Before/after, product vs alternatives |
2-4 images |
infographic |
Features, specs, benefits with text overlays |
2-5 images |
Detailed scene definitions: references/elements/scene-guide.md
Platform Requirements
| Platform |
Main Image |
Additional Images |
Notes |
amazon |
1000x1000+, pure white |
Up to 9 images |
Main image must be on pure white background |
shopify |
1024x1024+ recommended |
Unlimited |
Flexible, but 1:1 or 4:3 recommended |
ebay |
500x500+ minimum |
Up to 12 free |
White background preferred |
etsy |
760x760+ |
Up to 10 images |
Lifestyle shots perform well |
taobao |
800x800+ |
Up to 15 images |
Infographic style popular |
jd |
800x800+ |
Up to 15 images |
Clean, professional style |
pinduoduo |
750x750+ |
Up to 10 images |
Value-focused presentation |
Platform-specific guidelines: references/platforms/<platform>.md
Auto Selection
| Product Category |
Style |
Scene |
| Electronics, gadgets |
tech or minimal |
studio + exploded |
| Fashion, accessories |
premium or lifestyle |
lifestyle + contextual |
| Beauty, cosmetics |
soft or premium |
studio + lifestyle |
| Home, furniture |
lifestyle or natural |
contextual + lifestyle |
| Sports, outdoor |
bold or lifestyle |
lifestyle + contextual |
| Jewelry, luxury |
luxury or premium |
studio + lifestyle |
| Baby, kids |
soft or natural |
lifestyle + contextual |
| Food, supplements |
natural or minimal |
studio + infographic |
| Tools, hardware |
bold or tech |
exploded + infographic |
Outline Strategies
Strategy A: Product-Focused (产品聚焦型)
| Aspect |
Description |
| Concept |
Product as hero, clean presentation |
| Features |
Multiple angles, detail shots, pure backgrounds |
| Best for |
Electronics, accessories, luxury items |
| Structure |
Hero shot → Angle variations → Detail close-ups → Scale/context |
Strategy B: Lifestyle-Focused (场景融入型)
| Aspect |
Description |
| Concept |
Product in natural use environment |
| Features |
Context-rich, emotional connection, aspirational |
| Best for |
Home goods, fashion, outdoor products |
| Structure |
Lifestyle hero → Usage scenario → Benefits in context → Social proof |
Strategy C: Information-Focused (信息传达型)
| Aspect |
Description |
| Concept |
Features and benefits clearly communicated |
| Features |
Text overlays, callouts, comparisons |
| Best for |
Complex products, tools, supplements |
| Structure |
Hero with key benefit → Feature breakdown → Comparison → Specs/usage |
File Structure
Each session creates an independent directory named by product slug:
product-images/{product-slug}/
├── source-{slug}.{ext} # Source files (description, reference images)
├── analysis.md # Product analysis + positioning
├── outline-strategy-a.md # Strategy A: Product-focused
├── outline-strategy-b.md # Strategy B: Lifestyle-focused
├── outline-strategy-c.md # Strategy C: Information-focused
├── outline.md # Final selected/merged outline
├── prompts/
│ ├── 01-hero-[slug].md
│ ├── 02-detail-[slug].md
│ └── ...
├── 01-hero-[slug].png
├── 02-detail-[slug].png
└── NN-infographic-[slug].png
Slug Generation:
- Extract product name (2-4 words, kebab-case)
- Example: "无线蓝牙耳机" →
wireless-earbuds
Conflict Resolution:
If product-images/{product-slug}/ already exists:
- Append timestamp:
{product-slug}-YYYYMMDD-HHMMSS
Workflow
Progress Checklist
Product Image Generation Progress:
- [ ] Step 0: Check preferences (EXTEND.md) ⛔ BLOCKING
- [ ] Step 1: Analyze product → analysis.md
- [ ] Step 2: Confirmation 1 - Product understanding ⚠️ REQUIRED
- [ ] Step 3: Generate 3 outline + style variants
- [ ] Step 4: Confirmation 2 - Outline & style & platform ⚠️ REQUIRED
- [ ] Step 5: Generate images (sequential)
- [ ] Step 6: Completion report
Flow
Input → [Step 0: Preferences] ─┬─ Found → Continue
│
└─ Not found → First-Time Setup ⛔ BLOCKING
│
└─ Complete setup → Save EXTEND.md → Continue
│
┌─────────────────────────────────────────────────────────────────────────────┘
↓
Analyze → [Confirm 1] → 3 Outlines → [Confirm 2: Outline + Style + Platform] → Generate → Complete
Step 0: Load Preferences (EXTEND.md) ⛔ BLOCKING
Purpose: Load user preferences or run first-time setup.
CRITICAL: If EXTEND.md not found, MUST complete first-time setup before ANY other steps.
Use Bash to check EXTEND.md existence:
# Check project-level first
test -f .teamclaw-skills/product-image-generator/EXTEND.md && echo "project"
# Then user-level
test -f "$HOME/.teamclaw-skills/product-image-generator/EXTEND.md" && echo "user"
| Result |
Action |
| Found |
Read, parse, display summary → Continue to Step 1 |
| Not found |
⛔ BLOCKING: Run first-time setup → Save EXTEND.md → Step 1 |
First-Time Setup (when EXTEND.md not found):
Use AskUserQuestion with ALL questions in ONE call:
- Default platform preference: amazon / shopify / ebay / etsy / taobao / jd / pinduoduo / no preference
- Default style preference: minimal / premium / lifestyle / bold / soft / tech / natural / luxury
- Watermark: Enable / Disable (if enable, specify text and position)
- Language: Chinese / English / Auto-detect
Schema: references/config/preferences-schema.md
Step 1: Analyze Product → analysis.md
Actions:
- Save source content:
- If file path provided: use as-is
- If pasted content: save to
source.md
- Backup rule: If exists, rename to
source-backup-YYYYMMDD-HHMMSS.md
- Read and analyze product information
- Product analysis:
- Category identification
- Target audience
- Key features and selling points
- Competitive positioning
- Visual opportunities
- Detect product language
- Determine recommended image count and types
- Generate clarifying questions (see Step 2)
- Save to
analysis.md
Step 2: Confirmation 1 - Product Understanding ⚠️
Purpose: Validate understanding + collect missing info.
Display summary:
- Product category identified
- Key features extracted
- Target audience
- Recommended platform match
Use AskUserQuestion for:
Primary selling point (multiSelect: true):
- Design/aesthetics
- Functionality/features
- Price/value
- Quality/durability
- Brand/status
- Innovation/technology
- Sustainability/eco-friendly
- Convenience/ease of use
Target customer:
- Budget-conscious
- Quality-focused
- Luxury/premium
- Tech-savvy
- Eco-conscious
- Family-oriented
- Professional/business
- Youth/trend-focused
Main use scenario:
- Indoor/home
- Outdoor
- Office/work
- Travel
- Sports/fitness
- Social/events
- Auto
Additional context (optional)
After response: Update analysis.md → Step 3
Step 3: Generate 3 Outline + Style Variants
Create three distinct strategy variants, each with outline structure and visual style recommendation.
| Strategy |
Filename |
Focus |
Recommended Style |
| A |
outline-strategy-a.md |
Product-focused |
minimal, tech |
| B |
outline-strategy-b.md |
Lifestyle-focused |
lifestyle, soft, natural |
| C |
outline-strategy-c.md |
Information-focused |
bold, infographic-style |
Outline format (YAML front matter + content):
---
strategy: a # a, b, or c
name: Product-Focused
style: minimal
style_reason: "Clean presentation highlights product design and build quality"
scene: studio
platform: amazon
image_count: 5
---
## P1 Hero Shot
**Type**: hero
**Purpose**: Main product image, first impression
**Visual**: Product on pure white background, professional lighting
**Platform**: Amazon main image compliant (1000x1000, pure white)
## P2 Angle Variation
**Type**: angle
**Purpose**: Show product from different perspective
**Visual**: 45-degree angle, slight shadow for depth
## P3 Detail Close-up
**Type**: detail
**Purpose**: Highlight key feature or quality detail
**Visual**: Macro shot of texture/material/connection point
...
After response: Update analysis.md → Step 3
Step 4: Confirmation 2 - Outline & Style & Platform Selection ⚠️
Purpose: User chooses strategy, confirms style and platform.
Display each strategy:
- Strategy name + image count + recommended style
- Image-by-image summary
Use AskUserQuestion with questions:
Question 1: Outline Strategy
- Strategy A (Product-focused)
- Strategy B (Lifestyle-focused)
- Strategy C (Information-focused)
- Combine: specify images from each
Question 2: Visual Style
- Use strategy's recommended style
- Or select from: minimal / premium / lifestyle / bold / soft / tech / natural / luxury
- Or type custom style description
Question 3: Platform
- Use strategy's recommended platform
- Or select: amazon / shopify / ebay / etsy / taobao / jd / pinduoduo
- Custom: specify requirements
Question 4: Scene Type
- Use strategy's recommended scene
- Or select: studio / lifestyle / contextual / exploded / comparison / infographic
After response:
- Single strategy → copy to
outline.md with confirmed settings
- Combination → merge specified images
- Update
outline.md frontmatter with final settings
Step 5: Generate Images
With confirmed outline + style + scene + platform:
Visual Consistency — Reference Image Chain:
Check for user-provided reference images (--ref option)
- If provided: Use as primary style reference
- If not provided: Use internal reference chain (see below)
Internal Reference Chain (when no user ref provided):
- Generate image 1 (hero) FIRST — without
--ref
- Use image 1 as
--ref for ALL remaining images (2, 3, ..., N)
For each image:
- Save prompt to
prompts/NN-{type}-[slug].md
- Backup rule: If exists, rename to
prompts/NN-{type}-[slug]-backup-YYYYMMDD-HHMMSS.md
- Include reference image paths in prompt
- Generate image:
- With user ref:
--ref <user-reference.png> for all images
- Image 1 (no user ref): Generate without
--ref (establishes visual anchor)
- Images 2+ (no user ref): Generate with
--ref <image-01-path>
- Backup rule: If image exists, rename with timestamp
- Report progress after each generation
Reference Image Best Practices:
| Reference Type |
Usage |
Effect |
| Style reference |
Brand guideline images |
Maintains brand consistency |
| Competitor reference |
Similar product images |
Matches category standards |
| Internal chain (image 1) |
First generated image |
Ensures series consistency |
Platform Compliance:
- Apply platform-specific requirements automatically
- Amazon: Pure white background for main image
- Size adjustments based on platform
Session Management:
Use consistent session ID for all images in the set: product-{slug}-{timestamp}
Step 6: Completion Report
Product Image Set Complete!
Product: [product name]
Strategy: [A/B/C/Combined]
Style: [style name]
Scene: [scene type]
Platform: [platform] (requirements applied)
Location: [directory path]
Images: N total
✓ analysis.md
✓ outline-strategy-a.md
✓ outline-strategy-b.md
✓ outline-strategy-c.md
✓ outline.md (selected: [strategy])
Files:
- 01-hero-[slug].png ✓ Main image ([platform] compliant)
- 02-angle-[slug].png ✓ Angle variation
- 03-detail-[slug].png ✓ Detail shot
...
Image Modification
| Action |
Steps |
| Edit |
Update prompt file FIRST → Regenerate with same session ID |
| Add |
Specify position → Create prompt → Generate → Renumber files |
| Delete |
Remove files → Renumber subsequent → Update outline |
Platform-Specific Guidelines
Amazon
- Main image: Pure white background (RGB 255,255,255)
- Minimum 1000x1000 pixels for zoom feature
- Product must fill 85%+ of frame
- No text, logos, or watermarks on main image
- Additional images: lifestyle, infographic, comparison allowed
Shopify
- Recommended 1024x1024 or 4:3 aspect ratio
- More flexible styling
- Lifestyle images perform well
- Consistent style across all product images
eBay
- Minimum 500x500 pixels
- White background preferred but not required
- Up to 12 free images per listing
Content Breakdown Principles
- Hero Image (Image 1): Main product shot, platform-compliant
- Angle Variations: Show product from multiple perspectives
- Detail Shots: Highlight quality, features, materials
- Lifestyle/Context: Product in use, emotional connection
- Infographic: Features, specs, benefits with callouts
- Comparison: Before/after, vs alternatives
- Social Proof: Reviews, testimonials (if applicable)
References
Detailed templates in references/ directory:
Elements:
elements/scene-guide.md - Scene types and compositions
elements/lighting.md - Lighting setups and moods
elements/composition.md - Framing and composition rules
Presets:
presets/<style>.md - Style definitions and prompts
Workflows:
workflows/analysis-framework.md - Product analysis
workflows/outline-template.md - Outline templates
workflows/prompt-assembly.md - Prompt assembly
Platforms:
platforms/amazon.md - Amazon requirements
platforms/shopify.md - Shopify requirements
platforms/ebay.md - eBay requirements
platforms/etsy.md - Etsy requirements
platforms/taobao.md - Taobao requirements
platforms/jd.md - JD.com requirements
platforms/pinduoduo.md - Pinduoduo requirements
Config:
config/preferences-schema.md - EXTEND.md schema
config/watermark-guide.md - Watermark configuration
Notes
- Auto-retry once on failure
- Platform requirements auto-applied
- Two confirmation points required (Steps 2 & 4)
- Reference image chain ensures visual consistency
Extension Support
Custom configurations via EXTEND.md. See Step 0 for paths.
1---2name: product-image-generator3description: Generates professional product images for e-commerce platforms (Amazon, Shopify, eBay, etc.). Supports 8 visual styles and 6 scene types optimized for different product categories. Use when user mentions "商品图", "product images", "Amazon listing", "电商图片", or needs e-commerce product photography.4---5
6# E-commerce Product Image Generator
7
8Create professional product images optimized for e-commerce platforms with platform-specific requirements and multiple visual styles.
9
10## Usage
11
12```bash
13# Auto-select style based on product
14/product-image-generator product-description.md
15
16# Specify style
17/product-image-generator product.md --style minimal
18
19# Specify platform (auto-adjusts image requirements)
20/product-image-generator product.md --platform amazon
21
22# Specify scene type
23/product-image-generator product.md --scene studio
24
25# Combine options
26/product-image-generator product.md --style premium --platform shopify --scene lifestyle
27
28# Direct input
29/product-image-generator
30[paste product description]
31
32# Direct input with options
33/product-image-generator --style minimal --scene studio
34[paste product description]
35
36# With reference image (for style consistency)
37/product-image-generator product.md --ref brand-style.png
38
39# Multiple reference images
40/product-image-generator product.md --ref style.png --ref competitor.jpg
41```
42
43## Options
44
45| Option | Description |
46|--------|-------------|
47| `--style <name>` | Visual style (see Style Gallery) |
48| `--scene <type>` | Scene type (see Scene Gallery) |
49| `--platform <name>` | E-commerce platform (auto-adjusts requirements) |
50| `--ref <path>` | Reference image(s) for style consistency |
51
52## Three Dimensions
53
54| Dimension | Controls | Options |
55|-----------|----------|---------|
56| **Style** | Visual aesthetics: mood, color treatment | minimal, premium, lifestyle, bold, soft, tech, natural, luxury |
57| **Scene** | Background and context | studio, lifestyle, contextual, exploded, comparison, infographic |
58| **Platform** | Technical requirements | amazon, shopify, ebay, etsy, taobao, jd, pinduoduo |
59
60Style × Scene × Platform can be freely combined. Example: `--style premium --scene lifestyle --platform amazon` creates a high-end lifestyle shot meeting Amazon's image requirements.
61
62## Style Gallery
63
64| Style | Description | Best For |
65|-------|-------------|----------|
66| `minimal` (Default) | Clean, white background, focus on product | Electronics, accessories, professional products |
67| `premium` | Sophisticated, elegant lighting, subtle shadows | Luxury goods, jewelry, high-end cosmetics |
68| `lifestyle` | Product in natural use context | Home goods, fashion, outdoor products |
69| `bold` | High contrast, vibrant, attention-grabbing | Sports products, gaming, youth-oriented items |
70| `soft` | Gentle lighting, pastel tones, warm | Baby products, skincare, wellness items |
71| `tech` | Futuristic, sleek, modern | Electronics, gadgets, software, AI products |
72| `natural` | Organic, eco-friendly, earthy tones | Sustainable products, food, natural cosmetics |
73| `luxury` | Gold accents, dramatic lighting, rich colors | Premium brands, jewelry, high-end fashion |
74
75Detailed style definitions: `references/presets/<style>.md`
76
77## Scene Gallery
78
79| Scene | Description | Image Count |
80|-------|-------------|-------------|
81| `studio` (Default) | Pure white/gradient background, professional studio lighting | 1-3 images |
82| `lifestyle` | Product in real-life usage scenario | 2-5 images |
83| `contextual` | Product in environment, staged setting | 2-4 images |
84| `exploded` | Component breakdown, features highlighted | 3-6 images |
85| `comparison` | Before/after, product vs alternatives | 2-4 images |
86| `infographic` | Features, specs, benefits with text overlays | 2-5 images |
87
88Detailed scene definitions: `references/elements/scene-guide.md`
89
90## Platform Requirements
91
92| Platform | Main Image | Additional Images | Notes |
93|----------|------------|-------------------|-------|
94| `amazon` | 1000x1000+, pure white | Up to 9 images | Main image must be on pure white background |
95| `shopify` | 1024x1024+ recommended | Unlimited | Flexible, but 1:1 or 4:3 recommended |
96| `ebay` | 500x500+ minimum | Up to 12 free | White background preferred |
97| `etsy` | 760x760+ | Up to 10 images | Lifestyle shots perform well |
98| `taobao` | 800x800+ | Up to 15 images | Infographic style popular |
99| `jd` | 800x800+ | Up to 15 images | Clean, professional style |
100| `pinduoduo` | 750x750+ | Up to 10 images | Value-focused presentation |
101
102Platform-specific guidelines: `references/platforms/<platform>.md`
103
104## Auto Selection
105
106| Product Category | Style | Scene |
107|------------------|-------|-------|
108| Electronics, gadgets | `tech` or `minimal` | studio + exploded |
109| Fashion, accessories | `premium` or `lifestyle` | lifestyle + contextual |
110| Beauty, cosmetics | `soft` or `premium` | studio + lifestyle |
111| Home, furniture | `lifestyle` or `natural` | contextual + lifestyle |
112| Sports, outdoor | `bold` or `lifestyle` | lifestyle + contextual |
113| Jewelry, luxury | `luxury` or `premium` | studio + lifestyle |
114| Baby, kids | `soft` or `natural` | lifestyle + contextual |
115| Food, supplements | `natural` or `minimal` | studio + infographic |
116| Tools, hardware | `bold` or `tech` | exploded + infographic |
117
118## Outline Strategies
119
120### Strategy A: Product-Focused (产品聚焦型)
121
122| Aspect | Description |
123|--------|-------------|
124| **Concept** | Product as hero, clean presentation |
125| **Features** | Multiple angles, detail shots, pure backgrounds |
126| **Best for** | Electronics, accessories, luxury items |
127| **Structure** | Hero shot → Angle variations → Detail close-ups → Scale/context |
128
129### Strategy B: Lifestyle-Focused (场景融入型)
130
131| Aspect | Description |
132|--------|-------------|
133| **Concept** | Product in natural use environment |
134| **Features** | Context-rich, emotional connection, aspirational |
135| **Best for** | Home goods, fashion, outdoor products |
136| **Structure** | Lifestyle hero → Usage scenario → Benefits in context → Social proof |
137
138### Strategy C: Information-Focused (信息传达型)
139
140| Aspect | Description |
141|--------|-------------|
142| **Concept** | Features and benefits clearly communicated |
143| **Features** | Text overlays, callouts, comparisons |
144| **Best for** | Complex products, tools, supplements |
145| **Structure** | Hero with key benefit → Feature breakdown → Comparison → Specs/usage |
146
147## File Structure
148
149Each session creates an independent directory named by product slug:
150
151```
152product-images/{product-slug}/
153├── source-{slug}.{ext} # Source files (description, reference images)
154├── analysis.md # Product analysis + positioning
155├── outline-strategy-a.md # Strategy A: Product-focused
156├── outline-strategy-b.md # Strategy B: Lifestyle-focused
157├── outline-strategy-c.md # Strategy C: Information-focused
158├── outline.md # Final selected/merged outline
159├── prompts/
160│ ├── 01-hero-[slug].md
161│ ├── 02-detail-[slug].md
162│ └── ...
163├── 01-hero-[slug].png
164├── 02-detail-[slug].png
165└── NN-infographic-[slug].png
166```
167
168**Slug Generation**:
1691. Extract product name (2-4 words, kebab-case)
1702. Example: "无线蓝牙耳机" → `wireless-earbuds`
171
172**Conflict Resolution**:
173If `product-images/{product-slug}/` already exists:
174- Append timestamp: `{product-slug}-YYYYMMDD-HHMMSS`
175
176## Workflow
177
178### Progress Checklist
179
180```
181Product Image Generation Progress:
182- [ ] Step 0: Check preferences (EXTEND.md) ⛔ BLOCKING
183- [ ] Step 1: Analyze product → analysis.md
184- [ ] Step 2: Confirmation 1 - Product understanding ⚠️ REQUIRED
185- [ ] Step 3: Generate 3 outline + style variants
186- [ ] Step 4: Confirmation 2 - Outline & style & platform ⚠️ REQUIRED
187- [ ] Step 5: Generate images (sequential)
188- [ ] Step 6: Completion report
189```
190
191### Flow
192
193```
194Input → [Step 0: Preferences] ─┬─ Found → Continue
195 │
196 └─ Not found → First-Time Setup ⛔ BLOCKING
197 │
198 └─ Complete setup → Save EXTEND.md → Continue
199 │
200 ┌─────────────────────────────────────────────────────────────────────────────┘
201 ↓
202Analyze → [Confirm 1] → 3 Outlines → [Confirm 2: Outline + Style + Platform] → Generate → Complete
203```
204
205### Step 0: Load Preferences (EXTEND.md) ⛔ BLOCKING
206
207**Purpose**: Load user preferences or run first-time setup.
208
209**CRITICAL**: If EXTEND.md not found, MUST complete first-time setup before ANY other steps.
210
211Use Bash to check EXTEND.md existence:
212
213```bash
214# Check project-level first
215test -f .teamclaw-skills/product-image-generator/EXTEND.md && echo "project"
216
217# Then user-level
218test -f "$HOME/.teamclaw-skills/product-image-generator/EXTEND.md" && echo "user"
219```
220
221| Result | Action |
222|--------|--------|
223| Found | Read, parse, display summary → Continue to Step 1 |
224| Not found | ⛔ BLOCKING: Run first-time setup → Save EXTEND.md → Step 1 |
225
226**First-Time Setup** (when EXTEND.md not found):
227
228Use AskUserQuestion with ALL questions in ONE call:
229
2301. **Default platform preference**: amazon / shopify / ebay / etsy / taobao / jd / pinduoduo / no preference
2312. **Default style preference**: minimal / premium / lifestyle / bold / soft / tech / natural / luxury
2323. **Watermark**: Enable / Disable (if enable, specify text and position)
2334. **Language**: Chinese / English / Auto-detect
234
235Schema: `references/config/preferences-schema.md`
236
237### Step 1: Analyze Product → `analysis.md`
238
239**Actions**:
2401. **Save source content**:
241 - If file path provided: use as-is
242 - If pasted content: save to `source.md`
243 - **Backup rule**: If exists, rename to `source-backup-YYYYMMDD-HHMMSS.md`
2442. Read and analyze product information
2453. **Product analysis**:
246 - Category identification
247 - Target audience
248 - Key features and selling points
249 - Competitive positioning
250 - Visual opportunities
2514. Detect product language
2525. Determine recommended image count and types
2536. **Generate clarifying questions** (see Step 2)
2547. **Save to `analysis.md`**
255
256### Step 2: Confirmation 1 - Product Understanding ⚠️
257
258**Purpose**: Validate understanding + collect missing info.
259
260**Display summary**:
261- Product category identified
262- Key features extracted
263- Target audience
264- Recommended platform match
265
266**Use AskUserQuestion** for:
2671. **Primary selling point** (multiSelect: true):
268 - Design/aesthetics
269 - Functionality/features
270 - Price/value
271 - Quality/durability
272 - Brand/status
273 - Innovation/technology
274 - Sustainability/eco-friendly
275 - Convenience/ease of use
276
2772. **Target customer**:
278 - Budget-conscious
279 - Quality-focused
280 - Luxury/premium
281 - Tech-savvy
282 - Eco-conscious
283 - Family-oriented
284 - Professional/business
285 - Youth/trend-focused
286
2873. **Main use scenario**:
288 - Indoor/home
289 - Outdoor
290 - Office/work
291 - Travel
292 - Sports/fitness
293 - Social/events
294 - Auto
295
2964. **Additional context** (optional)
297
298**After response**: Update `analysis.md` → Step 3
299
300### Step 3: Generate 3 Outline + Style Variants
301
302Create three distinct strategy variants, each with outline structure and visual style recommendation.
303
304| Strategy | Filename | Focus | Recommended Style |
305|----------|----------|-------|-------------------|
306| A | `outline-strategy-a.md` | Product-focused | minimal, tech |
307| B | `outline-strategy-b.md` | Lifestyle-focused | lifestyle, soft, natural |
308| C | `outline-strategy-c.md` | Information-focused | bold, infographic-style |
309
310**Outline format** (YAML front matter + content):
311```yaml
312---
313strategy: a # a, b, or c
314name: Product-Focused
315style: minimal
316style_reason: "Clean presentation highlights product design and build quality"
317scene: studio
318platform: amazon
319image_count: 5
320---
321
322## P1 Hero Shot
323**Type**: hero
324**Purpose**: Main product image, first impression
325**Visual**: Product on pure white background, professional lighting
326**Platform**: Amazon main image compliant (1000x1000, pure white)
327
328## P2 Angle Variation
329**Type**: angle
330**Purpose**: Show product from different perspective
331**Visual**: 45-degree angle, slight shadow for depth
332
333## P3 Detail Close-up
334**Type**: detail
335**Purpose**: Highlight key feature or quality detail
336**Visual**: Macro shot of texture/material/connection point
337
338...
339```
340
341**After response**: Update `analysis.md` → Step 3
342
343### Step 4: Confirmation 2 - Outline & Style & Platform Selection ⚠️
344
345**Purpose**: User chooses strategy, confirms style and platform.
346
347**Display each strategy**:
348- Strategy name + image count + recommended style
349- Image-by-image summary
350
351**Use AskUserQuestion** with questions:
352
353**Question 1: Outline Strategy**
354- Strategy A (Product-focused)
355- Strategy B (Lifestyle-focused)
356- Strategy C (Information-focused)
357- Combine: specify images from each
358
359**Question 2: Visual Style**
360- Use strategy's recommended style
361- Or select from: minimal / premium / lifestyle / bold / soft / tech / natural / luxury
362- Or type custom style description
363
364**Question 3: Platform**
365- Use strategy's recommended platform
366- Or select: amazon / shopify / ebay / etsy / taobao / jd / pinduoduo
367- Custom: specify requirements
368
369**Question 4: Scene Type**
370- Use strategy's recommended scene
371- Or select: studio / lifestyle / contextual / exploded / comparison / infographic
372
373**After response**:
374- Single strategy → copy to `outline.md` with confirmed settings
375- Combination → merge specified images
376- Update `outline.md` frontmatter with final settings
377
378### Step 5: Generate Images
379
380With confirmed outline + style + scene + platform:
381
382**Visual Consistency — Reference Image Chain**:
383
3841. **Check for user-provided reference images** (`--ref` option)
385 - If provided: Use as primary style reference
386 - If not provided: Use internal reference chain (see below)
387
3882. **Internal Reference Chain** (when no user ref provided):
389 - **Generate image 1 (hero) FIRST** — without `--ref`
390 - **Use image 1 as `--ref` for ALL remaining images** (2, 3, ..., N)
391
392**For each image**:
3931. Save prompt to `prompts/NN-{type}-[slug].md`
394 - **Backup rule**: If exists, rename to `prompts/NN-{type}-[slug]-backup-YYYYMMDD-HHMMSS.md`
395 - Include reference image paths in prompt
3962. Generate image:
397 - **With user ref**: `--ref <user-reference.png>` for all images
398 - **Image 1 (no user ref)**: Generate without `--ref` (establishes visual anchor)
399 - **Images 2+ (no user ref)**: Generate with `--ref <image-01-path>`
400 - **Backup rule**: If image exists, rename with timestamp
4013. Report progress after each generation
402
403**Reference Image Best Practices**:
404
405| Reference Type | Usage | Effect |
406|----------------|-------|--------|
407| Style reference | Brand guideline images | Maintains brand consistency |
408| Competitor reference | Similar product images | Matches category standards |
409| Internal chain (image 1) | First generated image | Ensures series consistency |
410
411**Platform Compliance**:
412- Apply platform-specific requirements automatically
413- Amazon: Pure white background for main image
414- Size adjustments based on platform
415
416**Session Management**:
417Use consistent session ID for all images in the set: `product-{slug}-{timestamp}`
418
419### Step 6: Completion Report
420
421```
422Product Image Set Complete!
423
424Product: [product name]
425Strategy: [A/B/C/Combined]
426Style: [style name]
427Scene: [scene type]
428Platform: [platform] (requirements applied)
429Location: [directory path]
430Images: N total
431
432✓ analysis.md
433✓ outline-strategy-a.md
434✓ outline-strategy-b.md
435✓ outline-strategy-c.md
436✓ outline.md (selected: [strategy])
437
438Files:
439- 01-hero-[slug].png ✓ Main image ([platform] compliant)
440- 02-angle-[slug].png ✓ Angle variation
441- 03-detail-[slug].png ✓ Detail shot
442...
443```
444
445## Image Modification
446
447| Action | Steps |
448|--------|-------|
449| **Edit** | Update prompt file FIRST → Regenerate with same session ID |
450| **Add** | Specify position → Create prompt → Generate → Renumber files |
451| **Delete** | Remove files → Renumber subsequent → Update outline |
452
453## Platform-Specific Guidelines
454
455### Amazon
456- Main image: Pure white background (RGB 255,255,255)
457- Minimum 1000x1000 pixels for zoom feature
458- Product must fill 85%+ of frame
459- No text, logos, or watermarks on main image
460- Additional images: lifestyle, infographic, comparison allowed
461
462### Shopify
463- Recommended 1024x1024 or 4:3 aspect ratio
464- More flexible styling
465- Lifestyle images perform well
466- Consistent style across all product images
467
468### eBay
469- Minimum 500x500 pixels
470- White background preferred but not required
471- Up to 12 free images per listing
472
473## Content Breakdown Principles
474
4751. **Hero Image (Image 1)**: Main product shot, platform-compliant
4762. **Angle Variations**: Show product from multiple perspectives
4773. **Detail Shots**: Highlight quality, features, materials
4784. **Lifestyle/Context**: Product in use, emotional connection
4795. **Infographic**: Features, specs, benefits with callouts
4806. **Comparison**: Before/after, vs alternatives
4817. **Social Proof**: Reviews, testimonials (if applicable)
482
483## References
484
485Detailed templates in `references/` directory:
486
487**Elements**:
488- `elements/scene-guide.md` - Scene types and compositions
489- `elements/lighting.md` - Lighting setups and moods
490- `elements/composition.md` - Framing and composition rules
491
492**Presets**:
493- `presets/<style>.md` - Style definitions and prompts
494
495**Workflows**:
496- `workflows/analysis-framework.md` - Product analysis
497- `workflows/outline-template.md` - Outline templates
498- `workflows/prompt-assembly.md` - Prompt assembly
499
500**Platforms**:
501- `platforms/amazon.md` - Amazon requirements
502- `platforms/shopify.md` - Shopify requirements
503- `platforms/ebay.md` - eBay requirements
504- `platforms/etsy.md` - Etsy requirements
505- `platforms/taobao.md` - Taobao requirements
506- `platforms/jd.md` - JD.com requirements
507- `platforms/pinduoduo.md` - Pinduoduo requirements
508
509**Config**:
510- `config/preferences-schema.md` - EXTEND.md schema
511- `config/watermark-guide.md` - Watermark configuration
512
513## Notes
514
515- Auto-retry once on failure
516- Platform requirements auto-applied
517- Two confirmation points required (Steps 2 & 4)
518- Reference image chain ensures visual consistency
519
520## Extension Support
521
522Custom configurations via EXTEND.md. See **Step 0** for paths.