{"id":"46e53fa8-98d9-46d1-8d66-3b37d40f65b2","entityType":"agent","slug":"clawhub-dlazyai-clothing-extraction","name":"商品平铺图提取 Clothing Extraction","canonicalUrl":"https://www.xpersona.co/agent/clawhub-dlazyai-clothing-extraction","canonicalPath":"/agent/clawhub-dlazyai-clothing-extraction","generatedAt":"2026-10-10T23:47:12.600Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T20:01:52.627Z","emptyReason":null},"description":"从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。 Skill: 商品平铺图提取 Clothing Extraction Owner: dlazyai Summary: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。 Tags: latest:1.0.20 Version history: v1.0.20 | 2026-10-10T01:47:24.371Z | user 例行版本更新 2026-10-10 v1.0.19 | 2026-10-08T01:40:19.466Z | user 例行版本更新 2026-10-08 v1.0.18 | 2026-10-04T01:40:49.362Z | user 例行版本更新 2026-10-04 v1.0.17 | 2026-10-02T05:14:14.792Z | user 例行版本更新 2026-10-02 v1.0.16 | 2","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s170j1ymymrxasgd00dsk7tckx84cf45:clothing-extraction","sourceUrl":"https://clawhub.ai/dlazyai/clothing-extraction","homepage":"https://clawhub.ai/dlazyai/skills/clothing-extraction","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/dlazyai/clothing-extraction","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/dlazyai/skills/clothing-extraction","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":62,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。 Skill: 商品平铺图提取 Clothing Extraction Owner: dlazyai Summary: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T20:01:52.627Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T20:01:52.627Z","emptyReason":null},"stars":null,"forks":null,"downloads":1272,"packageName":null,"latestVersion":"1.0.20","tractionLabel":"1.3K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T20:01:52.627Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T20:01:52.627Z","lastCrawledAt":"2026-10-10T20:01:52.627Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T20:01:52.627Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.20","createdAt":"2026-10-10T01:47:24.371Z","changelog":"例行版本更新 2026-10-10","fileCount":11,"zipByteSize":25085},{"version":"1.0.19","createdAt":"2026-10-08T01:40:19.466Z","changelog":"例行版本更新 2026-10-08","fileCount":11,"zipByteSize":25104},{"version":"1.0.18","createdAt":"2026-10-04T01:40:49.362Z","changelog":"例行版本更新 2026-10-04","fileCount":11,"zipByteSize":25032},{"version":"1.0.17","createdAt":"2026-10-02T05:14:14.792Z","changelog":"例行版本更新 2026-10-02","fileCount":11,"zipByteSize":25126},{"version":"1.0.16","createdAt":"2026-09-30T01:44:00.594Z","changelog":"例行版本更新 2026-09-30","fileCount":11,"zipByteSize":25084},{"version":"1.0.15","createdAt":"2026-09-28T02:34:12.794Z","changelog":"例行版本更新 2026-09-28","fileCount":11,"zipByteSize":25154},{"version":"1.0.14","createdAt":"2026-09-24T02:34:05.008Z","changelog":"例行版本更新 2026-09-24","fileCount":11,"zipByteSize":25204},{"version":"1.0.13","createdAt":"2026-09-22T01:38:02.287Z","changelog":"例行版本更新 2026-09-22","fileCount":11,"zipByteSize":25299}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170j1ymymrxasgd00dsk7tckx84cf45:clothing-extraction","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T23:47:12.597Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-extraction/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T20:01:52.627Z","emptyReason":null},"readme":"Skill: 商品平铺图提取 Clothing Extraction\n\nOwner: dlazyai\n\nSummary: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n\nTags: latest:1.0.20\n\nVersion history:\n\nv1.0.20 | 2026-10-10T01:47:24.371Z | user\n\n例行版本更新 2026-10-10\n\nv1.0.19 | 2026-10-08T01:40:19.466Z | user\n\n例行版本更新 2026-10-08\n\nv1.0.18 | 2026-10-04T01:40:49.362Z | user\n\n例行版本更新 2026-10-04\n\nv1.0.17 | 2026-10-02T05:14:14.792Z | user\n\n例行版本更新 2026-10-02\n\nv1.0.16 | 2026-09-30T01:44:00.594Z | user\n\n例行版本更新 2026-09-30\n\nv1.0.15 | 2026-09-28T02:34:12.794Z | user\n\n例行版本更新 2026-09-28\n\nv1.0.14 | 2026-09-24T02:34:05.008Z | user\n\n例行版本更新 2026-09-24\n\nv1.0.13 | 2026-09-22T01:38:02.287Z | user\n\n例行版本更新 2026-09-22\n\nv1.0.12 | 2026-09-20T01:47:42.154Z | user\n\n例行版本更新 2026-09-20\n\nv1.0.11 | 2026-09-18T02:08:21.176Z | user\n\n例行版本更新 2026-09-18\n\nv1.0.10 | 2026-09-18T02:07:00.007Z | user\n\n例行版本更新 2026-09-18\n\nv1.0.9 | 2026-09-14T01:35:01.077Z | user\n\n例行版本更新 2026-09-14\n\nv1.0.8 | 2026-09-10T01:32:34.920Z | user\n\n例行版本更新 2026-09-10\n\nv1.0.7 | 2026-09-08T01:38:47.614Z | user\n\n例行版本更新 2026-09-08\n\nv1.0.6 | 2026-09-07T01:47:14.014Z | user\n\n例行版本更新 2026-09-07\n\nv1.0.5 | 2026-09-04T01:40:18.120Z | user\n\n例行版本更新 2026-09-04\n\nv1.0.4 | 2026-09-02T01:35:49.898Z | user\n\n例行版本更新 2026-09-02\n\nv1.0.3 | 2026-08-31T07:02:24.009Z | user\n\n源码仓库迁移至 github.com/dlazy-ai/ecommerce-skills\n\nv1.0.2 | 2026-08-31T05:23:56.546Z | user\n\n源码仓库迁移至 github.com/dlazy-ai/ecommerce-skills\n\nv1.0.1 | 2026-08-29T03:57:30.420Z | user\n\nSync from GitHub\n\nv1.0.0 | 2026-08-18T04:38:22.288Z | user\n\nSync from GitHub\n\nArchive index:\n\nArchive v1.0.20: 11 files, 25085 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (2065b), SKILL.md (10907b), _meta.json (139b)\n\nFile v1.0.20:SKILL.md\n\n---\nname: clothing-extraction\nversion: 1.0.20\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/to-3d/skill.md)、[fabric-on-body](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/fabric-on-body/skill.md)、[flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的干净输入。\n\n---\n\n## 生成效果示例\n\n| 输入：任意图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/source-photo.jpg\" width=\"260\"> |\n| `source-photo.jpg` — 真人街拍图：浅灰针织连衣裙 + 珍珠项链 + 托特包 + 银色高跟鞋，480×640 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024。模特、项链、托特包、高跟鞋与喷泉背景全部清除，只留连衣裙；摊平居中、左右对称，立领罗纹、袖窿形状、腰线接缝与裙长按原图还原，浅灰针织纹理保留。\n\n---\n\n## 1、能力边界\n\n| 模板 | 说明 |\n| --- | --- |\n| 整套穿搭 | 一次识别全身多件，分别输出上装 / 下装 / 鞋 / 包的平铺图 |\n| 上装正面 | 只提取上装，正面摊平 |\n| 下装正面 | 只提取下装，正面摊平 |\n| 自定义 | 自己描述要提取哪一件、以什么形态输出 |\n\n| 能做 | 说明 |\n| --- | --- |\n| 去人去景 | 模特、道具、背景全部移除 |\n| 摊平对称 | 输出正面、居中、左右对称的平铺形态 |\n| 遮挡补全 | 被手臂/包袋挡住的部分按对称与常规版型推断补出 |\n\n**不做**：不改颜色、图案与版型；不凭空添加原图没有的设计元素；不用于抹除他人品牌标识后冒充自有商品。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 商品在画面中占比大 | 占比越大，织法与图案还原得越准 |\n| ✅ 正面或微侧角度 | 纯背面图推不出前襟结构 |\n| ✅ 光线均匀 | 强阴影会被当成图案 |\n| ⚠️ 遮挡区域 | 手臂、包、头发挡住的部分是**推断**出来的，不是还原——关键设计位被挡住时要人工确认 |\n| ❌ 极小占比 / 严重模糊 | 只能得到一个大概的形状 |\n\n---\n\n## 3、提取指令的四段结构\n\n```text\n【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度].\n```\n\n**段2 必须逐项点名**。只写 `remove the background` 时，项链、包、鞋会被留在画面里当成商品的一部分。\n\n**整套穿搭 = 跑多次**，每次段1 指定一件、段2 把其余全部列为要清除的对象。别指望一次输出多张。\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型；提取的本质是「保留一个目标 + 清除其余 + 重构形态」，需要强指令跟随与对象级理解）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-extraction \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-extraction-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-extraction.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]` | 单图输入 |\n| `--size` | `1024x1024`（平铺图标准方图） | 平铺主图通常是方图 |\n| `--quality` | `high` | 织法与图案还原全靠这档 |\n| `--imageFormat` | `png`（想要留白边界更干净）/ `jpeg` | png 便于后续二次抠图 |\n| `--batch` | `2` ~ `3` | 遮挡补全有随机性 |\n| `--save` | `docs/clothing-extraction/output-<件名>.jpg` | 一件一个文件 |\n\n### Command Examples\n\n```bash\n# basic call: 提取上装\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model and render it as a clean e-commerce flat-lay. Output only the top. Remove the model, accessories, bag, shoes and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded. Keep the garment faithful: same colour, texture, neckline and hem. Pure white seamless background, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 整套穿搭 → 循环逐件提取\nSRC=docs/clothing-extraction/source-photo.jpg\n提取() { # $1=件名 $2=目标描述 $3=要清除的其余元素\n  dlazy gpt-image-2 \\\n    --prompt \"Extract one garment from this photo and render it as a clean e-commerce flat-lay. Output only $2. Remove the model, $3 and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded; infer any occluded area from symmetry and standard garment construction. Keep it 100% faithful: same colour, same fabric texture, same neckline and armhole shape, same seams and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat png \\\n    --save \"docs/clothing-extraction/output-$1.png\"\n}\n提取 dress 'the light-grey sleeveless knit mini dress with the mock neckline' 'the pearl necklace, the tote bag, the shoes'\n提取 bag   'the cream-and-tan canvas tote bag with leather handles'         'the dress, the pearl necklace, the shoes'\n提取 shoes 'the pair of silver pointed-toe heels'                            'the dress, the pearl necklace, the tote bag'\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nExtract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay.\n\nOutput only [目标单品：品类 + 颜色 + 关键特征], laid flat and centred, front view,\nsymmetric, fully unoccluded — remove the model, [逐项列出其他元素], and the whole background.\n\nInfer any occluded area from symmetry and standard garment construction.\n\nKeep the garment 100% faithful: same [颜色], same [织法/面料纹理],\nsame [领口与袖型], same [腰线/接缝与下摆长度].\n\nPure white seamless background, even soft studio light, subtle contact shadow.\nNo person, no props, no text.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 配饰没被清掉 | 把漏掉的元素补进段2，并追加 `Nothing but the garment may remain in the frame.` |\n| 输出还带着人体形状 | `The garment must be laid completely flat — no body volume, no invisible mannequin effect.` |\n| 左右不对称 | `Mirror-symmetric layout: both sleeves at the same angle and length, collar centred.` |\n| 图案被重排了 | `Keep the print at its original position and scale relative to the garment body; do not tile or recentre it.` |\n| 颜色偏了 | `Sample the colour from the source photo under neutral light; do not brighten or saturate.` |\n\n---\n\n## 6、执行流程\n\n1. **看清原图**：确认目标单品占比够大、角度可用、关键设计位没被挡住。\n2. **写段1**：唯一目标，描述到能和画面里其他东西区分开。\n3. **写段2**：把画面里**所有**其他元素逐项列出来清除（模特、配饰、包、鞋、道具、背景）。\n4. **写段3+段4**：输出形态 + 保真项。\n5. **整套穿搭**：用第四节的循环，一件一次。\n6. **`--quality high`** 起跑 → `--batch 2~3` 挑图，落盘到 `docs/clothing-extraction/`。\n7. **质检**：是否只剩目标、是否完全摊平、左右是否对称、图案位置与颜色是否准；**被遮挡区域要人工核对**。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 项链/包还在画面里 | 段2 没点名 | 逐项补齐，并追加 `Nothing but the garment may remain.` |\n| 输出还是有身体轮廓 | 模型按 3D 理解了 | 追加 `laid completely flat — no body volume` |\n| 两只袖子不一样长 | 未要求对称 | 追加镜像对称句 |\n| 遮挡部位的设计错了 | 那部分是推断的 | 换一张遮挡更少的原图，或人工修正 |\n| 颜色偏亮 | 模型自动提亮 | 追加取色约束句 |\n| 想一次出整套 | 单次只出一件 | 用第四节循环逐件跑 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.20:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-extraction\",\n  \"version\": \"1.0.20\",\n  \"publishedAt\": 1791596844371\n}\n\nFile v1.0.20:references/model-flags.md\n\n# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。\n\nFile v1.0.20:references/provider-cli.md\n\n<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTTP status code error (500)` |\n| 504 | 异步任务失败 | `=== Generation Failed ===` / `Prompt violates safety policy` |\n\n**给 Agent 的硬性要求**\n\n1. 命中 `insufficient_balance` → 明确告诉用户算力不足，并给出充值入口\n   <https://dlazy.com/dashboard/organization/settings?tab=credits>\n2. 命中 `unauthorized` / 缺 key → 告诉用户去 <https://dlazy.com/dashboard/organization/api-key>\n   取 key，用 `dlazy auth set <key>` 存好再继续。\n3. 用 `gen.mjs` 时，429 与 5xx 已自动重试；仍失败才向用户报错。\n4. **不要**为了「跑通」而偷偷降级参数（尺寸、档位、批量），先问用户。\n\nFile v1.0.20:scripts/lib/tasks.json\n\n{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-video-ad\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"ugc-testimonial\":         { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true }\r\n  }\r\n}\n\nFile v1.0.20:skill-card.md\n\n## Description:\n\nGuides extraction of clean, white-background flat-lay product images from photos of worn or displayed clothing.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nMerchants and content creators use this skill to prepare flat-lay garment images from model photos, street photos, or customer images for product listings and visual workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Source photos, prompts, and generated images are sent to the configured image provider.\n\nMitigation: Review provider terms before sending private or sensitive photos, and use --dry-run to inspect requests first.\n\nRisk: The shared runner supports additional ecommerce workflows beyond clothing extraction.\n\nMitigation: Invoke the documented clothing-extraction task unless other workflows are intentionally needed.\n\nRisk: Hidden garment details are inferred and may not match the source product.\n\nMitigation: Inspect generated details against the original photo and manually confirm or correct obscured areas before use.\n\n## Reference(s):\n\n- [Clothing Extraction on ClawHub](https://clawhub.ai/dlazyai/skills/clothing-extraction)\n- [Provider and CLI reference](references/provider-cli.md)\n- [Image model flags](references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands]\n\n**Output Format:** [Markdown with shell commands and output image paths]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Commands can save generated flat-lay images locally; obscured garment details require visual review.]\n\n## Skill Version(s):\n\n1.0.20 (source: skill frontmatter and server-resolved release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.20:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.19: 11 files, 25104 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (2050b), SKILL.md (10907b), _meta.json (139b)\n\nFile v1.0.19:SKILL.md\n\n---\nname: clothing-extraction\nversion: 1.0.19\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/to-3d/skill.md)、[fabric-on-body](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/fabric-on-body/skill.md)、[flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的干净输入。\n\n---\n\n## 生成效果示例\n\n| 输入：任意图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/source-photo.jpg\" width=\"260\"> |\n| `source-photo.jpg` — 真人街拍图：浅灰针织连衣裙 + 珍珠项链 + 托特包 + 银色高跟鞋，480×640 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024。模特、项链、托特包、高跟鞋与喷泉背景全部清除，只留连衣裙；摊平居中、左右对称，立领罗纹、袖窿形状、腰线接缝与裙长按原图还原，浅灰针织纹理保留。\n\n---\n\n## 1、能力边界\n\n| 模板 | 说明 |\n| --- | --- |\n| 整套穿搭 | 一次识别全身多件，分别输出上装 / 下装 / 鞋 / 包的平铺图 |\n| 上装正面 | 只提取上装，正面摊平 |\n| 下装正面 | 只提取下装，正面摊平 |\n| 自定义 | 自己描述要提取哪一件、以什么形态输出 |\n\n| 能做 | 说明 |\n| --- | --- |\n| 去人去景 | 模特、道具、背景全部移除 |\n| 摊平对称 | 输出正面、居中、左右对称的平铺形态 |\n| 遮挡补全 | 被手臂/包袋挡住的部分按对称与常规版型推断补出 |\n\n**不做**：不改颜色、图案与版型；不凭空添加原图没有的设计元素；不用于抹除他人品牌标识后冒充自有商品。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 商品在画面中占比大 | 占比越大，织法与图案还原得越准 |\n| ✅ 正面或微侧角度 | 纯背面图推不出前襟结构 |\n| ✅ 光线均匀 | 强阴影会被当成图案 |\n| ⚠️ 遮挡区域 | 手臂、包、头发挡住的部分是**推断**出来的，不是还原——关键设计位被挡住时要人工确认 |\n| ❌ 极小占比 / 严重模糊 | 只能得到一个大概的形状 |\n\n---\n\n## 3、提取指令的四段结构\n\n```text\n【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度].\n```\n\n**段2 必须逐项点名**。只写 `remove the background` 时，项链、包、鞋会被留在画面里当成商品的一部分。\n\n**整套穿搭 = 跑多次**，每次段1 指定一件、段2 把其余全部列为要清除的对象。别指望一次输出多张。\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型；提取的本质是「保留一个目标 + 清除其余 + 重构形态」，需要强指令跟随与对象级理解）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-extraction \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-extraction-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-extraction.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]` | 单图输入 |\n| `--size` | `1024x1024`（平铺图标准方图） | 平铺主图通常是方图 |\n| `--quality` | `high` | 织法与图案还原全靠这档 |\n| `--imageFormat` | `png`（想要留白边界更干净）/ `jpeg` | png 便于后续二次抠图 |\n| `--batch` | `2` ~ `3` | 遮挡补全有随机性 |\n| `--save` | `docs/clothing-extraction/output-<件名>.jpg` | 一件一个文件 |\n\n### Command Examples\n\n```bash\n# basic call: 提取上装\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model and render it as a clean e-commerce flat-lay. Output only the top. Remove the model, accessories, bag, shoes and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded. Keep the garment faithful: same colour, texture, neckline and hem. Pure white seamless background, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 整套穿搭 → 循环逐件提取\nSRC=docs/clothing-extraction/source-photo.jpg\n提取() { # $1=件名 $2=目标描述 $3=要清除的其余元素\n  dlazy gpt-image-2 \\\n    --prompt \"Extract one garment from this photo and render it as a clean e-commerce flat-lay. Output only $2. Remove the model, $3 and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded; infer any occluded area from symmetry and standard garment construction. Keep it 100% faithful: same colour, same fabric texture, same neckline and armhole shape, same seams and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat png \\\n    --save \"docs/clothing-extraction/output-$1.png\"\n}\n提取 dress 'the light-grey sleeveless knit mini dress with the mock neckline' 'the pearl necklace, the tote bag, the shoes'\n提取 bag   'the cream-and-tan canvas tote bag with leather handles'         'the dress, the pearl necklace, the shoes'\n提取 shoes 'the pair of silver pointed-toe heels'                            'the dress, the pearl necklace, the tote bag'\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nExtract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay.\n\nOutput only [目标单品：品类 + 颜色 + 关键特征], laid flat and centred, front view,\nsymmetric, fully unoccluded — remove the model, [逐项列出其他元素], and the whole background.\n\nInfer any occluded area from symmetry and standard garment construction.\n\nKeep the garment 100% faithful: same [颜色], same [织法/面料纹理],\nsame [领口与袖型], same [腰线/接缝与下摆长度].\n\nPure white seamless background, even soft studio light, subtle contact shadow.\nNo person, no props, no text.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 配饰没被清掉 | 把漏掉的元素补进段2，并追加 `Nothing but the garment may remain in the frame.` |\n| 输出还带着人体形状 | `The garment must be laid completely flat — no body volume, no invisible mannequin effect.` |\n| 左右不对称 | `Mirror-symmetric layout: both sleeves at the same angle and length, collar centred.` |\n| 图案被重排了 | `Keep the print at its original position and scale relative to the garment body; do not tile or recentre it.` |\n| 颜色偏了 | `Sample the colour from the source photo under neutral light; do not brighten or saturate.` |\n\n---\n\n## 6、执行流程\n\n1. **看清原图**：确认目标单品占比够大、角度可用、关键设计位没被挡住。\n2. **写段1**：唯一目标，描述到能和画面里其他东西区分开。\n3. **写段2**：把画面里**所有**其他元素逐项列出来清除（模特、配饰、包、鞋、道具、背景）。\n4. **写段3+段4**：输出形态 + 保真项。\n5. **整套穿搭**：用第四节的循环，一件一次。\n6. **`--quality high`** 起跑 → `--batch 2~3` 挑图，落盘到 `docs/clothing-extraction/`。\n7. **质检**：是否只剩目标、是否完全摊平、左右是否对称、图案位置与颜色是否准；**被遮挡区域要人工核对**。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 项链/包还在画面里 | 段2 没点名 | 逐项补齐，并追加 `Nothing but the garment may remain.` |\n| 输出还是有身体轮廓 | 模型按 3D 理解了 | 追加 `laid completely flat — no body volume` |\n| 两只袖子不一样长 | 未要求对称 | 追加镜像对称句 |\n| 遮挡部位的设计错了 | 那部分是推断的 | 换一张遮挡更少的原图，或人工修正 |\n| 颜色偏亮 | 模型自动提亮 | 追加取色约束句 |\n| 想一次出整套 | 单次只出一件 | 用第四节循环逐件跑 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.19:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-extraction\",\n  \"version\": \"1.0.19\",\n  \"publishedAt\": 1791423619466\n}\n\nFile v1.0.19:references/model-flags.md\n\n# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。\n\nFile v1.0.19:references/provider-cli.md\n\n<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTTP status code error (500)` |\n| 504 | 异步任务失败 | `=== Generation Failed ===` / `Prompt violates safety policy` |\n\n**给 Agent 的硬性要求**\n\n1. 命中 `insufficient_balance` → 明确告诉用户算力不足，并给出充值入口\n   <https://dlazy.com/dashboard/organization/settings?tab=credits>\n2. 命中 `unauthorized` / 缺 key → 告诉用户去 <https://dlazy.com/dashboard/organization/api-key>\n   取 key，用 `dlazy auth set <key>` 存好再继续。\n3. 用 `gen.mjs` 时，429 与 5xx 已自动重试；仍失败才向用户报错。\n4. **不要**为了「跑通」而偷偷降级参数（尺寸、档位、批量），先问用户。\n\nFile v1.0.19:scripts/lib/tasks.json\n\n{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-video-ad\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"ugc-testimonial\":         { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true }\r\n  }\r\n}\n\nFile v1.0.19:skill-card.md\n\n## Description:\n\nGuides an agent to turn a clothing photo into a clean, white-background product flat-lay image while preserving visible garment details.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nMerchants and content creators use this skill to make isolated, front-facing garment flat-lays from model photos, street photos, or customer photos for product listings and downstream imagery workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Source or model photos and prompts are sent to an external image provider.\n\nMitigation: Use an approved provider and avoid sensitive personal photos unless authorized for that service.\n\nRisk: Stored image-provider credentials may be selected during generation.\n\nMitigation: Check which provider and credentials are configured before submitting photos.\n\nRisk: Obscured garment details may be reconstructed inaccurately.\n\nMitigation: Inspect generated garments against the source, especially details hidden by people or accessories.\n\n## Reference(s):\n\n- [Clothing Extraction release](https://clawhub.ai/dlazyai/skills/clothing-extraction)\n- [Provider CLI and data flow](references/provider-cli.md)\n- [Image model options](references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands]\n\n**Output Format:** [Markdown with prompt templates and shell commands]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Following the guidance produces saved garment image files, typically JPEG or PNG; review reconstructed or obscured details before use.]\n\n## Skill Version(s):\n\n1.0.19 (source: ClawHub release metadata and skill frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.19:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.18: 11 files, 25032 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (1921b), SKILL.md (10907b), _meta.json (139b)\n\nFile v1.0.18:SKILL.md\n\n---\nname: clothing-extraction\nversion: 1.0.18\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/to-3d/skill.md)、[fabric-on-body](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/fabric-on-body/skill.md)、[flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的干净输入。\n\n---\n\n## 生成效果示例\n\n| 输入：任意图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/source-photo.jpg\" width=\"260\"> |\n| `source-photo.jpg` — 真人街拍图：浅灰针织连衣裙 + 珍珠项链 + 托特包 + 银色高跟鞋，480×640 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024。模特、项链、托特包、高跟鞋与喷泉背景全部清除，只留连衣裙；摊平居中、左右对称，立领罗纹、袖窿形状、腰线接缝与裙长按原图还原，浅灰针织纹理保留。\n\n---\n\n## 1、能力边界\n\n| 模板 | 说明 |\n| --- | --- |\n| 整套穿搭 | 一次识别全身多件，分别输出上装 / 下装 / 鞋 / 包的平铺图 |\n| 上装正面 | 只提取上装，正面摊平 |\n| 下装正面 | 只提取下装，正面摊平 |\n| 自定义 | 自己描述要提取哪一件、以什么形态输出 |\n\n| 能做 | 说明 |\n| --- | --- |\n| 去人去景 | 模特、道具、背景全部移除 |\n| 摊平对称 | 输出正面、居中、左右对称的平铺形态 |\n| 遮挡补全 | 被手臂/包袋挡住的部分按对称与常规版型推断补出 |\n\n**不做**：不改颜色、图案与版型；不凭空添加原图没有的设计元素；不用于抹除他人品牌标识后冒充自有商品。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 商品在画面中占比大 | 占比越大，织法与图案还原得越准 |\n| ✅ 正面或微侧角度 | 纯背面图推不出前襟结构 |\n| ✅ 光线均匀 | 强阴影会被当成图案 |\n| ⚠️ 遮挡区域 | 手臂、包、头发挡住的部分是**推断**出来的，不是还原——关键设计位被挡住时要人工确认 |\n| ❌ 极小占比 / 严重模糊 | 只能得到一个大概的形状 |\n\n---\n\n## 3、提取指令的四段结构\n\n```text\n【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度].\n```\n\n**段2 必须逐项点名**。只写 `remove the background` 时，项链、包、鞋会被留在画面里当成商品的一部分。\n\n**整套穿搭 = 跑多次**，每次段1 指定一件、段2 把其余全部列为要清除的对象。别指望一次输出多张。\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型；提取的本质是「保留一个目标 + 清除其余 + 重构形态」，需要强指令跟随与对象级理解）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-extraction \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-extraction-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-extraction.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]` | 单图输入 |\n| `--size` | `1024x1024`（平铺图标准方图） | 平铺主图通常是方图 |\n| `--quality` | `high` | 织法与图案还原全靠这档 |\n| `--imageFormat` | `png`（想要留白边界更干净）/ `jpeg` | png 便于后续二次抠图 |\n| `--batch` | `2` ~ `3` | 遮挡补全有随机性 |\n| `--save` | `docs/clothing-extraction/output-<件名>.jpg` | 一件一个文件 |\n\n### Command Examples\n\n```bash\n# basic call: 提取上装\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model and render it as a clean e-commerce flat-lay. Output only the top. Remove the model, accessories, bag, shoes and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded. Keep the garment faithful: same colour, texture, neckline and hem. Pure white seamless background, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 整套穿搭 → 循环逐件提取\nSRC=docs/clothing-extraction/source-photo.jpg\n提取() { # $1=件名 $2=目标描述 $3=要清除的其余元素\n  dlazy gpt-image-2 \\\n    --prompt \"Extract one garment from this photo and render it as a clean e-commerce flat-lay. Output only $2. Remove the model, $3 and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded; infer any occluded area from symmetry and standard garment construction. Keep it 100% faithful: same colour, same fabric texture, same neckline and armhole shape, same seams and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat png \\\n    --save \"docs/clothing-extraction/output-$1.png\"\n}\n提取 dress 'the light-grey sleeveless knit mini dress with the mock neckline' 'the pearl necklace, the tote bag, the shoes'\n提取 bag   'the cream-and-tan canvas tote bag with leather handles'         'the dress, the pearl necklace, the shoes'\n提取 shoes 'the pair of silver pointed-toe heels'                            'the dress, the pearl necklace, the tote bag'\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nExtract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay.\n\nOutput only [目标单品：品类 + 颜色 + 关键特征], laid flat and centred, front view,\nsymmetric, fully unoccluded — remove the model, [逐项列出其他元素], and the whole background.\n\nInfer any occluded area from symmetry and standard garment construction.\n\nKeep the garment 100% faithful: same [颜色], same [织法/面料纹理],\nsame [领口与袖型], same [腰线/接缝与下摆长度].\n\nPure white seamless background, even soft studio light, subtle contact shadow.\nNo person, no props, no text.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 配饰没被清掉 | 把漏掉的元素补进段2，并追加 `Nothing but the garment may remain in the frame.` |\n| 输出还带着人体形状 | `The garment must be laid completely flat — no body volume, no invisible mannequin effect.` |\n| 左右不对称 | `Mirror-symmetric layout: both sleeves at the same angle and length, collar centred.` |\n| 图案被重排了 | `Keep the print at its original position and scale relative to the garment body; do not tile or recentre it.` |\n| 颜色偏了 | `Sample the colour from the source photo under neutral light; do not brighten or saturate.` |\n\n---\n\n## 6、执行流程\n\n1. **看清原图**：确认目标单品占比够大、角度可用、关键设计位没被挡住。\n2. **写段1**：唯一目标，描述到能和画面里其他东西区分开。\n3. **写段2**：把画面里**所有**其他元素逐项列出来清除（模特、配饰、包、鞋、道具、背景）。\n4. **写段3+段4**：输出形态 + 保真项。\n5. **整套穿搭**：用第四节的循环，一件一次。\n6. **`--quality high`** 起跑 → `--batch 2~3` 挑图，落盘到 `docs/clothing-extraction/`。\n7. **质检**：是否只剩目标、是否完全摊平、左右是否对称、图案位置与颜色是否准；**被遮挡区域要人工核对**。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 项链/包还在画面里 | 段2 没点名 | 逐项补齐，并追加 `Nothing but the garment may remain.` |\n| 输出还是有身体轮廓 | 模型按 3D 理解了 | 追加 `laid completely flat — no body volume` |\n| 两只袖子不一样长 | 未要求对称 | 追加镜像对称句 |\n| 遮挡部位的设计错了 | 那部分是推断的 | 换一张遮挡更少的原图，或人工修正 |\n| 颜色偏亮 | 模型自动提亮 | 追加取色约束句 |\n| 想一次出整套 | 单次只出一件 | 用第四节循环逐件跑 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.18:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-extraction\",\n  \"version\": \"1.0.18\",\n  \"publishedAt\": 1791078049362\n}\n\nFile v1.0.18:references/model-flags.md\n\n# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。\n\nFile v1.0.18:references/provider-cli.md\n\n<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTTP status code error (500)` |\n| 504 | 异步任务失败 | `=== Generation Failed ===` / `Prompt violates safety policy` |\n\n**给 Agent 的硬性要求**\n\n1. 命中 `insufficient_balance` → 明确告诉用户算力不足，并给出充值入口\n   <https://dlazy.com/dashboard/organization/settings?tab=credits>\n2. 命中 `unauthorized` / 缺 key → 告诉用户去 <https://dlazy.com/dashboard/organization/api-key>\n   取 key，用 `dlazy auth set <key>` 存好再继续。\n3. 用 `gen.mjs` 时，429 与 5xx 已自动重试；仍失败才向用户报错。\n4. **不要**为了「跑通」而偷偷降级参数（尺寸、档位、批量），先问用户。\n\nFile v1.0.18:scripts/lib/tasks.json\n\n{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-video-ad\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"ugc-testimonial\":         { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true }\r\n  }\r\n}\n\nFile v1.0.18:skill-card.md\n\n## Description:\n\nTurns photos of worn clothing into clean, white-background product flat-lay images.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nE-commerce creators and product teams use the skill to make single-item flat-lay product images from model photos, street photos, or customer photos.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Source photos and prompts are sent to the selected cloud image provider.\n\nMitigation: Send only images and prompts you are comfortable sharing with dLazy or the configured provider.\n\nRisk: Covered or hidden garment details are inferred and may be inaccurate.\n\nMitigation: Review generated details against source images and manually check or correct occluded areas.\n\nRisk: Edited product images could misrepresent another brand's products.\n\nMitigation: Do not remove another brand's identity to present its products as your own.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/dlazyai/skills/clothing-extraction)\n- [Provider and CLI reference](artifact/references/provider-cli.md)\n- [Image model options](artifact/references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Shell commands, Image files]\n\n**Output Format:** [Markdown guidance and shell commands; generated JPEG or PNG flat-lay images]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Generates one selected item per image; covered details are inferred.]\n\n## Skill Version(s):\n\n1.0.18 (source: skill frontmatter and server-resolved release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.18:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.17: 11 files, 25126 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (2038b), SKILL.md (10907b), _meta.json (139b)\n\nFile v1.0.17:SKILL.md\n\n---\nname: clothing-extraction\nversion: 1.0.17\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/to-3d/skill.md)、[fabric-on-body](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/fabric-on-body/skill.md)、[flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的干净输入。\n\n---\n\n## 生成效果示例\n\n| 输入：任意图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/source-photo.jpg\" width=\"260\"> |\n| `source-photo.jpg` — 真人街拍图：浅灰针织连衣裙 + 珍珠项链 + 托特包 + 银色高跟鞋，480×640 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024。模特、项链、托特包、高跟鞋与喷泉背景全部清除，只留连衣裙；摊平居中、左右对称，立领罗纹、袖窿形状、腰线接缝与裙长按原图还原，浅灰针织纹理保留。\n\n---\n\n## 1、能力边界\n\n| 模板 | 说明 |\n| --- | --- |\n| 整套穿搭 | 一次识别全身多件，分别输出上装 / 下装 / 鞋 / 包的平铺图 |\n| 上装正面 | 只提取上装，正面摊平 |\n| 下装正面 | 只提取下装，正面摊平 |\n| 自定义 | 自己描述要提取哪一件、以什么形态输出 |\n\n| 能做 | 说明 |\n| --- | --- |\n| 去人去景 | 模特、道具、背景全部移除 |\n| 摊平对称 | 输出正面、居中、左右对称的平铺形态 |\n| 遮挡补全 | 被手臂/包袋挡住的部分按对称与常规版型推断补出 |\n\n**不做**：不改颜色、图案与版型；不凭空添加原图没有的设计元素；不用于抹除他人品牌标识后冒充自有商品。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 商品在画面中占比大 | 占比越大，织法与图案还原得越准 |\n| ✅ 正面或微侧角度 | 纯背面图推不出前襟结构 |\n| ✅ 光线均匀 | 强阴影会被当成图案 |\n| ⚠️ 遮挡区域 | 手臂、包、头发挡住的部分是**推断**出来的，不是还原——关键设计位被挡住时要人工确认 |\n| ❌ 极小占比 / 严重模糊 | 只能得到一个大概的形状 |\n\n---\n\n## 3、提取指令的四段结构\n\n```text\n【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度].\n```\n\n**段2 必须逐项点名**。只写 `remove the background` 时，项链、包、鞋会被留在画面里当成商品的一部分。\n\n**整套穿搭 = 跑多次**，每次段1 指定一件、段2 把其余全部列为要清除的对象。别指望一次输出多张。\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型；提取的本质是「保留一个目标 + 清除其余 + 重构形态」，需要强指令跟随与对象级理解）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-extraction \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-extraction-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-extraction.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]` | 单图输入 |\n| `--size` | `1024x1024`（平铺图标准方图） | 平铺主图通常是方图 |\n| `--quality` | `high` | 织法与图案还原全靠这档 |\n| `--imageFormat` | `png`（想要留白边界更干净）/ `jpeg` | png 便于后续二次抠图 |\n| `--batch` | `2` ~ `3` | 遮挡补全有随机性 |\n| `--save` | `docs/clothing-extraction/output-<件名>.jpg` | 一件一个文件 |\n\n### Command Examples\n\n```bash\n# basic call: 提取上装\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model and render it as a clean e-commerce flat-lay. Output only the top. Remove the model, accessories, bag, shoes and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded. Keep the garment faithful: same colour, texture, neckline and hem. Pure white seamless background, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 整套穿搭 → 循环逐件提取\nSRC=docs/clothing-extraction/source-photo.jpg\n提取() { # $1=件名 $2=目标描述 $3=要清除的其余元素\n  dlazy gpt-image-2 \\\n    --prompt \"Extract one garment from this photo and render it as a clean e-commerce flat-lay. Output only $2. Remove the model, $3 and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded; infer any occluded area from symmetry and standard garment construction. Keep it 100% faithful: same colour, same fabric texture, same neckline and armhole shape, same seams and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat png \\\n    --save \"docs/clothing-extraction/output-$1.png\"\n}\n提取 dress 'the light-grey sleeveless knit mini dress with the mock neckline' 'the pearl necklace, the tote bag, the shoes'\n提取 bag   'the cream-and-tan canvas tote bag with leather handles'         'the dress, the pearl necklace, the shoes'\n提取 shoes 'the pair of silver pointed-toe heels'                            'the dress, the pearl necklace, the tote bag'\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nExtract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay.\n\nOutput only [目标单品：品类 + 颜色 + 关键特征], laid flat and centred, front view,\nsymmetric, fully unoccluded — remove the model, [逐项列出其他元素], and the whole background.\n\nInfer any occluded area from symmetry and standard garment construction.\n\nKeep the garment 100% faithful: same [颜色], same [织法/面料纹理],\nsame [领口与袖型], same [腰线/接缝与下摆长度].\n\nPure white seamless background, even soft studio light, subtle contact shadow.\nNo person, no props, no text.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 配饰没被清掉 | 把漏掉的元素补进段2，并追加 `Nothing but the garment may remain in the frame.` |\n| 输出还带着人体形状 | `The garment must be laid completely flat — no body volume, no invisible mannequin effect.` |\n| 左右不对称 | `Mirror-symmetric layout: both sleeves at the same angle and length, collar centred.` |\n| 图案被重排了 | `Keep the print at its original position and scale relative to the garment body; do not tile or recentre it.` |\n| 颜色偏了 | `Sample the colour from the source photo under neutral light; do not brighten or saturate.` |\n\n---\n\n## 6、执行流程\n\n1. **看清原图**：确认目标单品占比够大、角度可用、关键设计位没被挡住。\n2. **写段1**：唯一目标，描述到能和画面里其他东西区分开。\n3. **写段2**：把画面里**所有**其他元素逐项列出来清除（模特、配饰、包、鞋、道具、背景）。\n4. **写段3+段4**：输出形态 + 保真项。\n5. **整套穿搭**：用第四节的循环，一件一次。\n6. **`--quality high`** 起跑 → `--batch 2~3` 挑图，落盘到 `docs/clothing-extraction/`。\n7. **质检**：是否只剩目标、是否完全摊平、左右是否对称、图案位置与颜色是否准；**被遮挡区域要人工核对**。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 项链/包还在画面里 | 段2 没点名 | 逐项补齐，并追加 `Nothing but the garment may remain.` |\n| 输出还是有身体轮廓 | 模型按 3D 理解了 | 追加 `laid completely flat — no body volume` |\n| 两只袖子不一样长 | 未要求对称 | 追加镜像对称句 |\n| 遮挡部位的设计错了 | 那部分是推断的 | 换一张遮挡更少的原图，或人工修正 |\n| 颜色偏亮 | 模型自动提亮 | 追加取色约束句 |\n| 想一次出整套 | 单次只出一件 | 用第四节循环逐件跑 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.17:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-extraction\",\n  \"version\": \"1.0.17\",\n  \"publishedAt\": 1790918054792\n}\n\nFile v1.0.17:references/model-flags.md\n\n# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。\n\nFile v1.0.17:references/provider-cli.md\n\n<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTTP status code error (500)` |\n| 504 | 异步任务失败 | `=== Generation Failed ===` / `Prompt violates safety policy` |\n\n**给 Agent 的硬性要求**\n\n1. 命中 `insufficient_balance` → 明确告诉用户算力不足，并给出充值入口\n   <https://dlazy.com/dashboard/organization/settings?tab=credits>\n2. 命中 `unauthorized` / 缺 key → 告诉用户去 <https://dlazy.com/dashboard/organization/api-key>\n   取 key，用 `dlazy auth set <key>` 存好再继续。\n3. 用 `gen.mjs` 时，429 与 5xx 已自动重试；仍失败才向用户报错。\n4. **不要**为了「跑通」而偷偷降级参数（尺寸、档位、批量），先问用户。\n\nFile v1.0.17:scripts/lib/tasks.json\n\n{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-video-ad\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"ugc-testimonial\":         { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true }\r\n  }\r\n}\n\nFile v1.0.17:skill-card.md\n\n## Description:\n\nTurns photos of worn clothing into clean, white-background flat-lay product images, one item at a time.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nRetailers and product-image creators use the skill to isolate clothing from model, street-style, or customer photos and make flat-lay images for listings or subsequent image workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Source images and prompts are sent to the selected external image provider.\n\nMitigation: Avoid sensitive, private, or non-consensual photos; use scoped, revocable API keys.\n\nRisk: Customer or competitor photos may carry usage or branding rights restrictions.\n\nMitigation: Confirm rights to use source imagery and do not remove another party's branding to misrepresent a product.\n\nRisk: Hidden garment details are inferred rather than recovered from the photo.\n\nMitigation: Review generated colors, patterns, and occluded details against the original before publishing.\n\n## Reference(s):\n\n- [Clothing Extraction release](https://clawhub.ai/dlazyai/skills/clothing-extraction)\n- [Provider and authentication guide](references/provider-cli.md)\n- [Image model options](references/model-flags.md)\n- [dLazy CLI source](https://github.com/dlazy-ai/cli)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Image files]\n\n**Output Format:** [Markdown guidance and JPEG or PNG flat-lay images]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [One image per item; verify inferred details in occluded areas.]\n\n## Skill Version(s):\n\n1.0.17 (source: skill frontmatter and server-resolved release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.17:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.16: 11 files, 25084 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (1979b), SKILL.md (10907b), _meta.json (139b)\n\nFile v1.0.16:SKILL.md\n\n---\nname: clothing-extraction\nversion: 1.0.16\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/to-3d/skill.md)、[fabric-on-body](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/fabric-on-body/skill.md)、[flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的干净输入。\n\n---\n\n## 生成效果示例\n\n| 输入：任意图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/source-photo.jpg\" width=\"260\"> |\n| `source-photo.jpg` — 真人街拍图：浅灰针织连衣裙 + 珍珠项链 + 托特包 + 银色高跟鞋，480×640 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024。模特、项链、托特包、高跟鞋与喷泉背景全部清除，只留连衣裙；摊平居中、左右对称，立领罗纹、袖窿形状、腰线接缝与裙长按原图还原，浅灰针织纹理保留。\n\n---\n\n## 1、能力边界\n\n| 模板 | 说明 |\n| --- | --- |\n| 整套穿搭 | 一次识别全身多件，分别输出上装 / 下装 / 鞋 / 包的平铺图 |\n| 上装正面 | 只提取上装，正面摊平 |\n| 下装正面 | 只提取下装，正面摊平 |\n| 自定义 | 自己描述要提取哪一件、以什么形态输出 |\n\n| 能做 | 说明 |\n| --- | --- |\n| 去人去景 | 模特、道具、背景全部移除 |\n| 摊平对称 | 输出正面、居中、左右对称的平铺形态 |\n| 遮挡补全 | 被手臂/包袋挡住的部分按对称与常规版型推断补出 |\n\n**不做**：不改颜色、图案与版型；不凭空添加原图没有的设计元素；不用于抹除他人品牌标识后冒充自有商品。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 商品在画面中占比大 | 占比越大，织法与图案还原得越准 |\n| ✅ 正面或微侧角度 | 纯背面图推不出前襟结构 |\n| ✅ 光线均匀 | 强阴影会被当成图案 |\n| ⚠️ 遮挡区域 | 手臂、包、头发挡住的部分是**推断**出来的，不是还原——关键设计位被挡住时要人工确认 |\n| ❌ 极小占比 / 严重模糊 | 只能得到一个大概的形状 |\n\n---\n\n## 3、提取指令的四段结构\n\n```text\n【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度].\n```\n\n**段2 必须逐项点名**。只写 `remove the background` 时，项链、包、鞋会被留在画面里当成商品的一部分。\n\n**整套穿搭 = 跑多次**，每次段1 指定一件、段2 把其余全部列为要清除的对象。别指望一次输出多张。\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型；提取的本质是「保留一个目标 + 清除其余 + 重构形态」，需要强指令跟随与对象级理解）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-extraction \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-extraction-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-extraction.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]` | 单图输入 |\n| `--size` | `1024x1024`（平铺图标准方图） | 平铺主图通常是方图 |\n| `--quality` | `high` | 织法与图案还原全靠这档 |\n| `--imageFormat` | `png`（想要留白边界更干净）/ `jpeg` | png 便于后续二次抠图 |\n| `--batch` | `2` ~ `3` | 遮挡补全有随机性 |\n| `--save` | `docs/clothing-extraction/output-<件名>.jpg` | 一件一个文件 |\n\n### Command Examples\n\n```bash\n# basic call: 提取上装\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model and render it as a clean e-commerce flat-lay. Output only the top. Remove the model, accessories, bag, shoes and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded. Keep the garment faithful: same colour, texture, neckline and hem. Pure white seamless background, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 整套穿搭 → 循环逐件提取\nSRC=docs/clothing-extraction/source-photo.jpg\n提取() { # $1=件名 $2=目标描述 $3=要清除的其余元素\n  dlazy gpt-image-2 \\\n    --prompt \"Extract one garment from this photo and render it as a clean e-commerce flat-lay. Output only $2. Remove the model, $3 and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded; infer any occluded area from symmetry and standard garment construction. Keep it 100% faithful: same colour, same fabric texture, same neckline and armhole shape, same seams and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat png \\\n    --save \"docs/clothing-extraction/output-$1.png\"\n}\n提取 dress 'the light-grey sleeveless knit mini dress with the mock neckline' 'the pearl necklace, the tote bag, the shoes'\n提取 bag   'the cream-and-tan canvas tote bag with leather handles'         'the dress, the pearl necklace, the shoes'\n提取 shoes 'the pair of silver pointed-toe heels'                            'the dress, the pearl necklace, the tote bag'\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nExtract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay.\n\nOutput only [目标单品：品类 + 颜色 + 关键特征], laid flat and centred, front view,\nsymmetric, fully unoccluded — remove the model, [逐项列出其他元素], and the whole background.\n\nInfer any occluded area from symmetry and standard garment construction.\n\nKeep the garment 100% faithful: same [颜色], same [织法/面料纹理],\nsame [领口与袖型], same [腰线/接缝与下摆长度].\n\nPure white seamless background, even soft studio light, subtle contact shadow.\nNo person, no props, no text.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 配饰没被清掉 | 把漏掉的元素补进段2，并追加 `Nothing but the garment may remain in the frame.` |\n| 输出还带着人体形状 | `The garment must be laid completely flat — no body volume, no invisible mannequin effect.` |\n| 左右不对称 | `Mirror-symmetric layout: both sleeves at the same angle and length, collar centred.` |\n| 图案被重排了 | `Keep the print at its original position and scale relative to the garment body; do not tile or recentre it.` |\n| 颜色偏了 | `Sample the colour from the source photo under neutral light; do not brighten or saturate.` |\n\n---\n\n## 6、执行流程\n\n1. **看清原图**：确认目标单品占比够大、角度可用、关键设计位没被挡住。\n2. **写段1**：唯一目标，描述到能和画面里其他东西区分开。\n3. **写段2**：把画面里**所有**其他元素逐项列出来清除（模特、配饰、包、鞋、道具、背景）。\n4. **写段3+段4**：输出形态 + 保真项。\n5. **整套穿搭**：用第四节的循环，一件一次。\n6. **`--quality high`** 起跑 → `--batch 2~3` 挑图，落盘到 `docs/clothing-extraction/`。\n7. **质检**：是否只剩目标、是否完全摊平、左右是否对称、图案位置与颜色是否准；**被遮挡区域要人工核对**。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 项链/包还在画面里 | 段2 没点名 | 逐项补齐，并追加 `Nothing but the garment may remain.` |\n| 输出还是有身体轮廓 | 模型按 3D 理解了 | 追加 `laid completely flat — no body volume` |\n| 两只袖子不一样长 | 未要求对称 | 追加镜像对称句 |\n| 遮挡部位的设计错了 | 那部分是推断的 | 换一张遮挡更少的原图，或人工修正 |\n| 颜色偏亮 | 模型自动提亮 | 追加取色约束句 |\n| 想一次出整套 | 单次只出一件 | 用第四节循环逐件跑 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.16:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-extraction\",\n  \"version\": \"1.0.16\",\n  \"publishedAt\": 1790732640594\n}\n\nFile v1.0.16:references/model-flags.md\n\n# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。\n\nFile v1.0.16:references/provider-cli.md\n\n<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTTP status code error (500)` |\n| 504 | 异步任务失败 | `=== Generation Failed ===` / `Prompt violates safety policy` |\n\n**给 Agent 的硬性要求**\n\n1. 命中 `insufficient_balance` → 明确告诉用户算力不足，并给出充值入口\n   <https://dlazy.com/dashboard/organization/settings?tab=credits>\n2. 命中 `unauthorized` / 缺 key → 告诉用户去 <https://dlazy.com/dashboard/organization/api-key>\n   取 key，用 `dlazy auth set <key>` 存好再继续。\n3. 用 `gen.mjs` 时，429 与 5xx 已自动重试；仍失败才向用户报错。\n4. **不要**为了「跑通」而偷偷降级参数（尺寸、档位、批量），先问用户。\n\nFile v1.0.16:scripts/lib/tasks.json\n\n{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-video-ad\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"ugc-testimonial\":         { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true }\r\n  }\r\n}\n\nFile v1.0.16:skill-card.md\n\n## Description:\n\nExtracts a single garment or accessory from a photo into a clean, white-background product flat-lay image.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nE-commerce sellers and content creators use the skill to turn modeled or lifestyle product photos into isolated flat-lay images for listings or subsequent image workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Photos and prompts sent to an image-generation provider may include sensitive model or buyer images.\n\nMitigation: Use only images you have rights to process and share with the configured provider.\n\nRisk: Generated flat-lays may infer or alter obscured garment details.\n\nMitigation: Review the output against the source, especially occluded design features, before publication.\n\nRisk: Removing branding or repurposing a competitor's photo could misrepresent a product.\n\nMitigation: Do not remove another seller's branding or present their product as your own.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/dlazyai/skills/clothing-extraction)\n- [Provider and CLI guide](references/provider-cli.md)\n- [Image model options](references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [Image files, Shell commands, Guidance]\n\n**Output Format:** [PNG or JPEG flat-lay images with Markdown instructions and CLI examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces one selected item per image; obscured garment details may be inferred.]\n\n## Skill Version(s):\n\n1.0.16 (source: release metadata and skill frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.16:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.15: 11 files, 25154 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (2094b), SKILL.md (10907b), _meta.json (139b)\n\nFile v1.0.15:SKILL.md\n\n---\nname: clothing-extraction\nversion: 1.0.15\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/to-3d/skill.md)、[fabric-on-body](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/fabric-on-body/skill.md)、[flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的干净输入。\n\n---\n\n## 生成效果示例\n\n| 输入：任意图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/source-photo.jpg\" width=\"260\"> |\n| `source-photo.jpg` — 真人街拍图：浅灰针织连衣裙 + 珍珠项链 + 托特包 + 银色高跟鞋，480×640 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024。模特、项链、托特包、高跟鞋与喷泉背景全部清除，只留连衣裙；摊平居中、左右对称，立领罗纹、袖窿形状、腰线接缝与裙长按原图还原，浅灰针织纹理保留。\n\n---\n\n## 1、能力边界\n\n| 模板 | 说明 |\n| --- | --- |\n| 整套穿搭 | 一次识别全身多件，分别输出上装 / 下装 / 鞋 / 包的平铺图 |\n| 上装正面 | 只提取上装，正面摊平 |\n| 下装正面 | 只提取下装，正面摊平 |\n| 自定义 | 自己描述要提取哪一件、以什么形态输出 |\n\n| 能做 | 说明 |\n| --- | --- |\n| 去人去景 | 模特、道具、背景全部移除 |\n| 摊平对称 | 输出正面、居中、左右对称的平铺形态 |\n| 遮挡补全 | 被手臂/包袋挡住的部分按对称与常规版型推断补出 |\n\n**不做**：不改颜色、图案与版型；不凭空添加原图没有的设计元素；不用于抹除他人品牌标识后冒充自有商品。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 商品在画面中占比大 | 占比越大，织法与图案还原得越准 |\n| ✅ 正面或微侧角度 | 纯背面图推不出前襟结构 |\n| ✅ 光线均匀 | 强阴影会被当成图案 |\n| ⚠️ 遮挡区域 | 手臂、包、头发挡住的部分是**推断**出来的，不是还原——关键设计位被挡住时要人工确认 |\n| ❌ 极小占比 / 严重模糊 | 只能得到一个大概的形状 |\n\n---\n\n## 3、提取指令的四段结构\n\n```text\n【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度].\n```\n\n**段2 必须逐项点名**。只写 `remove the background` 时，项链、包、鞋会被留在画面里当成商品的一部分。\n\n**整套穿搭 = 跑多次**，每次段1 指定一件、段2 把其余全部列为要清除的对象。别指望一次输出多张。\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型；提取的本质是「保留一个目标 + 清除其余 + 重构形态」，需要强指令跟随与对象级理解）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-extraction \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-extraction-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-extraction.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]` | 单图输入 |\n| `--size` | `1024x1024`（平铺图标准方图） | 平铺主图通常是方图 |\n| `--quality` | `high` | 织法与图案还原全靠这档 |\n| `--imageFormat` | `png`（想要留白边界更干净）/ `jpeg` | png 便于后续二次抠图 |\n| `--batch` | `2` ~ `3` | 遮挡补全有随机性 |\n| `--save` | `docs/clothing-extraction/output-<件名>.jpg` | 一件一个文件 |\n\n### Command Examples\n\n```bash\n# basic call: 提取上装\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model and render it as a clean e-commerce flat-lay. Output only the top. Remove the model, accessories, bag, shoes and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded. Keep the garment faithful: same colour, texture, neckline and hem. Pure white seamless background, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 整套穿搭 → 循环逐件提取\nSRC=docs/clothing-extraction/source-photo.jpg\n提取() { # $1=件名 $2=目标描述 $3=要清除的其余元素\n  dlazy gpt-image-2 \\\n    --prompt \"Extract one garment from this photo and render it as a clean e-commerce flat-lay. Output only $2. Remove the model, $3 and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded; infer any occluded area from symmetry and standard garment construction. Keep it 100% faithful: same colour, same fabric texture, same neckline and armhole shape, same seams and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat png \\\n    --save \"docs/clothing-extraction/output-$1.png\"\n}\n提取 dress 'the light-grey sleeveless knit mini dress with the mock neckline' 'the pearl necklace, the tote bag, the shoes'\n提取 bag   'the cream-and-tan canvas tote bag with leather handles'         'the dress, the pearl necklace, the shoes'\n提取 shoes 'the pair of silver pointed-toe heels'                            'the dress, the pearl necklace, the tote bag'\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nExtract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay.\n\nOutput only [目标单品：品类 + 颜色 + 关键特征], laid flat and centred, front view,\nsymmetric, fully unoccluded — remove the model, [逐项列出其他元素], and the whole background.\n\nInfer any occluded area from symmetry and standard garment construction.\n\nKeep the garment 100% faithful: same [颜色], same [织法/面料纹理],\nsame [领口与袖型], same [腰线/接缝与下摆长度].\n\nPure white seamless background, even soft studio light, subtle contact shadow.\nNo person, no props, no text.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 配饰没被清掉 | 把漏掉的元素补进段2，并追加 `Nothing but the garment may remain in the frame.` |\n| 输出还带着人体形状 | `The garment must be laid completely flat — no body volume, no invisible mannequin effect.` |\n| 左右不对称 | `Mirror-symmetric layout: both sleeves at the same angle and length, collar centred.` |\n| 图案被重排了 | `Keep the print at its original position and scale relative to the garment body; do not tile or recentre it.` |\n| 颜色偏了 | `Sample the colour from the source photo under neutral light; do not brighten or saturate.` |\n\n---\n\n## 6、执行流程\n\n1. **看清原图**：确认目标单品占比够大、角度可用、关键设计位没被挡住。\n2. **写段1**：唯一目标，描述到能和画面里其他东西区分开。\n3. **写段2**：把画面里**所有**其他元素逐项列出来清除（模特、配饰、包、鞋、道具、背景）。\n4. **写段3+段4**：输出形态 + 保真项。\n5. **整套穿搭**：用第四节的循环，一件一次。\n6. **`--quality high`** 起跑 → `--batch 2~3` 挑图，落盘到 `docs/clothing-extraction/`。\n7. **质检**：是否只剩目标、是否完全摊平、左右是否对称、图案位置与颜色是否准；**被遮挡区域要人工核对**。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 项链/包还在画面里 | 段2 没点名 | 逐项补齐，并追加 `Nothing but the garment may remain.` |\n| 输出还是有身体轮廓 | 模型按 3D 理解了 | 追加 `laid completely flat — no body volume` |\n| 两只袖子不一样长 | 未要求对称 | 追加镜像对称句 |\n| 遮挡部位的设计错了 | 那部分是推断的 | 换一张遮挡更少的原图，或人工修正 |\n| 颜色偏亮 | 模型自动提亮 | 追加取色约束句 |\n| 想一次出整套 | 单次只出一件 | 用第四节循环逐件跑 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.15:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-extraction\",\n  \"version\": \"1.0.15\",\n  \"publishedAt\": 1790562852794\n}\n\nFile v1.0.15:references/model-flags.md\n\n# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。\n\nFile v1.0.15:references/provider-cli.md\n\n<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTTP status code error (500)` |\n| 504 | 异步任务失败 | `=== Generation Failed ===` / `Prompt violates safety policy` |\n\n**给 Agent 的硬性要求**\n\n1. 命中 `insufficient_balance` → 明确告诉用户算力不足，并给出充值入口\n   <https://dlazy.com/dashboard/organization/settings?tab=credits>\n2. 命中 `unauthorized` / 缺 key → 告诉用户去 <https://dlazy.com/dashboard/organization/api-key>\n   取 key，用 `dlazy auth set <key>` 存好再继续。\n3. 用 `gen.mjs` 时，429 与 5xx 已自动重试；仍失败才向用户报错。\n4. **不要**为了「跑通」而偷偷降级参数（尺寸、档位、批量），先问用户。\n\nFile v1.0.15:scripts/lib/tasks.json\n\n{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-video-ad\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"ugc-testimonial\":         { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true }\r\n  }\r\n}\n\nFile v1.0.15:skill-card.md\n\n## Description:\n\nGuides agents in turning clothing photos into clean, white-background flat-lay product images using an image-editing provider.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nE-commerce creators and developers use this skill to extract individual garments from model or street-style photos for product listings or downstream visual workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Source photos and prompts are sent to dLazy or the selected third-party image provider.\n\nMitigation: Use only photos permitted by the provider's data policies; avoid private, regulated, or highly sensitive people photos and prefer local files or trusted URLs.\n\nRisk: Hidden garment details can be guessed incorrectly, causing misleading product images.\n\nMitigation: Check generated details, colors, and patterns against the source; use a less-obscured photo or manually correct uncertain areas.\n\nRisk: Removing another seller's branding can misrepresent product ownership.\n\nMitigation: Do not remove others' brand marks to present their products as your own.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/dlazyai/skills/clothing-extraction)\n- [Provider and authentication guide](references/provider-cli.md)\n- [Image model options](references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands]\n\n**Output Format:** [Markdown instructions and CLI commands for producing JPG or PNG images]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Generates one flat-lay image per item; obscured garment details may be inferred.]\n\n## Skill Version(s):\n\n1.0.15 (source: SKILL.md frontmatter and server release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.15:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.14: 11 files, 25204 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (2284b), SKILL.md (10907b), _meta.json (139b)\n\nFile v1.0.14:SKILL.md\n\n---\nname: clothing-extraction\nversion: 1.0.14\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/to-3d/skill.md)、[fabric-on-body](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/fabric-on-body/skill.md)、[flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的干净输入。\n\n---\n\n## 生成效果示例\n\n| 输入：任意图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/source-photo.jpg\" width=\"260\"> |\n| `source-photo.jpg` — 真人街拍图：浅灰针织连衣裙 + 珍珠项链 + 托特包 + 银色高跟鞋，480×640 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024。模特、项链、托特包、高跟鞋与喷泉背景全部清除，只留连衣裙；摊平居中、左右对称，立领罗纹、袖窿形状、腰线接缝与裙长按原图还原，浅灰针织纹理保留。\n\n---\n\n## 1、能力边界\n\n| 模板 | 说明 |\n| --- | --- |\n| 整套穿搭 | 一次识别全身多件，分别输出上装 / 下装 / 鞋 / 包的平铺图 |\n| 上装正面 | 只提取上装，正面摊平 |\n| 下装正面 | 只提取下装，正面摊平 |\n| 自定义 | 自己描述要提取哪一件、以什么形态输出 |\n\n| 能做 | 说明 |\n| --- | --- |\n| 去人去景 | 模特、道具、背景全部移除 |\n| 摊平对称 | 输出正面、居中、左右对称的平铺形态 |\n| 遮挡补全 | 被手臂/包袋挡住的部分按对称与常规版型推断补出 |\n\n**不做**：不改颜色、图案与版型；不凭空添加原图没有的设计元素；不用于抹除他人品牌标识后冒充自有商品。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 商品在画面中占比大 | 占比越大，织法与图案还原得越准 |\n| ✅ 正面或微侧角度 | 纯背面图推不出前襟结构 |\n| ✅ 光线均匀 | 强阴影会被当成图案 |\n| ⚠️ 遮挡区域 | 手臂、包、头发挡住的部分是**推断**出来的，不是还原——关键设计位被挡住时要人工确认 |\n| ❌ 极小占比 / 严重模糊 | 只能得到一个大概的形状 |\n\n---\n\n## 3、提取指令的四段结构\n\n```text\n【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度].\n```\n\n**段2 必须逐项点名**。只写 `remove the background` 时，项链、包、鞋会被留在画面里当成商品的一部分。\n\n**整套穿搭 = 跑多次**，每次段1 指定一件、段2 把其余全部列为要清除的对象。别指望一次输出多张。\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型；提取的本质是「保留一个目标 + 清除其余 + 重构形态」，需要强指令跟随与对象级理解）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-extraction \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-extraction-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-extraction.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]` | 单图输入 |\n| `--size` | `1024x1024`（平铺图标准方图） | 平铺主图通常是方图 |\n| `--quality` | `high` | 织法与图案还原全靠这档 |\n| `--imageFormat` | `png`（想要留白边界更干净）/ `jpeg` | png 便于后续二次抠图 |\n| `--batch` | `2` ~ `3` | 遮挡补全有随机性 |\n| `--save` | `docs/clothing-extraction/output-<件名>.jpg` | 一件一个文件 |\n\n### Command Examples\n\n```bash\n# basic call: 提取上装\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model and render it as a clean e-commerce flat-lay. Output only the top. Remove the model, accessories, bag, shoes and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded. Keep the garment faithful: same colour, texture, neckline and hem. Pure white seamless background, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 整套穿搭 → 循环逐件提取\nSRC=docs/clothing-extraction/source-photo.jpg\n提取() { # $1=件名 $2=目标描述 $3=要清除的其余元素\n  dlazy gpt-image-2 \\\n    --prompt \"Extract one garment from this photo and render it as a clean e-commerce flat-lay. Output only $2. Remove the model, $3 and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded; infer any occluded area from symmetry and standard garment construction. Keep it 100% faithful: same colour, same fabric texture, same neckline and armhole shape, same seams and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat png \\\n    --save \"docs/clothing-extraction/output-$1.png\"\n}\n提取 dress 'the light-grey sleeveless knit mini dress with the mock neckline' 'the pearl necklace, the tote bag, the shoes'\n提取 bag   'the cream-and-tan canvas tote bag with leather handles'         'the dress, the pearl necklace, the shoes'\n提取 shoes 'the pair of silver pointed-toe heels'                            'the dress, the pearl necklace, the tote bag'\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nExtract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay.\n\nOutput only [目标单品：品类 + 颜色 + 关键特征], laid flat and centred, front view,\nsymmetric, fully unoccluded — remove the model, [逐项列出其他元素], and the whole background.\n\nInfer any occluded area from symmetry and standard garment construction.\n\nKeep the garment 100% faithful: same [颜色], same [织法/面料纹理],\nsame [领口与袖型], same [腰线/接缝与下摆长度].\n\nPure white seamless background, even soft studio light, subtle contact shadow.\nNo person, no props, no text.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 配饰没被清掉 | 把漏掉的元素补进段2，并追加 `Nothing but the garment may remain in the frame.` |\n| 输出还带着人体形状 | `The garment must be laid completely flat — no body volume, no invisible mannequin effect.` |\n| 左右不对称 | `Mirror-symmetric layout: both sleeves at the same angle and length, collar centred.` |\n| 图案被重排了 | `Keep the print at its original position and scale relative to the garment body; do not tile or recentre it.` |\n| 颜色偏了 | `Sample the colour from the source photo under neutral light; do not brighten or saturate.` |\n\n---\n\n## 6、执行流程\n\n1. **看清原图**：确认目标单品占比够大、角度可用、关键设计位没被挡住。\n2. **写段1**：唯一目标，描述到能和画面里其他东西区分开。\n3. **写段2**：把画面里**所有**其他元素逐项列出来清除（模特、配饰、包、鞋、道具、背景）。\n4. **写段3+段4**：输出形态 + 保真项。\n5. **整套穿搭**：用第四节的循环，一件一次。\n6. **`--quality high`** 起跑 → `--batch 2~3` 挑图，落盘到 `docs/clothing-extraction/`。\n7. **质检**：是否只剩目标、是否完全摊平、左右是否对称、图案位置与颜色是否准；**被遮挡区域要人工核对**。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 项链/包还在画面里 | 段2 没点名 | 逐项补齐，并追加 `Nothing but the garment may remain.` |\n| 输出还是有身体轮廓 | 模型按 3D 理解了 | 追加 `laid completely flat — no body volume` |\n| 两只袖子不一样长 | 未要求对称 | 追加镜像对称句 |\n| 遮挡部位的设计错了 | 那部分是推断的 | 换一张遮挡更少的原图，或人工修正 |\n| 颜色偏亮 | 模型自动提亮 | 追加取色约束句 |\n| 想一次出整套 | 单次只出一件 | 用第四节循环逐件跑 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.14:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-extraction\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1790217245008\n}\n\nFile v1.0.14:references/model-flags.md\n\n# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。\n\nFile v1.0.14:references/provider-cli.md\n\n<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTTP status code error (500)` |\n| 504 | 异步任务失败 | `=== Generation Failed ===` / `Prompt violates safety policy` |\n\n**给 Agent 的硬性要求**\n\n1. 命中 `insufficient_balance` → 明确告诉用户算力不足，并给出充值入口\n   <https://dlazy.com/dashboard/organization/settings?tab=credits>\n2. 命中 `unauthorized` / 缺 key → 告诉用户去 <https://dlazy.com/dashboard/organization/api-key>\n   取 key，用 `dlazy auth set <key>` 存好再继续。\n3. 用 `gen.mjs` 时，429 与 5xx 已自动重试；仍失败才向用户报错。\n4. **不要**为了「跑通」而偷偷降级参数（尺寸、档位、批量），先问用户。\n\nFile v1.0.14:scripts/lib/tasks.json\n\n{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-video-ad\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"ugc-testimonial\":         { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true }\r\n  }\r\n}\n\nFile v1.0.14:skill-card.md\n\n## Description:\n\nExtracts clean e-commerce flat-lay clothing images from arbitrary photos, such as model, street-style, buyer-show, or competitor reference images, by keeping the target garment and removing people, props, and backgrounds.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal e-commerce sellers, designers, and content operators use this skill to turn model, street-style, buyer-show, or competitor reference photos into clean white-background flat-lay clothing product images. Developers can use the included CLI guidance to run the workflow with local files or trusted image URLs.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Prompts and clothing images may be sent to the selected cloud provider during generation.\n\nMitigation: Use local input files or trusted image URLs, choose the intended provider deliberately, and run dry-run checks before paid generation when practical.\n\nRisk: Occluded clothing details can be inferred rather than faithfully recovered.\n\nMitigation: Review generated outputs before use, especially when key garment details were blocked in the source image.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/dlazyai/skills/clothing-extraction)\n- [Provider CLI Reference](references/provider-cli.md)\n- [Model Flags Reference](references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance, files]\n\n**Output Format:** [Markdown guidance with prompt templates and shell command examples; generated image files are saved by the commands when executed.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [The documented workflow uses one input image per extraction, 1024x1024 outputs, high quality settings, and optional batch generation for review.]\n\n## Skill Version(s):\n\n1.0.14 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.14:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.13: 11 files, 25299 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (2416b), SKILL.md (10907b), _meta.json (139b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: clothing-extraction\nversion: 1.0.13\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-ski\n\nArchive v1.0.12: 11 files, 25439 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (2833b), SKILL.md (10907b), _meta.json (139b)\n\nArchive v1.0.11: 11 files, 25369 bytes\n\nFiles: examples/brand.yaml (1655b), references/model-flags.md (2144b), references/provider-cli.md (4802b), scripts/brand.mjs (4516b), scripts/gen.mjs (9733b), scripts/lib/miniyaml.mjs (2901b), scripts/lib/providers.mjs (12510b), scripts/lib/tasks.json (3234b), skill-card.md (2384b), SKILL.md (10907b), _meta.json (139b)","readmeExcerpt":"Skill: 商品平铺图提取 Clothing Extraction Owner: dlazyai Summary: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。 Tags: latest:1.0.20 Version history: v1.0.20 | 2026-10-10T01:47:24.371Z | user 例行版本更新 2026-10-10 v1.0.19 | 2026-10-08T01:40:19.466Z | user 例行版本更新 2026-10-08 v1.0.18 | 2026-10-04T01:40:49.362Z | user 例行版本更新 2026-10-04 v1.0.17 | 2026-10-02T05:14:14.792Z | user 例行版本更新 2026-10-02 v1.0.16 | 2","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"dlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg"},{"language":"text","snippet":"【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度]."},{"language":"bash","snippet":"# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-extraction \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-extraction-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-extraction.jpg"},{"language":"bash","snippet":"# basic call: 提取上装\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model and render it as a clean e-commerce flat-lay. Output only the top. Remove the model, accessories, bag, shoes and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded. Keep the garment faithful: same colour, texture, neckline and hem. Pure white seamless background, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 整套穿搭 → 循环逐件提取\nSRC=docs/clothing-extraction/source-photo.jpg\n提取() { # $1=件名 $2=目标描述 $3=要清除的其余元素\n  dlazy gpt-image-2 \\\n    --prompt \"Extract one garment from this photo and render it as a clean e-commerce flat-lay. Output only $2. Remove the model, $3 and the whole background. Laid flat and centred, front view, symmetric, fully unoccluded; infer any occluded area from symmetry and standard garment construction. Keep it 100% faithful: same colour, same fabric texture, same neckline and armhole shape, same seams and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat png \\\n    --save \"docs/clothing-extraction/output-$1.png\"\n}\n提取 dress 'the light-grey sleeveless knit mini dress with the mock neckline' 'the pearl necklace, the tote bag, the shoes'\n提取 bag   'the cream-and-tan canvas tote bag with leather handles'         'the dress, the pearl necklace, the shoes'\n提取 shoes 'the pair of silver pointed-toe heels'                            'the dress, the pearl necklace, the tote bag'\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high"},{"language":"text","snippet":"Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay.\n\nOutput only [目标单品：品类 + 颜色 + 关键特征], laid flat and centred, front view,\nsymmetric, fully unoccluded — remove the model, [逐项列出其他元素], and the whole background.\n\nInfer any occluded area from symmetry and standard garment construction.\n\nKeep the garment 100% faithful: same [颜色], same [织法/面料纹理],\nsame [领口与袖型], same [腰线/接缝与下摆长度].\n\nPure white seamless background, even soft studio light, subtle contact shadow.\nNo person, no props, no text."},{"language":"bash","snippet":"dlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: clothing-extraction\nversion: 1.0.20\ndescription: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。\n---\n\n# clothing-extraction — 从任意图中提取商品平铺图\n\n任意一张图 → **干净的商品平铺图**。这是 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的**逆操作**。\n\n最常见的用途是补素材：手上只有一张真人上身图 / 买家秀 / 竞品截图，但主图位需要一张干净平铺图；或者要把它作为 [to-3d](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/to-3d/skill.md)、[fabric-on-body](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/fabric-on-body/skill.md)、[flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的干净输入。\n\n---\n\n## 生成效果示例\n\n| 输入：任意图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/source-photo.jpg\" width=\"260\"> |\n| `source-photo.jpg` — 真人街拍图：浅灰针织连衣裙 + 珍珠项链 + 托特包 + 银色高跟鞋，480×640 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Extract the garment worn by the model in this photo and render it as a clean e-commerce flat-lay. Output only the light-grey textured sleeveless knit mini dress with the mock neckline, laid flat and centred, front view, symmetric, fully unoccluded — remove the model, the pearl necklace, the tote bag, the shoes, the fountain and the whole background. Keep the garment 100% faithful: same light-grey colour, same knit texture, same neckline and armhole shape, same waist seam and hem length. Pure white seamless background, even soft studio light, subtle contact shadow. No person, no props, no text.' \\\n  --images docs/clothing-extraction/source-photo.jpg \\\n  --size 1024x1024 --quality medium --imageFormat jpeg \\\n  --save docs/clothing-extraction/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-extraction/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024。模特、项链、托特包、高跟鞋与喷泉背景全部清除，只留连衣裙；摊平居中、左右对称，立领罗纹、袖窿形状、腰线接缝与裙长按原图还原，浅灰针织纹理保留。\n\n---\n\n## 1、能力边界\n\n| 模板 | 说明 |\n| --- | --- |\n| 整套穿搭 | 一次识别全身多件，分别输出上装 / 下装 / 鞋 / 包的平铺图 |\n| 上装正面 | 只提取上装，正面摊平 |\n| 下装正面 | 只提取下装，正面摊平 |\n| 自定义 | 自己描述要提取哪一件、以什么形态输出 |\n\n| 能做 | 说明 |\n| --- | --- |\n| 去人去景 | 模特、道具、背景全部移除 |\n| 摊平对称 | 输出正面、居中、左右对称的平铺形态 |\n| 遮挡补全 | 被手臂/包袋挡住的部分按对称与常规版型推断补出 |\n\n**不做**：不改颜色、图案与版型；不凭空添加原图没有的设计元素；不用于抹除他人品牌标识后冒充自有商品。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 商品在画面中占比大 | 占比越大，织法与图案还原得越准 |\n| ✅ 正面或微侧角度 | 纯背面图推不出前襟结构 |\n| ✅ 光线均匀 | 强阴影会被当成图案 |\n| ⚠️ 遮挡区域 | 手臂、包、头发挡住的部分是**推断**出来的，不是还原——关键设计位被挡住时要人工确认 |\n| ❌ 极小占比 / 严重模糊 | 只能得到一个大概的形状 |\n\n---\n\n## 3、提取指令的四段结构\n\n```text\n【段1 · 指定目标】Output only the [唯一要保留的单品，写清品类+颜色+关键特征].\n【段2 · 逐项清除】Remove the model, [列出画面里所有其他元素：配饰/包/鞋/道具/背景].\n【段3 · 输出形态】Laid flat and centred, front view, symmetric, fully unoccluded.\n【段4 · 保真项】Keep the garment 100% faithful: same [颜色], [织法/面料], [领口与袖型], [腰线与下摆长度].\n```\n\n**段2 必须逐项点名**。只写 `remove the background` 时，项链、包、鞋会被留在画面里当成商品的一部分。\n\n**整套穿搭 = 跑多次**，每次段1 指"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-extraction\",\n  \"version\": \"1.0.20\",\n  \"publishedAt\": 1791596844371\n}"},{"path":"references/model-flags.md","content":"# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。"},{"path":"references/provider-cli.md","content":"<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTT"},{"path":"scripts/lib/tasks.json","content":"{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。 Skill: 商品平铺图提取 Clothing Extraction Owner: dlazyai Summary: 从任意图提取干净商品平铺图。真人图 / 街拍图 → 白底平铺商品图。当用户说「提取衣服」「扒图」「转平铺」「抠成商品图」「从买家秀提取」时使用。 Tags: latest:1.0.20 Version history: v1.0.20 | 2026-10-10T01:47:24.371Z | user 例行版本更新 2026-10-10 v1.0.19 | 2026-10-08T01:40:19.466Z | user 例行版本更新 2026-10-08 v1.0.18 | 2026-10-04T01:40:49.362Z | user 例行版本更新 2026-10-04 v1.0.17 | 2026-10-02T05:14:14.792Z | user 例行版本更新 2026-10-02 v1.0.16 | 2","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":965,"uniquenessScore":50,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T20:01:52.627Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T20:01:52.627Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T23:47:12.600Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}