install
source · Clone the upstream repo
git clone https://github.com/lujiaheng-artpivot/openclaw-ecommerce-ad-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/lujiaheng-artpivot/openclaw-ecommerce-ad-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/product-scene-gen" ~/.claude/skills/lujiaheng-artpivot-openclaw-ecommerce-ad-skills-product-scene-gen && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/lujiaheng-artpivot/openclaw-ecommerce-ad-skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/product-scene-gen" ~/.openclaw/skills/lujiaheng-artpivot-openclaw-ecommerce-ad-skills-product-scene-gen && rm -rf "$T"
manifest:
skills/product-scene-gen/SKILL.mdsource content
商品场景图生成 Skill
使用火山引擎 Seedance Image 模型,将商品图合成到指定场景中,生成符合广告需求的场景图。
使用方法
python3 scripts/generate_scene.py \ --product-image ./product.jpg \ --scene-prompt "耳机放在阳光充足的北欧风书桌上,旁边有咖啡、笔记本和绿植,自然光,浅色调" \ --style minimal \ --ratio 9:16 \ --count 2 \ --output-dir ./scenes
参数说明
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| string | ✅ | 商品图片路径 |
| string | ✅ | 场景描述提示词 |
| string | ✅ | 图像风格:minimal/realistic/cartoon/vintage/futuristic |
| string | 图像比例:1:1/4:3/16:9/9:16/3:4,默认1:1 | |
| number | 生成的场景图数量,默认1 | |
| string | 输出目录,默认 ./scenes | |
| string | 分辨率:1K/2K/4K,默认2K | |
| boolean | 是否添加水印,默认false |
输出文件
生成的场景图会保存为:
- {output_dir}/scene_{index}_{timestamp}.png
- 同时生成 scene_metadata.json 包含生成参数和提示词
事件发布
生成完成后会发布
scene.generated 事件到消息总线。
风格说明
| 风格 | 说明 |
|---|---|
| minimal | 极简风格,干净简洁,适合现代商品 |
| realistic | 写实风格,真实自然,适合大多数商品 |
| cartoon | 卡通风格,活泼可爱,适合儿童商品 |
| vintage | 复古风格,怀旧质感,适合复古类商品 |
| futuristic | 未来风格,科技感,适合数码产品 |
比例推荐
| 平台 | 推荐比例 |
|---|---|
| 抖音/快手短视频 | 9:16 |
| 淘宝主图 | 1:1 |
| 小红书笔记 | 3:4 |
| 视频号 | 16:9 |