闲社服务运行正常AI智能体自动化平台
s

图片优化审计

技能标识:skill-listing-image-optimizer

Audit Amazon product listing images for non-square dimensions, auto-pad them to 2000×2000 white background, and push corrected images to live listings via SP-API. Works with any marketplace and seller account.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

图片优化审计

Amazon Listing Image Optimizer

自动修复亚马逊商品列表中非正方形的产品图片 — 下载、填充为2000×2000白色背景,并通过SP-API推回至在线商品列表。无需手动操作卖家中心。



存在原因

亚马逊会对非正方形图片(宽高比 != 1:1)的商品列表进行处罚。常见违规情况:

  • - 横向16:9或4:3的产品照片
  • 纵向主图
  • 低分辨率小图

此技能可自动检测、修复并重新上传。



设置

1. 安装依赖

bash pip3 install Pillow npm install amazon-sp-api

2. 创建SP-API凭证文件

json { lwaClientId: amzn1.application-oa2-client.YOURCLIENTID, lwaClientSecret: YOURCLIENTSECRET, refreshToken: Atzr|YOURREFRESHTOKEN, region: eu, marketplace: YOURMARKETPLACEID, sellerId: YOURSELLERID }

设置环境变量 AMAZONSPAPIPATH 指向该文件(默认值:./amazon-sp-api.json)。



脚本

audit.js — 检测非正方形图片

bash node scripts/audit.js --sku MY-SKU # 审核单个SKU node scripts/audit.js --all # 审核所有FBA SKU node scripts/audit.js --all --out report.json # 保存报告

输出:不符合规范的图片槽位列表及其尺寸。

padtosquare.py — 本地修复图片

bash

在audit.js将原始图片下载到./image_fix/后执行

python3 scripts/padtosquare.py ./image_fix/

将所有 orig.jpg 文件填充为2000×2000白色背景,输出 fixed.jpg。

push_images.js — 将修复后的图片上传至亚马逊

bash node scripts/pushimages.js --dir ./imagefix/ --sku MY-SKU --slots PT03,PT05

在公共端口启动本地HTTP服务器,将图片URL提交至SP-API,15分钟后(亚马逊爬取时间)自动关闭服务器。

fix_title.js — 修改商品标题

bash node scripts/fix_title.js --sku MY-SKU --title 新的优化标题

完整流程(一条命令)

bash node scripts/audit.js --all --out report.json python3 scripts/padtosquare.py ./image_fix/ node scripts/pushimages.js --dir ./imagefix/ --from-report report.json

图片槽位参考

槽位属性描述
MAINmainproductimagelocator主图(必须为白色背景)
PT01–PT08
otherproductimagelocator1 … 8 | 副图 |

注意事项

  • - 亚马逊在收到ACCEPTED响应后15–30分钟内处理图片更新
  • VPS必须拥有可公开访问的IP/端口用于临时HTTP服务器(或使用S3/Cloudflare)
  • PIL在调整大小时使用LANCZOS重采样以获得最佳质量
  • 图片大小控制在10MB以内;目标为2000×2000像素,95% JPEG质量

相关

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 skill-amazon-listing-optimizer-1776292063 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 skill-amazon-listing-optimizer-1776292063 技能

通过命令行安装

skillhub install skill-amazon-listing-optimizer-1776292063

下载

⬇ 下载 skill-listing-image-optimizer v1.0.0(免费)

文件大小: 9.22 KB | 发布时间: 2026-4-16 15:32

v1.0.0 最新 2026-4-16 15:32
Version 1.0.0 — Initial Release

- Automatically audits Amazon product listing images for non-square dimensions.
- Auto-pads images to 2000×2000 pixels with a white background to meet Amazon requirements.
- Uploads corrected images directly to live listings via SP-API (no manual Seller Central steps needed).
- Works with any marketplace and seller account.
- Includes scripts for audit, local image fixing, image upload, and optional title patching.
返回顶部