{"id":"3980ad11-44fd-497c-9ce0-978b3cea2158","entityType":"agent","slug":"clawhub-dlazyai-one-shot","name":"换模特换背景 One Shot","canonicalUrl":"https://www.xpersona.co/agent/clawhub-dlazyai-one-shot","canonicalPath":"/agent/clawhub-dlazyai-one-shot","generatedAt":"2026-10-10T23:46:33.352Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T20:41:24.919Z","emptyReason":null},"description":"已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。 Skill: 换模特换背景 One Shot Owner: dlazyai Summary: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。 Tags: latest:1.0.18 Version history: v1.0.18 | 2026-10-10T01:54:37.370Z | user 例行版本更新 2026-10-10 v1.0.17 | 2026-10-08T01:46:28.489Z | user 例行版本更新 2026-10-08 v1.0.16 | 2026-10-04T01:46:10.655Z | user 例行版本更新 2026-10-04 v1.0.15 | 2026-10-02T05:18:18.503Z | user 例行版本更新 2026-10-02 v1.0.14 | 2026-09-3","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:one-shot","sourceUrl":"https://clawhub.ai/dlazyai/one-shot","homepage":"https://clawhub.ai/dlazyai/skills/one-shot","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/dlazyai/one-shot","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/dlazyai/skills/one-shot","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":62,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。 Skill: 换模特换背景 One Shot Owner: dlazyai Summary: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T20:41:24.919Z","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:41:24.919Z","emptyReason":null},"stars":null,"forks":null,"downloads":1263,"packageName":null,"latestVersion":"1.0.18","tractionLabel":"1.3K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T20:41:24.918Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T20:41:24.919Z","lastCrawledAt":"2026-10-10T20:41:24.918Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T20:41:24.918Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.18","createdAt":"2026-10-10T01:54:37.370Z","changelog":"例行版本更新 2026-10-10","fileCount":11,"zipByteSize":25448},{"version":"1.0.17","createdAt":"2026-10-08T01:46:28.489Z","changelog":"例行版本更新 2026-10-08","fileCount":11,"zipByteSize":25323},{"version":"1.0.16","createdAt":"2026-10-04T01:46:10.655Z","changelog":"例行版本更新 2026-10-04","fileCount":11,"zipByteSize":25356},{"version":"1.0.15","createdAt":"2026-10-02T05:18:18.503Z","changelog":"例行版本更新 2026-10-02","fileCount":11,"zipByteSize":25494},{"version":"1.0.14","createdAt":"2026-09-30T01:50:45.091Z","changelog":"例行版本更新 2026-09-30","fileCount":11,"zipByteSize":25365},{"version":"1.0.13","createdAt":"2026-09-28T02:39:10.466Z","changelog":"例行版本更新 2026-09-28","fileCount":11,"zipByteSize":25376},{"version":"1.0.12","createdAt":"2026-09-24T02:40:57.600Z","changelog":"例行版本更新 2026-09-24","fileCount":11,"zipByteSize":25496},{"version":"1.0.11","createdAt":"2026-09-22T01:43:43.929Z","changelog":"例行版本更新 2026-09-22","fileCount":11,"zipByteSize":25696}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170j1ymymrxasgd00dsk7tckx84cf45:one-shot","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-one-shot/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-one-shot/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-one-shot/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-one-shot/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-one-shot/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-one-shot/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:46:33.348Z"}},"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-one-shot/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-one-shot/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-one-shot/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-one-shot/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:41:24.919Z","emptyReason":null},"readme":"Skill: 换模特换背景 One Shot\n\nOwner: dlazyai\n\nSummary: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n\nTags: latest:1.0.18\n\nVersion history:\n\nv1.0.18 | 2026-10-10T01:54:37.370Z | user\n\n例行版本更新 2026-10-10\n\nv1.0.17 | 2026-10-08T01:46:28.489Z | user\n\n例行版本更新 2026-10-08\n\nv1.0.16 | 2026-10-04T01:46:10.655Z | user\n\n例行版本更新 2026-10-04\n\nv1.0.15 | 2026-10-02T05:18:18.503Z | user\n\n例行版本更新 2026-10-02\n\nv1.0.14 | 2026-09-30T01:50:45.091Z | user\n\n例行版本更新 2026-09-30\n\nv1.0.13 | 2026-09-28T02:39:10.466Z | user\n\n例行版本更新 2026-09-28\n\nv1.0.12 | 2026-09-24T02:40:57.600Z | user\n\n例行版本更新 2026-09-24\n\nv1.0.11 | 2026-09-22T01:43:43.929Z | user\n\n例行版本更新 2026-09-22\n\nv1.0.10 | 2026-09-18T02:14:37.338Z | user\n\n例行版本更新 2026-09-18\n\nv1.0.9 | 2026-09-14T01:47:09.062Z | user\n\n例行版本更新 2026-09-14\n\nv1.0.8 | 2026-09-10T01:37:38.041Z | user\n\n例行版本更新 2026-09-10\n\nv1.0.7 | 2026-09-08T01:44:43.182Z | user\n\n例行版本更新 2026-09-08\n\nv1.0.6 | 2026-09-07T01:53:56.251Z | user\n\n例行版本更新 2026-09-07\n\nv1.0.5 | 2026-09-04T01:45:10.025Z | user\n\n例行版本更新 2026-09-04\n\nv1.0.4 | 2026-09-02T01:41:01.645Z | user\n\n例行版本更新 2026-09-02\n\nv1.0.3 | 2026-08-31T07:07:56.666Z | user\n\n源码仓库迁移至 github.com/dlazy-ai/ecommerce-skills\n\nv1.0.2 | 2026-08-31T05:28:07.096Z | user\n\n源码仓库迁移至 github.com/dlazy-ai/ecommerce-skills\n\nv1.0.1 | 2026-08-29T04:13:11.987Z | user\n\nSync from GitHub\n\nv1.0.0 | 2026-08-18T04:43:57.351Z | user\n\nSync from GitHub\n\nArchive index:\n\nArchive v1.0.18: 11 files, 25448 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 (2222b), SKILL.md (11504b), _meta.json (128b)\n\nFile v1.0.18:SKILL.md\n\n---\nname: one-shot\nversion: 1.0.18\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n---\n\n# one-shot — 同一商品替换模特和背景\n\n拿一张**已经拍好的模特图或人台图**，在**商品完全不动**的前提下换掉人、换掉背景，或两者都换。\n\n和 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的区别：flat-lay 从平铺图**造**一张模特图；本技能是把**已有**的模特图**裂变**成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。\n\n---\n\n## 生成效果示例\n\n| 输入：原模特图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/source-model.jpg\" width=\"280\"> |\n| `source-model.jpg` — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024 |\n\n实际执行的命令（换模特换背景）：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。\n\n---\n\n## 1、能力边界\n\n| 模式 | 说明 |\n| --- | --- |\n| 换模特换背景 | 人和场景全换，只留商品 |\n| 只换背景 | 保留原模特（脸、身材、姿势），换掉环境 |\n| 只换模特 | 保留原场景与构图，换掉人 |\n\n| 附加能力 | 说明 |\n| --- | --- |\n| 指定模特 | 性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU |\n| 参考图 | 决定新的姿势与场景，支持套图 |\n| 参考图相似度 | `50% 相似`（借风格，保留原构图）/ `100% 相似`（严格照抄参考图） |\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---\n\n## 3、三种模式怎么选\n\n| 你的目标 | 选模式 | prompt 要写死的不变量 |\n| --- | --- | --- |\n| 同款衣服卖给欧美市场 | 换模特换背景 | 商品（款式/颜色/图案/版型/褶皱） |\n| 同一套图换季节氛围 | 只换背景 | 商品 + 模特（脸/发型/身材/姿势） |\n| 人台图转真人图 | 只换模特 | 商品 + 场景 + 构图 + 光线 |\n| 一张图裂变成多年龄段版本 | 只换模特 | 商品 + 场景 + 姿势 + 景别 |\n\n**「参考图相似度」的等价写法**\n\n| 档位 | 写进 prompt |\n| --- | --- |\n| 50% 相似 | `Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.` |\n| 100% 相似 | `Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.` |\n\n**「自动修手」的等价写法**：`Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.`\n\n**「智能匹配模特位置」的等价写法**：`Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1, so the garment does not shift or stretch.`\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 one-shot \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/one-shot-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原模特图]`；带参考图时 `[原模特图, 参考图]`；固定模特时再追加 `模特脸图` | 顺序即 prompt 中的 image 1 / 2 / 3 |\n| `--size` | 与原图比例一致（竖版 `1024x1536`，方图 `1024x1024`） | 换人不该改变构图比例 |\n| `--quality` | `medium` 常规；`high` 保面料纹理 | 只换人时纹理容易被抹平 |\n| `--imageFormat` | `jpeg` | 电商上架通用格式 |\n| `--batch` | `3` ~ `4` | 换人随机性大，尤其手部 |\n| `--save` | `docs/one-shot/output-<市场>-<sku>.jpg` | 按投放市场归档 |\n\n### Command Examples\n\n```bash\n# basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536\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\nReplace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark.\n```\n\n**按模式裁剪模板**\n\n| 模式 | 删掉哪句 / 加哪句 |\n| --- | --- |\n| 只换背景 | 删掉 `Replace the person with …`，加 `Keep the model identical — same face, hair, body and pose.` |\n| 只换模特 | 删掉 `Replace the background with …`，加 `Keep the background, props, framing and lighting pixel-identical to image 1.` |\n| 人台图转真人 | 加 `The source shows the garment on a headless mannequin. Replace the mannequin with a real human model of [描述], adding a natural head, neck, arms and hands. Keep the garment fit exactly as the mannequin shows it.` |\n\n---\n\n## 6、执行流程\n\n1. **确认模式**：查第三节表格，明确哪些是不变量。\n2. **校验输入**：商品是否完整无遮挡、是否单人、光线是否均匀。\n3. **写不变量**：先把「保什么」写全（商品的颜色/版型/图案/褶皱），再写「换什么」。\n4. **加位置对齐句 + 修手句**——这两条几乎每次都要，能显著降低返工率。\n5. **有参考图时选相似度**：借氛围用 50% 档写法，严格复刻用 100% 档写法。\n6. **`--dry-run` 估价** → 真跑 → `--batch 3~4` 挑图，落盘到 `docs/one-shot/`。\n7. **质检**：商品是否被改（重点看图案位置和版型）、衣服是否错位、手部、光影是否统一。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 衣服跟着人一起变了 | 不变量写得不够具体 | 逐项写死颜色 / 版型 / 图案位置 / 下摆弧线 |\n| 换人后衣服错位、被拉伸 | 新身体与原商品没对齐 | 加位置对齐句（第三节） |\n| 手指崩坏 | 换人时手部重绘 | 加修手句 + `--batch 4` 挑图 |\n| 只换背景却把人也换了 | 模式句不完整 | 补 `Keep the model identical — same face, hair, body and pose.` |\n| 新背景光线和人对不上 | 未约束光向 | 追加 `Match the new background lighting to the light direction on the model in image 1.` |\n| 面料纹理被抹平 | `--quality medium` | 改 `--quality high`，或换图后接 [material-enhancement](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/material-enhancement/skill.md) |\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\": \"one-shot\",\n  \"version\": \"1.0.18\",\n  \"publishedAt\": 1791597277370\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\nCreates e-commerce photo variants by replacing a model, background, or both while aiming to preserve the pictured product.\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 teams and creators use this skill to make multiple audience- or setting-specific versions of an existing model or mannequin product photo without intentionally changing the product.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Product photos, model photos, face or pose references, and prompts are sent to the chosen cloud generation provider.\n\nMitigation: Choose the provider and credentials deliberately; upload only images you are comfortable sharing with that provider.\n\nRisk: Using identifiable portraits without permission can misrepresent a person or violate their rights.\n\nMitigation: Use licensed or consented images and obtain permission before supplying personal or third-party portraits; do not fabricate endorsements.\n\nRisk: Generated images may alter product details or introduce visual defects despite preservation instructions.\n\nMitigation: Inspect garment color, logos, shape, placement, hands, and lighting against the source before publishing.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/dlazyai/skills/one-shot)\n- [Provider and credential guidance](references/provider-cli.md)\n- [Image model parameters](references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [Images, Shell commands, Guidance]\n\n**Output Format:** [Edited product photos (typically JPEG) with Markdown instructions and commands]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May generate multiple image variants; review garment details, alignment, hands, and lighting before use.]\n\n## Skill Version(s):\n\n1.0.18 (source: release evidence 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.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, 25323 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 (1928b), SKILL.md (11504b), _meta.json (128b)\n\nFile v1.0.17:SKILL.md\n\n---\nname: one-shot\nversion: 1.0.17\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n---\n\n# one-shot — 同一商品替换模特和背景\n\n拿一张**已经拍好的模特图或人台图**，在**商品完全不动**的前提下换掉人、换掉背景，或两者都换。\n\n和 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的区别：flat-lay 从平铺图**造**一张模特图；本技能是把**已有**的模特图**裂变**成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。\n\n---\n\n## 生成效果示例\n\n| 输入：原模特图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/source-model.jpg\" width=\"280\"> |\n| `source-model.jpg` — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024 |\n\n实际执行的命令（换模特换背景）：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。\n\n---\n\n## 1、能力边界\n\n| 模式 | 说明 |\n| --- | --- |\n| 换模特换背景 | 人和场景全换，只留商品 |\n| 只换背景 | 保留原模特（脸、身材、姿势），换掉环境 |\n| 只换模特 | 保留原场景与构图，换掉人 |\n\n| 附加能力 | 说明 |\n| --- | --- |\n| 指定模特 | 性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU |\n| 参考图 | 决定新的姿势与场景，支持套图 |\n| 参考图相似度 | `50% 相似`（借风格，保留原构图）/ `100% 相似`（严格照抄参考图） |\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---\n\n## 3、三种模式怎么选\n\n| 你的目标 | 选模式 | prompt 要写死的不变量 |\n| --- | --- | --- |\n| 同款衣服卖给欧美市场 | 换模特换背景 | 商品（款式/颜色/图案/版型/褶皱） |\n| 同一套图换季节氛围 | 只换背景 | 商品 + 模特（脸/发型/身材/姿势） |\n| 人台图转真人图 | 只换模特 | 商品 + 场景 + 构图 + 光线 |\n| 一张图裂变成多年龄段版本 | 只换模特 | 商品 + 场景 + 姿势 + 景别 |\n\n**「参考图相似度」的等价写法**\n\n| 档位 | 写进 prompt |\n| --- | --- |\n| 50% 相似 | `Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.` |\n| 100% 相似 | `Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.` |\n\n**「自动修手」的等价写法**：`Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.`\n\n**「智能匹配模特位置」的等价写法**：`Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1, so the garment does not shift or stretch.`\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 one-shot \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/one-shot-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原模特图]`；带参考图时 `[原模特图, 参考图]`；固定模特时再追加 `模特脸图` | 顺序即 prompt 中的 image 1 / 2 / 3 |\n| `--size` | 与原图比例一致（竖版 `1024x1536`，方图 `1024x1024`） | 换人不该改变构图比例 |\n| `--quality` | `medium` 常规；`high` 保面料纹理 | 只换人时纹理容易被抹平 |\n| `--imageFormat` | `jpeg` | 电商上架通用格式 |\n| `--batch` | `3` ~ `4` | 换人随机性大，尤其手部 |\n| `--save` | `docs/one-shot/output-<市场>-<sku>.jpg` | 按投放市场归档 |\n\n### Command Examples\n\n```bash\n# basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536\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\nReplace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark.\n```\n\n**按模式裁剪模板**\n\n| 模式 | 删掉哪句 / 加哪句 |\n| --- | --- |\n| 只换背景 | 删掉 `Replace the person with …`，加 `Keep the model identical — same face, hair, body and pose.` |\n| 只换模特 | 删掉 `Replace the background with …`，加 `Keep the background, props, framing and lighting pixel-identical to image 1.` |\n| 人台图转真人 | 加 `The source shows the garment on a headless mannequin. Replace the mannequin with a real human model of [描述], adding a natural head, neck, arms and hands. Keep the garment fit exactly as the mannequin shows it.` |\n\n---\n\n## 6、执行流程\n\n1. **确认模式**：查第三节表格，明确哪些是不变量。\n2. **校验输入**：商品是否完整无遮挡、是否单人、光线是否均匀。\n3. **写不变量**：先把「保什么」写全（商品的颜色/版型/图案/褶皱），再写「换什么」。\n4. **加位置对齐句 + 修手句**——这两条几乎每次都要，能显著降低返工率。\n5. **有参考图时选相似度**：借氛围用 50% 档写法，严格复刻用 100% 档写法。\n6. **`--dry-run` 估价** → 真跑 → `--batch 3~4` 挑图，落盘到 `docs/one-shot/`。\n7. **质检**：商品是否被改（重点看图案位置和版型）、衣服是否错位、手部、光影是否统一。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 衣服跟着人一起变了 | 不变量写得不够具体 | 逐项写死颜色 / 版型 / 图案位置 / 下摆弧线 |\n| 换人后衣服错位、被拉伸 | 新身体与原商品没对齐 | 加位置对齐句（第三节） |\n| 手指崩坏 | 换人时手部重绘 | 加修手句 + `--batch 4` 挑图 |\n| 只换背景却把人也换了 | 模式句不完整 | 补 `Keep the model identical — same face, hair, body and pose.` |\n| 新背景光线和人对不上 | 未约束光向 | 追加 `Match the new background lighting to the light direction on the model in image 1.` |\n| 面料纹理被抹平 | `--quality medium` | 改 `--quality high`，或换图后接 [material-enhancement](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/material-enhancement/skill.md) |\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\": \"one-shot\",\n  \"version\": \"1.0.17\",\n  \"publishedAt\": 1791423988489\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\nHelps create e-commerce photo variations by changing a model, background, or both while aiming to preserve the pictured product.\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 merchants and creative teams use this skill to make variations of existing apparel model or mannequin photos for different audiences and settings without intentionally changing the product.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Submitted photos and prompts are sent to the selected cloud image provider.\n\nMitigation: Use dry-run first, choose the provider deliberately, and do not submit private local images or prompts you are unwilling to share.\n\nRisk: Demographic targeting or watermark removal may be inappropriate without permission or a compliant purpose.\n\nMitigation: Avoid these uses unless you have consent, rights, and a compliant business purpose.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/dlazyai/skills/one-shot)\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):** [Guidance, Shell commands, Image files]\n\n**Output Format:** [Markdown guidance and shell commands; edited product photos saved as image files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Review generated photos for product fidelity, hands, and lighting before use.]\n\n## Skill Version(s):\n\n1.0.17 (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.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, 25356 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 (2024b), SKILL.md (11504b), _meta.json (128b)\n\nFile v1.0.16:SKILL.md\n\n---\nname: one-shot\nversion: 1.0.16\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n---\n\n# one-shot — 同一商品替换模特和背景\n\n拿一张**已经拍好的模特图或人台图**，在**商品完全不动**的前提下换掉人、换掉背景，或两者都换。\n\n和 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的区别：flat-lay 从平铺图**造**一张模特图；本技能是把**已有**的模特图**裂变**成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。\n\n---\n\n## 生成效果示例\n\n| 输入：原模特图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/source-model.jpg\" width=\"280\"> |\n| `source-model.jpg` — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024 |\n\n实际执行的命令（换模特换背景）：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。\n\n---\n\n## 1、能力边界\n\n| 模式 | 说明 |\n| --- | --- |\n| 换模特换背景 | 人和场景全换，只留商品 |\n| 只换背景 | 保留原模特（脸、身材、姿势），换掉环境 |\n| 只换模特 | 保留原场景与构图，换掉人 |\n\n| 附加能力 | 说明 |\n| --- | --- |\n| 指定模特 | 性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU |\n| 参考图 | 决定新的姿势与场景，支持套图 |\n| 参考图相似度 | `50% 相似`（借风格，保留原构图）/ `100% 相似`（严格照抄参考图） |\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---\n\n## 3、三种模式怎么选\n\n| 你的目标 | 选模式 | prompt 要写死的不变量 |\n| --- | --- | --- |\n| 同款衣服卖给欧美市场 | 换模特换背景 | 商品（款式/颜色/图案/版型/褶皱） |\n| 同一套图换季节氛围 | 只换背景 | 商品 + 模特（脸/发型/身材/姿势） |\n| 人台图转真人图 | 只换模特 | 商品 + 场景 + 构图 + 光线 |\n| 一张图裂变成多年龄段版本 | 只换模特 | 商品 + 场景 + 姿势 + 景别 |\n\n**「参考图相似度」的等价写法**\n\n| 档位 | 写进 prompt |\n| --- | --- |\n| 50% 相似 | `Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.` |\n| 100% 相似 | `Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.` |\n\n**「自动修手」的等价写法**：`Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.`\n\n**「智能匹配模特位置」的等价写法**：`Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1, so the garment does not shift or stretch.`\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 one-shot \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/one-shot-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原模特图]`；带参考图时 `[原模特图, 参考图]`；固定模特时再追加 `模特脸图` | 顺序即 prompt 中的 image 1 / 2 / 3 |\n| `--size` | 与原图比例一致（竖版 `1024x1536`，方图 `1024x1024`） | 换人不该改变构图比例 |\n| `--quality` | `medium` 常规；`high` 保面料纹理 | 只换人时纹理容易被抹平 |\n| `--imageFormat` | `jpeg` | 电商上架通用格式 |\n| `--batch` | `3` ~ `4` | 换人随机性大，尤其手部 |\n| `--save` | `docs/one-shot/output-<市场>-<sku>.jpg` | 按投放市场归档 |\n\n### Command Examples\n\n```bash\n# basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536\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\nReplace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark.\n```\n\n**按模式裁剪模板**\n\n| 模式 | 删掉哪句 / 加哪句 |\n| --- | --- |\n| 只换背景 | 删掉 `Replace the person with …`，加 `Keep the model identical — same face, hair, body and pose.` |\n| 只换模特 | 删掉 `Replace the background with …`，加 `Keep the background, props, framing and lighting pixel-identical to image 1.` |\n| 人台图转真人 | 加 `The source shows the garment on a headless mannequin. Replace the mannequin with a real human model of [描述], adding a natural head, neck, arms and hands. Keep the garment fit exactly as the mannequin shows it.` |\n\n---\n\n## 6、执行流程\n\n1. **确认模式**：查第三节表格，明确哪些是不变量。\n2. **校验输入**：商品是否完整无遮挡、是否单人、光线是否均匀。\n3. **写不变量**：先把「保什么」写全（商品的颜色/版型/图案/褶皱），再写「换什么」。\n4. **加位置对齐句 + 修手句**——这两条几乎每次都要，能显著降低返工率。\n5. **有参考图时选相似度**：借氛围用 50% 档写法，严格复刻用 100% 档写法。\n6. **`--dry-run` 估价** → 真跑 → `--batch 3~4` 挑图，落盘到 `docs/one-shot/`。\n7. **质检**：商品是否被改（重点看图案位置和版型）、衣服是否错位、手部、光影是否统一。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 衣服跟着人一起变了 | 不变量写得不够具体 | 逐项写死颜色 / 版型 / 图案位置 / 下摆弧线 |\n| 换人后衣服错位、被拉伸 | 新身体与原商品没对齐 | 加位置对齐句（第三节） |\n| 手指崩坏 | 换人时手部重绘 | 加修手句 + `--batch 4` 挑图 |\n| 只换背景却把人也换了 | 模式句不完整 | 补 `Keep the model identical — same face, hair, body and pose.` |\n| 新背景光线和人对不上 | 未约束光向 | 追加 `Match the new background lighting to the light direction on the model in image 1.` |\n| 面料纹理被抹平 | `--quality medium` | 改 `--quality high`，或换图后接 [material-enhancement](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/material-enhancement/skill.md) |\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\": \"one-shot\",\n  \"version\": \"1.0.16\",\n  \"publishedAt\": 1791078370655\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\nHelps e-commerce teams create model and background variations from an existing product photo while aiming to preserve the product's appearance.\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 teams and creators use this skill to plan and run edits that replace a model, a background, or both in existing product imagery for different audiences and settings.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Product or model images and prompts are sent to the configured image-generation provider.\n\nMitigation: Use only images you are comfortable sharing with that provider; review the selected provider and API key before execution.\n\nRisk: Generation requests may incur costs or use unintended settings.\n\nMitigation: Run --dry-run to review the request and estimated cost before generating images.\n\nRisk: An example brand profile may carry unsuitable model demographics into new campaigns.\n\nMitigation: Customize the example profile for the intended audience instead of using its demographics as defaults.\n\n## Reference(s):\n\n- [ClawHub release listing](https://clawhub.ai/dlazyai/skills/one-shot)\n- [Model flags](references/model-flags.md)\n- [Provider CLI guide](references/provider-cli.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Configuration instructions]\n\n**Output Format:** [Markdown with shell commands]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Commands can generate and save edited product images locally; inspect outputs for product fidelity.]\n\n## Skill Version(s):\n\n1.0.16 (source: 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.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, 25494 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 (2296b), SKILL.md (11504b), _meta.json (128b)\n\nFile v1.0.15:SKILL.md\n\n---\nname: one-shot\nversion: 1.0.15\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n---\n\n# one-shot — 同一商品替换模特和背景\n\n拿一张**已经拍好的模特图或人台图**，在**商品完全不动**的前提下换掉人、换掉背景，或两者都换。\n\n和 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的区别：flat-lay 从平铺图**造**一张模特图；本技能是把**已有**的模特图**裂变**成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。\n\n---\n\n## 生成效果示例\n\n| 输入：原模特图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/source-model.jpg\" width=\"280\"> |\n| `source-model.jpg` — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024 |\n\n实际执行的命令（换模特换背景）：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。\n\n---\n\n## 1、能力边界\n\n| 模式 | 说明 |\n| --- | --- |\n| 换模特换背景 | 人和场景全换，只留商品 |\n| 只换背景 | 保留原模特（脸、身材、姿势），换掉环境 |\n| 只换模特 | 保留原场景与构图，换掉人 |\n\n| 附加能力 | 说明 |\n| --- | --- |\n| 指定模特 | 性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU |\n| 参考图 | 决定新的姿势与场景，支持套图 |\n| 参考图相似度 | `50% 相似`（借风格，保留原构图）/ `100% 相似`（严格照抄参考图） |\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---\n\n## 3、三种模式怎么选\n\n| 你的目标 | 选模式 | prompt 要写死的不变量 |\n| --- | --- | --- |\n| 同款衣服卖给欧美市场 | 换模特换背景 | 商品（款式/颜色/图案/版型/褶皱） |\n| 同一套图换季节氛围 | 只换背景 | 商品 + 模特（脸/发型/身材/姿势） |\n| 人台图转真人图 | 只换模特 | 商品 + 场景 + 构图 + 光线 |\n| 一张图裂变成多年龄段版本 | 只换模特 | 商品 + 场景 + 姿势 + 景别 |\n\n**「参考图相似度」的等价写法**\n\n| 档位 | 写进 prompt |\n| --- | --- |\n| 50% 相似 | `Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.` |\n| 100% 相似 | `Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.` |\n\n**「自动修手」的等价写法**：`Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.`\n\n**「智能匹配模特位置」的等价写法**：`Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1, so the garment does not shift or stretch.`\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 one-shot \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/one-shot-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原模特图]`；带参考图时 `[原模特图, 参考图]`；固定模特时再追加 `模特脸图` | 顺序即 prompt 中的 image 1 / 2 / 3 |\n| `--size` | 与原图比例一致（竖版 `1024x1536`，方图 `1024x1024`） | 换人不该改变构图比例 |\n| `--quality` | `medium` 常规；`high` 保面料纹理 | 只换人时纹理容易被抹平 |\n| `--imageFormat` | `jpeg` | 电商上架通用格式 |\n| `--batch` | `3` ~ `4` | 换人随机性大，尤其手部 |\n| `--save` | `docs/one-shot/output-<市场>-<sku>.jpg` | 按投放市场归档 |\n\n### Command Examples\n\n```bash\n# basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536\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\nReplace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark.\n```\n\n**按模式裁剪模板**\n\n| 模式 | 删掉哪句 / 加哪句 |\n| --- | --- |\n| 只换背景 | 删掉 `Replace the person with …`，加 `Keep the model identical — same face, hair, body and pose.` |\n| 只换模特 | 删掉 `Replace the background with …`，加 `Keep the background, props, framing and lighting pixel-identical to image 1.` |\n| 人台图转真人 | 加 `The source shows the garment on a headless mannequin. Replace the mannequin with a real human model of [描述], adding a natural head, neck, arms and hands. Keep the garment fit exactly as the mannequin shows it.` |\n\n---\n\n## 6、执行流程\n\n1. **确认模式**：查第三节表格，明确哪些是不变量。\n2. **校验输入**：商品是否完整无遮挡、是否单人、光线是否均匀。\n3. **写不变量**：先把「保什么」写全（商品的颜色/版型/图案/褶皱），再写「换什么」。\n4. **加位置对齐句 + 修手句**——这两条几乎每次都要，能显著降低返工率。\n5. **有参考图时选相似度**：借氛围用 50% 档写法，严格复刻用 100% 档写法。\n6. **`--dry-run` 估价** → 真跑 → `--batch 3~4` 挑图，落盘到 `docs/one-shot/`。\n7. **质检**：商品是否被改（重点看图案位置和版型）、衣服是否错位、手部、光影是否统一。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 衣服跟着人一起变了 | 不变量写得不够具体 | 逐项写死颜色 / 版型 / 图案位置 / 下摆弧线 |\n| 换人后衣服错位、被拉伸 | 新身体与原商品没对齐 | 加位置对齐句（第三节） |\n| 手指崩坏 | 换人时手部重绘 | 加修手句 + `--batch 4` 挑图 |\n| 只换背景却把人也换了 | 模式句不完整 | 补 `Keep the model identical — same face, hair, body and pose.` |\n| 新背景光线和人对不上 | 未约束光向 | 追加 `Match the new background lighting to the light direction on the model in image 1.` |\n| 面料纹理被抹平 | `--quality medium` | 改 `--quality high`，或换图后接 [material-enhancement](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/material-enhancement/skill.md) |\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\": \"one-shot\",\n  \"version\": \"1.0.15\",\n  \"publishedAt\": 1790918298503\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 ecommerce teams in replacing the model, background, or both in an existing product photo while aiming to preserve the product.\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\nEcommerce marketers and designers use this skill to make audience- and setting-specific versions of an existing model or mannequin photo without intentionally changing the clothing or other product details.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Source and reference images, prompts, and related metadata may be sent to a cloud image provider.\n\nMitigation: Use dry-run first and send only images and prompts you are comfortable sharing with the selected provider.\n\nRisk: Use of personal images or generated likenesses without appropriate rights or consent.\n\nMitigation: Use authorized images and obtain consent where needed; do not create deceptive endorsements of real people.\n\nRisk: Generated images may alter garment details, anatomy, or lighting despite preservation instructions.\n\nMitigation: Review each image against the original product and reject outputs with incorrect details or artifacts.\n\nRisk: Saving outputs to an unintended path may overwrite or misplace files.\n\nMitigation: Confirm the destination path before running a generation command.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/dlazyai/skills/one-shot)\n- [Provider setup 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:** [Text with image-editing prompts and CLI examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Running the suggested commands can produce cloud-generated image files; check product fidelity and image rights before use.]\n\n## Skill Version(s):\n\n1.0.15 (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.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, 25365 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 (2039b), SKILL.md (11504b), _meta.json (128b)\n\nFile v1.0.14:SKILL.md\n\n---\nname: one-shot\nversion: 1.0.14\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n---\n\n# one-shot — 同一商品替换模特和背景\n\n拿一张**已经拍好的模特图或人台图**，在**商品完全不动**的前提下换掉人、换掉背景，或两者都换。\n\n和 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的区别：flat-lay 从平铺图**造**一张模特图；本技能是把**已有**的模特图**裂变**成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。\n\n---\n\n## 生成效果示例\n\n| 输入：原模特图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/source-model.jpg\" width=\"280\"> |\n| `source-model.jpg` — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024 |\n\n实际执行的命令（换模特换背景）：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。\n\n---\n\n## 1、能力边界\n\n| 模式 | 说明 |\n| --- | --- |\n| 换模特换背景 | 人和场景全换，只留商品 |\n| 只换背景 | 保留原模特（脸、身材、姿势），换掉环境 |\n| 只换模特 | 保留原场景与构图，换掉人 |\n\n| 附加能力 | 说明 |\n| --- | --- |\n| 指定模特 | 性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU |\n| 参考图 | 决定新的姿势与场景，支持套图 |\n| 参考图相似度 | `50% 相似`（借风格，保留原构图）/ `100% 相似`（严格照抄参考图） |\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---\n\n## 3、三种模式怎么选\n\n| 你的目标 | 选模式 | prompt 要写死的不变量 |\n| --- | --- | --- |\n| 同款衣服卖给欧美市场 | 换模特换背景 | 商品（款式/颜色/图案/版型/褶皱） |\n| 同一套图换季节氛围 | 只换背景 | 商品 + 模特（脸/发型/身材/姿势） |\n| 人台图转真人图 | 只换模特 | 商品 + 场景 + 构图 + 光线 |\n| 一张图裂变成多年龄段版本 | 只换模特 | 商品 + 场景 + 姿势 + 景别 |\n\n**「参考图相似度」的等价写法**\n\n| 档位 | 写进 prompt |\n| --- | --- |\n| 50% 相似 | `Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.` |\n| 100% 相似 | `Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.` |\n\n**「自动修手」的等价写法**：`Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.`\n\n**「智能匹配模特位置」的等价写法**：`Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1, so the garment does not shift or stretch.`\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 one-shot \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/one-shot-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原模特图]`；带参考图时 `[原模特图, 参考图]`；固定模特时再追加 `模特脸图` | 顺序即 prompt 中的 image 1 / 2 / 3 |\n| `--size` | 与原图比例一致（竖版 `1024x1536`，方图 `1024x1024`） | 换人不该改变构图比例 |\n| `--quality` | `medium` 常规；`high` 保面料纹理 | 只换人时纹理容易被抹平 |\n| `--imageFormat` | `jpeg` | 电商上架通用格式 |\n| `--batch` | `3` ~ `4` | 换人随机性大，尤其手部 |\n| `--save` | `docs/one-shot/output-<市场>-<sku>.jpg` | 按投放市场归档 |\n\n### Command Examples\n\n```bash\n# basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536\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\nReplace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark.\n```\n\n**按模式裁剪模板**\n\n| 模式 | 删掉哪句 / 加哪句 |\n| --- | --- |\n| 只换背景 | 删掉 `Replace the person with …`，加 `Keep the model identical — same face, hair, body and pose.` |\n| 只换模特 | 删掉 `Replace the background with …`，加 `Keep the background, props, framing and lighting pixel-identical to image 1.` |\n| 人台图转真人 | 加 `The source shows the garment on a headless mannequin. Replace the mannequin with a real human model of [描述], adding a natural head, neck, arms and hands. Keep the garment fit exactly as the mannequin shows it.` |\n\n---\n\n## 6、执行流程\n\n1. **确认模式**：查第三节表格，明确哪些是不变量。\n2. **校验输入**：商品是否完整无遮挡、是否单人、光线是否均匀。\n3. **写不变量**：先把「保什么」写全（商品的颜色/版型/图案/褶皱），再写「换什么」。\n4. **加位置对齐句 + 修手句**——这两条几乎每次都要，能显著降低返工率。\n5. **有参考图时选相似度**：借氛围用 50% 档写法，严格复刻用 100% 档写法。\n6. **`--dry-run` 估价** → 真跑 → `--batch 3~4` 挑图，落盘到 `docs/one-shot/`。\n7. **质检**：商品是否被改（重点看图案位置和版型）、衣服是否错位、手部、光影是否统一。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 衣服跟着人一起变了 | 不变量写得不够具体 | 逐项写死颜色 / 版型 / 图案位置 / 下摆弧线 |\n| 换人后衣服错位、被拉伸 | 新身体与原商品没对齐 | 加位置对齐句（第三节） |\n| 手指崩坏 | 换人时手部重绘 | 加修手句 + `--batch 4` 挑图 |\n| 只换背景却把人也换了 | 模式句不完整 | 补 `Keep the model identical — same face, hair, body and pose.` |\n| 新背景光线和人对不上 | 未约束光向 | 追加 `Match the new background lighting to the light direction on the model in image 1.` |\n| 面料纹理被抹平 | `--quality medium` | 改 `--quality high`，或换图后接 [material-enhancement](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/material-enhancement/skill.md) |\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\": \"one-shot\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1790733045091\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\nGuides the creation of e-commerce photos with a different model, background, or both from an existing model or mannequin image while aiming to preserve the product.\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 marketers and catalog teams use this skill to create model and setting variants of a photographed garment for different audiences and campaigns.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Selected product or model photos and prompts are sent to the configured image-generation provider.\n\nMitigation: Use --dry-run to check the provider and request; send only intended images and choose an account with acceptable data handling.\n\nRisk: Generated images may change garment details, produce visual defects, or suggest an unauthorized endorsement.\n\nMitigation: Review garment fidelity, anatomy, and lighting before use; avoid impersonating a real person or implying their endorsement.\n\n## Reference(s):\n\n- [ClawHub release](https://clawhub.ai/dlazyai/skills/one-shot)\n- [Image provider and CLI guidance](artifact/references/provider-cli.md)\n- [Image model options](artifact/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]\n\n**Output Format:** [Markdown with image-editing prompts and shell commands]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Running the commands with a configured provider can save generated JPEG catalog images; review results before publishing.]\n\n## Skill Version(s):\n\n1.0.14 (source: skill frontmatter and ClawHub 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, 25376 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 (2057b), SKILL.md (11504b), _meta.json (128b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: one-shot\nversion: 1.0.13\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n---\n\n# one-shot — 同一商品替换模特和背景\n\n拿一张**已经拍好的模特图或人台图**，在**商品完全不动**的前提下换掉人、换掉背景，或两者都换。\n\n和 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的区别：flat-lay 从平铺图**造**一张模特图；本技能是把**已有**的模特图**裂变**成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。\n\n---\n\n## 生成效果示例\n\n| 输入：原模特图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/source-model.jpg\" width=\"280\"> |\n| `source-model.jpg` — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024 |\n\n实际执行的命令（换模特换背景）：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。\n\n---\n\n## 1、能力边界\n\n| 模式 | 说明 |\n| --- | --- |\n| 换模特换背景 | 人和场景全换，只留商品 |\n| 只换背景 | 保留原模特（脸、身材、姿势），换掉环境 |\n| 只换模特 | 保留原场景与构图，换掉人 |\n\n| 附加能力 | 说明 |\n| --- | --- |\n| 指定模特 | 性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU |\n| 参考图 | 决定新的姿势与场景，支持套图 |\n| 参考图相似度 | `50% 相似`（借风格，保留原构图）/ `100% 相似`（严格照抄参考图） |\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---\n\n## 3、三种模式怎么选\n\n| 你的目标 | 选模式 | prompt 要写死的不变量 |\n| --- | --- | --- |\n| 同款衣服卖给欧美市场 | 换模特换背景 | 商品（款式/颜色/图案/版型/褶皱） |\n| 同一套图换季节氛围 | 只换背景 | 商品 + 模特（脸/发型/身材/姿势） |\n| 人台图转真人图 | 只换模特 | 商品 + 场景 + 构图 + 光线 |\n| 一张图裂变成多年龄段版本 | 只换模特 | 商品 + 场景 + 姿势 + 景别 |\n\n**「参考图相似度」的等价写法**\n\n| 档位 | 写进 prompt |\n| --- | --- |\n| 50% 相似 | `Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.` |\n| 100% 相似 | `Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.` |\n\n**「自动修手」的等价写法**：`Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.`\n\n**「智能匹配模特位置」的等价写法**：`Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1, so the garment does not shift or stretch.`\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 one-shot \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/one-shot-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原模特图]`；带参考图时 `[原模特图, 参考图]`；固定模特时再追加 `模特脸图` | 顺序即 prompt 中的 image 1 / 2 / 3 |\n| `--size` | 与原图比例一致（竖版 `1024x1536`，方图 `1024x1024`） | 换人不该改变构图比例 |\n| `--quality` | `medium` 常规；`high` 保面料纹理 | 只换人时纹理容易被抹平 |\n| `--imageFormat` | `jpeg` | 电商上架通用格式 |\n| `--batch` | `3` ~ `4` | 换人随机性大，尤其手部 |\n| `--save` | `docs/one-shot/output-<市场>-<sku>.jpg` | 按投放市场归档 |\n\n### Command Examples\n\n```bash\n# basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536\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\nReplace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark.\n```\n\n**按模式裁剪模板**\n\n| 模式 | 删掉哪句 / 加哪句 |\n| --- | --- |\n| 只换背景 | 删掉 `Replace the person with …`，加 `Keep the model identical — same face, hair, body and pose.` |\n| 只换模特 | 删掉 `Replace the background with …`，加 `Keep the background, props, framing and lighting pixel-identical to image 1.` |\n| 人台图转真人 | 加 `The source shows the garment on a headless mannequin. Replace the mannequin with a real human model of [描述], adding a natural head, neck, arms and hands. Keep the garment fit exactly as the mannequin shows it.` |\n\n---\n\n## 6、执行流程\n\n1. **确认模式**：查第三节表格，明确哪些是不变量。\n2. **校验输入**：商品是否完整无遮挡、是否单人、光线是否均匀。\n3. **写不变量**：先把「保什么」写全（商品的颜色/版型/图案/褶皱），再写「换什么」。\n4. **加位置对齐句 + 修手句**——这两条几乎每次都要，能显著降低返工率。\n5. **有参考图时选相似度**：借氛围用 50% 档写法，严格复刻用 100% 档写法。\n6. **`--dry-run` 估价** → 真跑 → `--batch 3~4` 挑图，落盘到 `docs/one-shot/`。\n7. **质检**：商品是否被改（重点看图案位置和版型）、衣服是否错位、手部、光影是否统一。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 衣服跟着人一起变了 | 不变量写得不够具体 | 逐项写死颜色 / 版型 / 图案位置 / 下摆弧线 |\n| 换人后衣服错位、被拉伸 | 新身体与原商品没对齐 | 加位置对齐句（第三节） |\n| 手指崩坏 | 换人时手部重绘 | 加修手句 + `--batch 4` 挑图 |\n| 只换背景却把人也换了 | 模式句不完整 | 补 `Keep the model identical — same face, hair, body and pose.` |\n| 新背景光线和人对不上 | 未约束光向 | 追加 `Match the new background lighting to the light direction on the model in image 1.` |\n| 面料纹理被抹平 | `--quality medium` | 改 `--quality high`，或换图后接 [material-enhancement](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/material-enhancement/skill.md) |\n| 人台图转真人后脖子/手很怪 | 缺少补全指令 | 用第五节人台图专用句，明确要求补出头颈与手臂 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"one-shot\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1790563150466\n}\n\nFile v1.0.13: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.13: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.13: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.13:skill-card.md\n\n## Description:\n\nCreates e-commerce product-photo variants by changing the model, background, or both while preserving the garment.\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 teams and creators use this skill to make product-photo variants for different models and scenes without intentionally changing the clothing.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Source photos, pose references, and model-face images are sent to third-party image providers.\n\nMitigation: Submit only images you have rights and consent to process, and review provider data-handling terms before upload.\n\nRisk: Generated likenesses could imply an unconsented endorsement or mislead customers.\n\nMitigation: Avoid unconsented real-person likenesses and fake endorsements; review generated images before publication.\n\nRisk: Audience variants based on age, ethnicity, or skin tone may raise advertising compliance concerns.\n\nMitigation: Check applicable local advertising rules before creating or publishing demographic variants.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/dlazyai/skills/one-shot)\n- [Provider and data-flow reference](references/provider-cli.md)\n- [Image-model options](references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Image files]\n\n**Output Format:** [Markdown guidance and generated product images (JPEG, PNG, or WebP)]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports multiple variants; inspect garment fidelity, hands, and lighting before use.]\n\n## Skill Version(s):\n\n1.0.13 (source: release evidence and SKILL.md 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.13: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.12: 11 files, 25496 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 (2325b), SKILL.md (11504b), _meta.json (128b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: one-shot\nversion: 1.0.12\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n---\n\n# one-shot — 同一商品替换模特和背景\n\n拿一张**已经拍好的模特图或人台图**，在**商品完全不动**的前提下换掉人、换掉背景，或两者都换。\n\n和 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的区别：flat-lay 从平铺图**造**一张模特图；本技能是把**已有**的模特图**裂变**成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。\n\n---\n\n## 生成效果示例\n\n| 输入：原模特图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/source-model.jpg\" width=\"280\"> |\n| `source-model.jpg` — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024 |\n\n实际执行的命令（换模特换背景）：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。\n\n---\n\n## 1、能力边界\n\n| 模式 | 说明 |\n| --- | --- |\n| 换模特换背景 | 人和场景全换，只留商品 |\n| 只换背景 | 保留原模特（脸、身材、姿势），换掉环境 |\n| 只换模特 | 保留原场景与构图，换掉人 |\n\n| 附加能力 | 说明 |\n| --- | --- |\n| 指定模特 | 性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU |\n| 参考图 | 决定新的姿势与场景，支持套图 |\n| 参考图相似度 | `50% 相似`（借风格，保留原构图）/ `100% 相似`（严格照抄参考图） |\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---\n\n## 3、三种模式怎么选\n\n| 你的目标 | 选模式 | prompt 要写死的不变量 |\n| --- | --- | --- |\n| 同款衣服卖给欧美市场 | 换模特换背景 | 商品（款式/颜色/图案/版型/褶皱） |\n| 同一套图换季节氛围 | 只换背景 | 商品 + 模特（脸/发型/身材/姿势） |\n| 人台图转真人图 | 只换模特 | 商品 + 场景 + 构图 + 光线 |\n| 一张图裂变成多年龄段版本 | 只换模特 | 商品 + 场景 + 姿势 + 景别 |\n\n**「参考图相似度」的等价写法**\n\n| 档位 | 写进 prompt |\n| --- | --- |\n| 50% 相似 | `Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.` |\n| 100% 相似 | `Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.` |\n\n**「自动修手」的等价写法**：`Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or extra digits.`\n\n**「智能匹配模特位置」的等价写法**：`Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1, so the garment does not shift or stretch.`\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 one-shot \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/one-shot-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原模特图]`；带参考图时 `[原模特图, 参考图]`；固定模特时再追加 `模特脸图` | 顺序即 prompt 中的 image 1 / 2 / 3 |\n| `--size` | 与原图比例一致（竖版 `1024x1536`，方图 `1024x1024`） | 换人不该改变构图比例 |\n| `--quality` | `medium` 常规；`high` 保面料纹理 | 只换人时纹理容易被抹平 |\n| `--imageFormat` | `jpeg` | 电商上架通用格式 |\n| `--batch` | `3` ~ `4` | 换人随机性大，尤其手部 |\n| `--save` | `docs/one-shot/output-<市场>-<sku>.jpg` | 按投放市场归档 |\n\n### Command Examples\n\n```bash\n# basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536\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\nReplace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark.\n```\n\n**按模式裁剪模板**\n\n| 模式 | 删掉哪句 / 加哪句 |\n| --- | --- |\n| 只换背景 | 删掉 `Replace the person with …`，加 `Keep the model identical — same face, hair, body and pose.` |\n| 只换模特 | 删掉 `Replace the background with …`，加 `Keep the background, props, framing and lighting pixel-identical to image 1.` |\n| 人台图转真人 | 加 `The source shows the garment on a headless mannequin. Replace the mannequin with a real human model of [描述], adding a natural head, neck, arms and hands. Keep the garment fit exactly as the mannequin shows it.` |\n\n---\n\n## 6、执行流程\n\n1. **确认模式**：查第三节表格，明确哪些是不变量。\n2. **校验输入**：商品是否完整无遮挡、是否单人、光线是否均匀。\n3. **写不变量**：先把「保什么」写全（商品的颜色/版型/图案/褶皱），再写「换什么」。\n4. **加位置对齐句 + 修手句**——这两条几乎每次都要，能显著降低返工率。\n5. **有参考图时选相似度**：借氛围用 50% 档写法，严格复刻用 100% 档写法。\n6. **`--dry-run` 估价** → 真跑 → `--batch 3~4` 挑图，落盘到 `docs/one-shot/`。\n7. **质检**：商品是否被改（重点看图案位置和版型）、衣服是否错位、手部、光影是否统一。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 衣服跟着人一起变了 | 不变量写得不够具体 | 逐项写死颜色 / 版型 / 图案位置 / 下摆弧线 |\n| 换人后衣服错位、被拉伸 | 新身体与原商品没对齐 | 加位置对齐句（第三节） |\n| 手指崩坏 | 换人时手部重绘 | 加修手句 + `--batch 4` 挑图 |\n| 只换背景却把人也换了 | 模式句不完整 | 补 `Keep the model identical — same face, hair, body and pose.` |\n| 新背景光线和人对不上 | 未约束光向 | 追加 `Match the new background lighting to the light direction on the model in image 1.` |\n| 面料纹理被抹平 | `--quality medium` | 改 `--quality high`，或换图后接 [material-enhancement](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/material-enhancement/skill.md) |\n| 人台图转真人后脖子/手很怪 | 缺少补全指令 | 用第五节人台图专用句，明确要求补出头颈与手臂 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"one-shot\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790217657600\n}\n\nFile v1.0.12: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.12: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.12: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.12:skill-card.md\n\n## Description:\n\nEdits an existing model or mannequin e-commerce photo to replace the model, the background, or both while keeping the product unchanged.\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 sellers, marketers, and commerce creative teams use this skill to create multiple audience and scene variants from one existing product-on-model image while preserving the garment or product presentation.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Uploaded product or model photos and prompts may be sent to the selected cloud image provider.\n\nMitigation: Use only provider accounts you trust and avoid sensitive, private, or unauthorized personal images.\n\nRisk: Generated assets are written to local output paths selected by the user or command.\n\nMitigation: Choose output paths deliberately and review generated files before publishing or sharing them.\n\nRisk: Model or background replacement can be misused to imply identity, endorsement, or authorization that does not exist.\n\nMitigation: Do not use the skill to swap in a specific real person, forge endorsements, or create unauthorized likeness-based advertising.\n\n## Reference(s):\n\n- [Provider CLI reference](references/provider-cli.md)\n- [gpt-image-2 model flags](references/model-flags.md)\n- [ClawHub skill page](https://clawhub.ai/dlazyai/skills/one-shot)\n- [dLazy CLI source](https://github.com/dlazy-ai/cli)\n- [dLazy service](https://dlazy.com)\n\n## Skill Output:\n\n**Output Type(s):** [Markdown, Shell commands, Configuration, Guidance, Files]\n\n**Output Format:** [Markdown guidance with command examples and local image file o\n\nArchive v1.0.11: 11 files, 25696 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 (2614b), SKILL.md (11504b), _meta.json (128b)\n\nArchive v1.0.10: 11 files, 25454 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 (2218b), SKILL.md (11504b), _meta.json (128b)\n\nArchive v1.0.9: 11 files, 25653 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 (2932b), SKILL.md (11503b), _meta.json (127b)","readmeExcerpt":"Skill: 换模特换背景 One Shot Owner: dlazyai Summary: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。 Tags: latest:1.0.18 Version history: v1.0.18 | 2026-10-10T01:54:37.370Z | user 例行版本更新 2026-10-10 v1.0.17 | 2026-10-08T01:46:28.489Z | user 例行版本更新 2026-10-08 v1.0.16 | 2026-10-04T01:46:10.655Z | user 例行版本更新 2026-10-04 v1.0.15 | 2026-10-02T05:18:18.503Z | user 例行版本更新 2026-10-02 v1.0.14 | 2026-09-3","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"dlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg"},{"language":"bash","snippet":"# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task one-shot \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/one-shot-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/one-shot.jpg"},{"language":"bash","snippet":"# basic call: 换模特换背景\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background while keeping the garment untouched. Keep the garment exactly as it is: same colour, cut, logo, folds and hem. Replace the person with a different model of similar build, and replace the background with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium\n\n# complex call: 只换模特 + 严格照抄参考姿势 + 固定模特脸 + 修手 + 出 4 张\ndlazy gpt-image-2 \\\n  --prompt 'Replace only the model. Image 1 is the source photo, image 2 is the pose/scene reference, image 3 is the target model face. Keep the garment 100% identical to image 1 — same colour, knit texture, print placement, silhouette and hem. Reproduce image 2 exactly for pose, camera angle, crop, background and lighting. Use the face and body type from image 3. Align the new body to the original garment: shoulder line, chest width, waist and hem must land on the same pixels as in image 1. Hands must be anatomically correct — five distinct fingers per hand, no fused or extra digits. Photorealistic, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg docs/one-shot/pose-ref.jpg docs/one-shot/model-face.jpg \\\n  --size 1024x1536 --quality high --imageFormat jpeg \\\n  --batch 4 --save docs/one-shot/output-eu-sku001.jpg\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1536"},{"language":"text","snippet":"Replace [the model / the background / the model and the background] of this e-commerce photo\nwhile keeping the garment untouched.\n\nKeep the [商品描述] exactly as it is: same [颜色], same [版型/剪裁], same [印花/logo 位置],\nsame folds and hem.\n\nReplace the person with [新模特描述：性别 / 年龄 / 肤色 / 身材].\nReplace the background with [新场景描述].\n\nKeep the same pose, camera angle, crop and framing.\nAlign the new body to the original garment: shoulder line, chest width, waist and hem\nmust land on the same pixels as in image 1.\nHands must be anatomically correct — five distinct fingers per hand, no fused or extra digits.\n\nPhotorealistic catalog shot, natural light, no text, no watermark."},{"language":"bash","snippet":"dlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入"},{"language":"bash","snippet":"node scripts/gen.mjs --doctor     # 看当前哪个后端可用"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: one-shot\nversion: 1.0.18\ndescription: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。\n---\n\n# one-shot — 同一商品替换模特和背景\n\n拿一张**已经拍好的模特图或人台图**，在**商品完全不动**的前提下换掉人、换掉背景，或两者都换。\n\n和 [flat-lay](https://github.com/dlazy-ai/ecommerce-skills/blob/main/skills/flat-lay/skill.md) 的区别：flat-lay 从平铺图**造**一张模特图；本技能是把**已有**的模特图**裂变**成多个人群 / 场景版本——一次拍摄，覆盖国内海外、不同年龄段、不同肤色的投放需求。\n\n---\n\n## 生成效果示例\n\n| 输入：原模特图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/source-model.jpg\" width=\"280\"> |\n| `source-model.jpg` — 男青年身穿灰色落肩短袖，浅灰棚拍背景，768×1024 |\n\n实际执行的命令（换模特换背景）：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Replace the model and the background of this e-commerce photo while keeping the garment untouched. Keep the grey oversized short-sleeve T-shirt exactly as it is: same slate-grey colour, same drop-shoulder cut, same white chest logo, same folds and hem. Replace the person with a different male model of similar build and age, and replace the plain studio wall with a sunlit outdoor city street with soft bokeh. Keep the same pose, camera angle, crop and framing. Photorealistic catalog shot, natural light, no text, no watermark.' \\\n  --images docs/one-shot/source-model.jpg \\\n  --size 1024x1536 --quality medium --imageFormat jpeg \\\n  --save docs/one-shot/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/one-shot/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1536。灰色落肩短袖的颜色、版型、胸前 logo 与下摆弧线保持不变；模特换成另一位男青年，棚拍灰墙换成树影斑驳的街景，姿势与景别沿用原图。\n\n---\n\n## 1、能力边界\n\n| 模式 | 说明 |\n| --- | --- |\n| 换模特换背景 | 人和场景全换，只留商品 |\n| 只换背景 | 保留原模特（脸、身材、姿势），换掉环境 |\n| 只换模特 | 保留原场景与构图，换掉人 |\n\n| 附加能力 | 说明 |\n| --- | --- |\n| 指定模特 | 性别 / 年龄 / 肤色 / 身材，锁定同一张脸做多 SKU |\n| 参考图 | 决定新的姿势与场景，支持套图 |\n| 参考图相似度 | `50% 相似`（借风格，保留原构图）/ `100% 相似`（严格照抄参考图） |\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---\n\n## 3、三种模式怎么选\n\n| 你的目标 | 选模式 | prompt 要写死的不变量 |\n| --- | --- | --- |\n| 同款衣服卖给欧美市场 | 换模特换背景 | 商品（款式/颜色/图案/版型/褶皱） |\n| 同一套图换季节氛围 | 只换背景 | 商品 + 模特（脸/发型/身材/姿势） |\n| 人台图转真人图 | 只换模特 | 商品 + 场景 + 构图 + 光线 |\n| 一张图裂变成多年龄段版本 | 只换模特 | 商品 + 场景 + 姿势 + 景别 |\n\n**「参考图相似度」的等价写法**\n\n| 档位 | 写进 prompt |\n| --- | --- |\n| 50% 相似 | `Borrow the mood, colour grading and lighting style from image 2, but keep the original pose, camera angle and crop from image 1.` |\n| 100% 相似 | `Reproduce image 2 exactly for pose, camera angle, crop, background and lighting.` |\n\n**「自动修手」的等价写法**：`Hands must be anatomically correct — five distinct fingers per hand, natural knuckles, no fused or"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"one-shot\",\n  \"version\": \"1.0.18\",\n  \"publishedAt\": 1791597277370\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: 换模特换背景 One Shot Owner: dlazyai Summary: 已有模特图换模特、换背景。一张模特图 → 多人群多场景版本，商品本身不变。当用户说「换模特」「换背景」「换人种」「一图多版」「同一件衣服换个人」时使用。 Tags: latest:1.0.18 Version history: v1.0.18 | 2026-10-10T01:54:37.370Z | user 例行版本更新 2026-10-10 v1.0.17 | 2026-10-08T01:46:28.489Z | user 例行版本更新 2026-10-08 v1.0.16 | 2026-10-04T01:46:10.655Z | user 例行版本更新 2026-10-04 v1.0.15 | 2026-10-02T05:18:18.503Z | user 例行版本更新 2026-10-02 v1.0.14 | 2026-09-3","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1014,"uniquenessScore":51,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T20:41:24.919Z","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:41:24.919Z","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:46:33.352Z","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"}]}}}