← Back to Skills Marketplace
howtimeschange

跨境电商图片生成工具

by howtimeschange · GitHub ↗ · v2.6.0 · MIT-0
cross-platform ⚠ suspicious
127
Downloads
1
Stars
0
Active Installs
8
Versions
Install in OpenClaw
/install ecommerce-img-gen
Description
跨境电商图片生成工具。根据产品图生成各平台(Amazon / Shopee / TikTok Shop / Lazada / AliExpress / Temu / SHEIN)主图、详情页长图、生活场景图。内置6种视觉风格路由、6层合规审查(意图/品牌/版权/文化/平台/授权)。支持模型切换:nano-bana...
README (SKILL.md)

ecommerce-img-gen 技能

端到端设计:从产品图 → 6平台合规主图 → 详情页长图。

能力矩阵

能力 说明
7平台主图 Amazon · Shopee · TikTok Shop · Lazada · AliExpress · Temu · SHEIN
6种风格 极简白底 / 生活场景 / 轻奢简约 / 活力色彩 / 手绘插画 / UGC快节奏
6层合规审查 意图过滤 → 品牌合规 → 版权检查 → 文化适配 → 平台规范 → 发布授权
详情页长图 5类场景 × 7平台组合,1:8超长竖版
文化合规 数字/颜色/图案禁忌规则库,覆盖东南亚/日本/欧美/中东
批量生成 多张变体一次生成,自动保存到品牌目录

核心流程(8步)

用户发产品图 + 目标平台/市场
    ↓
Step 1: Vision 分析商品
    → 提取品牌/品类/颜色/材质/特征/适用人群
    ↓
Step 2: 确认平台
    → 用户指定 → 直接用;未指定 → 根据品类/市场推荐
    ↓
Step 3: 风格路由
    → 根据品类自动推荐风格(见 references/styles_and_routing.md)
    ↓
Step 4: 合规审查(L1-L4)
    → L1 意图过滤 → L2 品牌合规 → L3 版权检查(IP黑名单)→ L4 文化适配(数字/颜色替换)
    ↓
Step 5: 生成 Prompt
    → 平台模板 + 品牌上下文 + 风格参数 + 合规修正
    ↓
Step 6: 调用 1xm.ai 生图
    → scripts/generate_image.py(自带10次重试)
    ↓
Step 7: L5-L6 终审
    → 平台规范 + 发布授权确认
    ↓
Step 8: 交付
    → 输出图片 + YAML合规报告

合规审查(自动)

L3 版权扫描 — 检测以下关键词一律拦截:

高仿/复刻/A货/1:1/fake/replica/counterfeit
Mickey Mouse/Frozen/Spider-Man/Pokemon/Doraemon
Chanel双C/Gucci双G/LV老花/漫威角色/迪士尼角色

L4 文化自动修复

数字4 → 6(中日韩)
数字9 → 7(日本)
数字13 → 12(欧美)
绿色 → 浅绿(日本)
紫色 → 紫罗兰(巴西/泰国)

平台推荐逻辑

童装/儿童 → Shopee / Lazada(东南亚华人)
时尚快消 → SHEIN / TikTok Shop
消费电子 → Amazon(欧美)/ Shopee(东南亚)
测品打法 → Temu + Amazon + TikTok Shop

用法示例

# 基础:单平台主图
帮我做一张 Shopee 主图,产品是巴拉巴拉红色针织开衫

# 多平台主图
生成 Shopee + Lazada + TikTok Shop 的童装主图

# 详情页长图
帮我生成 Shopee 的详情页,1:8比例

# 全套:主图5张 + 详情页
生成全套 Shopee 东南亚市场的图,包括主图5张和详情页

# 指定风格
做一张 TikTok Shop 主图,风格是UGC快节奏带货风

平台规格速查

详见 references/platform_specs.md

平台 尺寸 比例 背景 禁止
Amazon 2000×2000 1:1 纯白 任何文字/LOGO/人物
Shopee 1024×1024 1:1 白/场景 误导性定价
TikTok Shop 1080×1440 3:4 场景 过度PS
Lazada 800×800 1:1 白色 竞品LOGO
AliExpress 800×800 1:1 白/浅灰 主图文字
Temu 1200×1200 1:1 白色 夸大宣传
SHEIN 1200×1600 3:4 白色 过多文字

设计风格路由

详见 references/styles_and_routing.md

品类 推荐风格
消费电子/工具 极简白底
美妆/个护/母婴 生活场景
服饰/时尚 生活场景 / UGC快节奏
儿童/文具/礼品 手绘插画
高客单礼品/珠宝 轻奢简约
促销/快消/配件 活力色彩

输出目录

图片保存到工作区:

~/.openclaw/workspace/image-gen-service/backend/outputs/\x3C品牌名>_\x3C平台>/
variant_1.png
variant_2.png
...
detail_page_1to8.png
compliance_report.yaml

模型切换

支持两种模型,按需选择:

用户模型名 底层 API 速度 支持分辨率 适用场景
nano-banana-2 gemini-3.1-flash-image-preview 快(默认) 1K / 2K 草稿、测图、多图批量
nano-banana-pro gemini-3-pro-image-preview 1K / 2K / 4K 高质量终稿、重点图

分辨率档位(隐式工作流):

  • 1K — Draft 草稿:快速看构图,不追求细节
  • 2K — Iterate 迭代:(默认)质量与速度平衡
  • 4K — Final 终稿:仅 nano-banana-pro 支持,细节丰富

API Key 配置

必须设置环境变量 1XM_API_KEY

export 1XM_API_KEY=your_1xm.ai_api_key_here

不支持硬编码 key,脚本启动时会检查,未设置则报错。

核心脚本

# 默认(nano-banana-2 + 2K)
python3 scripts/generate_image.py "\x3Cprompt>" "\x3Cref_image>" "\x3Coutput.png>"

# 指定模型 + 分辨率
python3 scripts/generate_image.py "\x3Cprompt>" "\x3Cref_image>" "\x3Coutput.png>" \
  --model nano-banana-pro --size 4K

# 快速草稿(1K + nano-banana-2)
python3 scripts/generate_image.py "\x3Cprompt>" "\x3Cref_image>" "\x3Coutput_draft.png>" \
  --model nano-banana-2 --size 1K

# 批量生图(每张可独立指定模型和分辨率)
python3 scripts/generate_image.py --batch '[
  ["\x3Cprompt_main>", "\x3Cref>", "out/main.png", "nano-banana-pro", "4K"],
  ["\x3Cprompt_variant>", "\x3Cref>", "out/v2.png", "nano-banana-2", "2K"]
]'

参考文件索引

references/
├── platform_specs.md        # 7平台完整规格
├── styles_and_routing.md  # 6种风格 + 路由引擎
├── compliance_engine.md   # 6层合规审查
├── cultural_compliance.md  # 文化禁忌规则
├── main_image_workflow.md  # 8步主图工作流
├── detail_page_workflow.md # 详情页5场景模板
└── platforms/
    └── shein.md           # SHEIN平台规格

基于电商设计 Agent 实战经验 × 跨境合规规则库

Usage Guidance
简明建议: - 注意到不一致:技能注册元数据未声明任何必需环境变量,但 SKILL.md 和脚本明确要求设置 1XM_API_KEY。安装前务必确认并不要将高权限或复用的密钥交给该技能。 - 数据外发:脚本会把 prompt 与(参考)图片以 base64 形式发送到 https://1xm.ai。若图片或提示包含敏感/尚未公开的产品信息、品牌机密、商标或模特肖像,上传到第三方会存在隐私/合规风险。仅在信任 1xm.ai 服务且确认上传内容可外发时使用。 - 本地 .env 读取:脚本会回退读取 ~/.openclaw/.../.env 查找密钥。不要在该路径放置其它敏感凭据,或在审计后决定是否允许该行为;最好把仅用于此技能的 API key 放在单独环境或临时变量中。 - 建议操作: 1) 在隔离环境或受控用户账户下先运行并观察网络流量与日志(确认目标域名与请求内容)。 2) 检查并审阅 scripts/generate_image.py 的完整代码(已部分显示),确认没有把本地文件/密钥上传到其他隐藏端点。 3) 若不信任 1xm.ai,可联系技能作者要求改为可配置的 endpoint,或替换为你方信任的生成后端。 4) 不要把通用/高权限凭据(如云提供商主密钥、支付密钥等)放入技能可能读取的 .env 或环境变量中。 总体:功能与行为大体一致(生成并合规检查、调用外部图像 API),但元数据不透明及自动读取本地 .env、外发图像/提示词构成值得在安装前确认的风险点。
Capability Analysis
Type: OpenClaw Skill Name: ecommerce-img-gen Version: 2.6.0 The skill bundle is a legitimate tool designed for generating e-commerce product images and detail pages tailored for various international platforms (Amazon, Shopee, TikTok Shop, etc.). The core logic in `scripts/generate_image.py` facilitates communication with the 1xm.ai API, including robust retry logic and image encoding, while adhering to the stated purpose. The documentation (SKILL.md and reference files) provides detailed, task-specific instructions for the AI agent regarding cultural and platform-specific compliance without any evidence of malicious prompt injection, data exfiltration, or unauthorized system access.
Capability Assessment
Purpose & Capability
技能名与说明描述的是图片生成并包含合规引擎;脚本和说明都使用外部服务 1xm.ai 并需要 API key — 这与功能是一致的。问题在于 registry 元数据声明“Required env vars: none”但 SKILL.md 和 scripts/generate_image.py 明确要求环境变量 1XM_API_KEY(并在脚本中使用)。元数据与实际需求不一致,降低透明度。
Instruction Scope
SKILL.md 指示将图片保存到 ~/.openclaw/workspace/... 并调用 scripts/generate_image.py。脚本会将 prompt 和参考图片(会被 base64 编码)发送到外部 API (https://1xm.ai/v1/chat/completions)。脚本也会回退读取本地文件 ~/.openclaw/workspace/image-gen-service/backend/.env 来寻找密钥。读取此特定 .env 路径和将用户图片/提示发送到外部服务是超出仅“本地生成”的行为,用户应注意数据会被上报到第三方。
Install Mechanism
无安装规范(instruction-only + 附带脚本),没有从不明 URL 下载或在安装时写入可执行文件到系统路径,因此安装风险较低。
Credentials
运行时确实需要 1XM_API_KEY(用于对 1xm.ai 的授权),这是与功能直接相关且合理。但该 requirement 未在 registry 元数据中声明(不透明)。此外脚本会读取 ~/.openclaw/.../.env 以尝试发现密钥(通过查找包含 API_KEY / IMAGE_API_KEY / 1XM 等的行),这意味着如果用户在该位置保存了其它密钥,它们可能被打开读取;虽然脚本只使用找到的 key 来调用 1xm.ai,但自动读取本地 .env 增加了意外访问敏感信息的风险。
Persistence & Privilege
技能没有 always:true,也不修改其它技能或系统设置。它会写入输出目录(~/.openclaw/workspace/.../outputs),这属于其业务范围并非跨技能权限请求。
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ecommerce-img-gen
  3. After installation, invoke the skill by name or use /ecommerce-img-gen
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.6.0
技能标题改为「跨境电商图片生成工具」
v2.5.0
新增模型切换:nano-banana-2(快速,默认)支持 1K/2K;nano-banana-pro(高质量)支持 1K/2K/4K。分辨率档位:Draft(1K) → Iterate(2K) → Final(4K)。更新 SKILL.md 描述和 CLI 用法。
v2.4.0
ecommerce-img-gen v2.4.0 - Updated references/detail_page_workflow.md for improved or clarified detail page workflow. - No changes to user-facing features or API; existing capabilities and workflow remain the same.
v2.3.0
- Updated references/detail_page_workflow.md. - Improved or expanded the details for the 详情页(detail page)流程或模板说明。 - No other files changed. Core functionality and usage remain unchanged.
v2.2.0
ecommerce-img-gen 2.2.0 - Updated detail_page_workflow.md to improve or revise the details of the detail page generation process. - No changes to core features or user interface. - All existing workflows, compliance checks, and platform support remain unchanged.
v2.1.0
- Updated platform specification reference in `references/platform_specs.md` - Removed the separate SHEIN platform specification file (`references/platforms/shein.md`)
v2.0.0
**Major update: Added multi-platform, multi-style routing and enhanced compliance checks.** - Now supports 7 platforms (including SHEIN), with per-platform output specs and templates. - Added 6 distinct visual styles with automatic style routing based on product type. - Introduced 6-layer compliance review covering intent, brand, copyright, cultural, platform, and publishing authorization. - Enhanced cultural compliance: auto-detects and replaces sensitive numbers/colors per market. - Added detailed workflows for main image and detail page generation; outputs compliance reports alongside images. - Expanded and organized reference docs for platform specs, style routing, compliance logic, and platform-specific details.
v1.0.0
image-gen 1.0.0 — Initial release - Launches cross-border ecommerce image generation tool supporting major platforms (Amazon, Shopee, TikTok, Lazada, Temu, AliExpress) - Generates full sets: main images, long detail images, lifestyle images from a single product photo - Automates platform-specific prompts, cultural compliance checks, and image generation workflow - Enables batch processing via CLI, with robust retry logic for stable API calls - Outputs organized by brand, with platform-specific aspect ratio templates and flexible prompt customization
Metadata
Slug ecommerce-img-gen
Version 2.6.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 8
Frequently Asked Questions

What is 跨境电商图片生成工具?

跨境电商图片生成工具。根据产品图生成各平台(Amazon / Shopee / TikTok Shop / Lazada / AliExpress / Temu / SHEIN)主图、详情页长图、生活场景图。内置6种视觉风格路由、6层合规审查(意图/品牌/版权/文化/平台/授权)。支持模型切换:nano-bana... It is an AI Agent Skill for Claude Code / OpenClaw, with 127 downloads so far.

How do I install 跨境电商图片生成工具?

Run "/install ecommerce-img-gen" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 跨境电商图片生成工具 free?

Yes, 跨境电商图片生成工具 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 跨境电商图片生成工具 support?

跨境电商图片生成工具 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 跨境电商图片生成工具?

It is built and maintained by howtimeschange (@howtimeschange); the current version is v2.6.0.

💬 Comments