{"id":"4c2f69d5-3ffd-418e-9ea9-bf4dc08563e8","entityType":"agent","slug":"clawhub-dlazyai-clothing-detail","name":"服装细节放大图 Clothing Detail","canonicalUrl":"https://www.xpersona.co/agent/clawhub-dlazyai-clothing-detail","canonicalPath":"/agent/clawhub-dlazyai-clothing-detail","generatedAt":"2026-10-11T00:35:10.491Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T22:08:38.348Z","emptyReason":null},"description":"服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。 Skill: 服装细节放大图 Clothing Detail Owner: dlazyai Summary: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。 Tags: latest:1.0.19 Version history: v1.0.19 | 2026-10-10T01:46:57.263Z | user 例行版本更新 2026-10-10 v1.0.18 | 2026-10-08T01:39:56.956Z | user 例行版本更新 2026-10-08 v1.0.17 | 2026-10-04T01:40:27.426Z | user 例行版本更新 2026-10-04 v1.0.16 | 2026-10-02T05:14:00.107Z | user 例行版本更新 2026-10-02 v1.0.15 | 2026-09-30","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s170j1ymymrxasgd00dsk7tckx84cf45:clothing-detail","sourceUrl":"https://clawhub.ai/dlazyai/clothing-detail","homepage":"https://clawhub.ai/dlazyai/skills/clothing-detail","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/dlazyai/clothing-detail","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/dlazyai/skills/clothing-detail","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":62,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。 Skill: 服装细节放大图 Clothing Detail Owner: dlazyai Summary: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T22:08:38.348Z","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-10T22:08:38.348Z","emptyReason":null},"stars":null,"forks":null,"downloads":1246,"packageName":null,"latestVersion":"1.0.19","tractionLabel":"1.2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T22:08:38.278Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T22:08:38.348Z","lastCrawledAt":"2026-10-10T22:08:38.278Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T22:08:38.278Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.19","createdAt":"2026-10-10T01:46:57.263Z","changelog":"例行版本更新 2026-10-10","fileCount":11,"zipByteSize":24772},{"version":"1.0.18","createdAt":"2026-10-08T01:39:56.956Z","changelog":"例行版本更新 2026-10-08","fileCount":11,"zipByteSize":24906},{"version":"1.0.17","createdAt":"2026-10-04T01:40:27.426Z","changelog":"例行版本更新 2026-10-04","fileCount":11,"zipByteSize":24813},{"version":"1.0.16","createdAt":"2026-10-02T05:14:00.107Z","changelog":"例行版本更新 2026-10-02","fileCount":11,"zipByteSize":24787},{"version":"1.0.15","createdAt":"2026-09-30T01:43:22.873Z","changelog":"例行版本更新 2026-09-30","fileCount":11,"zipByteSize":24852},{"version":"1.0.14","createdAt":"2026-09-28T02:33:54.050Z","changelog":"例行版本更新 2026-09-28","fileCount":11,"zipByteSize":24816},{"version":"1.0.13","createdAt":"2026-09-24T06:55:32.221Z","changelog":"例行版本更新 2026-09-24","fileCount":11,"zipByteSize":24961},{"version":"1.0.12","createdAt":"2026-09-22T01:37:40.513Z","changelog":"例行版本更新 2026-09-22","fileCount":11,"zipByteSize":25188}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170j1ymymrxasgd00dsk7tckx84cf45:clothing-detail","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/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-11T00:35:10.487Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dlazyai-clothing-detail/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-10T22:08:38.348Z","emptyReason":null},"readme":"Skill: 服装细节放大图 Clothing Detail\n\nOwner: dlazyai\n\nSummary: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n\nTags: latest:1.0.19\n\nVersion history:\n\nv1.0.19 | 2026-10-10T01:46:57.263Z | user\n\n例行版本更新 2026-10-10\n\nv1.0.18 | 2026-10-08T01:39:56.956Z | user\n\n例行版本更新 2026-10-08\n\nv1.0.17 | 2026-10-04T01:40:27.426Z | user\n\n例行版本更新 2026-10-04\n\nv1.0.16 | 2026-10-02T05:14:00.107Z | user\n\n例行版本更新 2026-10-02\n\nv1.0.15 | 2026-09-30T01:43:22.873Z | user\n\n例行版本更新 2026-09-30\n\nv1.0.14 | 2026-09-28T02:33:54.050Z | user\n\n例行版本更新 2026-09-28\n\nv1.0.13 | 2026-09-24T06:55:32.221Z | user\n\n例行版本更新 2026-09-24\n\nv1.0.12 | 2026-09-22T01:37:40.513Z | user\n\n例行版本更新 2026-09-22\n\nv1.0.11 | 2026-09-20T01:47:16.936Z | user\n\n例行版本更新 2026-09-20\n\nv1.0.10 | 2026-09-18T02:06:43.783Z | user\n\n例行版本更新 2026-09-18\n\nv1.0.9 | 2026-09-14T01:34:35.417Z | user\n\n例行版本更新 2026-09-14\n\nv1.0.8 | 2026-09-10T01:32:18.820Z | user\n\n例行版本更新 2026-09-10\n\nv1.0.7 | 2026-09-08T01:38:24.413Z | user\n\n例行版本更新 2026-09-08\n\nv1.0.6 | 2026-09-07T01:46:54.656Z | user\n\n例行版本更新 2026-09-07\n\nv1.0.5 | 2026-09-04T01:39:52.931Z | user\n\n例行版本更新 2026-09-04\n\nv1.0.4 | 2026-09-02T01:35:28.356Z | user\n\n例行版本更新 2026-09-02\n\nv1.0.3 | 2026-08-31T07:02:02.040Z | user\n\n源码仓库迁移至 github.com/dlazy-ai/ecommerce-skills\n\nv1.0.2 | 2026-08-31T05:23:39.631Z | user\n\n源码仓库迁移至 github.com/dlazy-ai/ecommerce-skills\n\nv1.0.1 | 2026-08-29T03:56:36.173Z | user\n\nSync from GitHub\n\nv1.0.0 | 2026-08-18T04:38:03.379Z | user\n\nSync from GitHub\n\nArchive index:\n\nArchive v1.0.19: 11 files, 24772 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 (1879b), SKILL.md (10468b), _meta.json (135b)\n\nFile v1.0.19:SKILL.md\n\n---\nname: clothing-detail\nversion: 1.0.19\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024，60 credits。领口罗纹与麻花panel的交接、每根纱线的捻向、羊毛纤维的绒毛感都被解析出来，侧光让菱形提花的凹凸立体可见，远端落入柔和虚化。\n\n---\n\n## 1、能力边界\n\n| 能力 | 说明 |\n| --- | --- |\n| 取景部位 | 领口罗纹 / 袖口 / 下摆 / 纽扣 / 拉链 / 口袋 / 刺绣 / 印花 / 织法结构 / 面料纤维 |\n| 风格控制 | 参考图（照抄某张细节图的机位与光线）或自定义提示词 |\n| 服装类型 | 帮助模型判断哪些部位值得放大 |\n| 生成比例 | `1:1`（方图细节位）/ `3:4`（竖版详情页） |\n\n**不做**：不改颜色、织法与结构；不添加原图没有的工艺（不存在的刺绣、不存在的拉链）；不虚构面料成分。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 原图分辨率越高越好 | 微距是在放大原图信息，原图糊 = 细节图编 |\n| ✅ 目标部位在原图里清晰可见 | 原图里看不清的部位，输出的是模型的想象 |\n| ✅ 一次只放大一个部位 | 一张图里塞三个特写等于都不清楚 |\n| ❌ 低分辨率 / 强压缩图 | 会放大出塑料感的假纹理 |\n| ❌ 目标部位被遮挡 | 挡住的工艺只能靠编 |\n\n---\n\n## 3、取景部位 → prompt 写法\n\n| 部位 | 取景描述 |\n| --- | --- |\n| 领口罗纹 | `the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join` |\n| 袖口 | `the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density` |\n| 下摆 | `the hem band and side seam, showing hem width and the finishing stitch` |\n| 纽扣 | `a single button and its buttonhole, showing button material, thread cross and hole finishing` |\n| 拉链 | `the zipper teeth and puller, showing tooth pitch, metal finish and the tape stitching` |\n| 刺绣 / 印花 | `the [刺绣/印花] motif filling the frame, showing thread direction / print edge sharpness and substrate texture` |\n| 织法结构 | `the [麻花/罗纹/提花] stitch structure, showing individual yarn plies and the twist of each loop` |\n| 面料纤维 | `the fabric surface at extreme magnification, showing fibre halo and weave interlacing` |\n\n**每条都要补三件事**：\n\n```text\nfilling the frame                      ← 特写要占满画面\nshallow depth of field with the far edge softly out of focus   ← 微距的景深特征\nsoft directional light raking across the surface to reveal depth  ← 侧光才能显出立体纹理\n```\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型 + `--quality high`；细节图的全部价值就是纹理保真度，这是本技能唯一不能省的地方）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-detail \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-detail-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-detail.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]`；带风格参考时 `[原图, 参考图]` | 顺序即 prompt 中的 image 1 / 2 |\n| `--size` | `1024x1024`（方图细节位）/ `1024x1536`（竖版详情页） | 对应原站 1:1 / 3:4 |\n| `--quality` | `high`（**不要降**） | 细节图靠纹理说话 |\n| `--imageFormat` | `jpeg` | 通用格式 |\n| `--batch` | `2` | 取景位置有随机性 |\n| `--save` | `docs/clothing-detail/output-<sku>-<部位>.jpg` | 按部位归档 |\n\n### Command Examples\n\n```bash\n# basic call: 领口细节\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the collar area of this garment and render a photorealistic close-up filling the frame. Show the ribbed crewneck collar meeting the body panel, individual yarn plies and the twist of each loop, soft directional light raking across the surface. Keep colour and stitch pattern exactly as in the source. Shallow depth of field, clean neutral background bokeh, no person, no text.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 一个 SKU 批量出 3 个部位的细节图\nSRC=docs/clothing-detail/garment-flatlay.jpg\nCOMMON='Render a photorealistic macro close-up filling the frame. Keep the colour and stitch pattern exactly as in the source image. Shallow depth of field with the far edge softly out of focus, soft directional light raking across the surface to reveal depth, clean neutral background bokeh. No person, no text, no watermark.'\nfor P in collar cuff stitch; do\n  case $P in\n    collar) VIEW='Zoom into the collar area: the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join' ;;\n    cuff)   VIEW='Zoom into the cuff area: the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density' ;;\n    stitch) VIEW='Zoom into the cable-knit panel: the stitch structure, showing individual yarn plies and the twist of each loop' ;;\n  esac\n  dlazy gpt-image-2 \\\n    --prompt \"Macro detail shot for an e-commerce detail page. $VIEW. $COMMON\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat jpeg \\\n    --save \"docs/clothing-detail/output-sku001-$P.jpg\"\ndone\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nMacro detail shot for an e-commerce detail page.\n\nZoom into [部位] of this [品类 + 颜色 + 面料] and render a photorealistic close-up\nthat fills the frame. Show [第三节表格里的取景描述].\n\nKeep the colour and stitch pattern exactly as in the source.\n\nShallow depth of field with the far edge softly out of focus,\nsoft directional light raking across the surface to reveal depth,\nclean neutral background bokeh.\n\nNo person, no text, no watermark.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 纹理像塑料 | `Resolve individual [yarn plies / weave threads / fibre ends]; the surface must read as real textile, not plastic or CG.` |\n| 放大得不够 | `Extreme magnification: the [部位] must occupy at least 70% of the frame.` |\n| 编出了不存在的工艺 | `Do not invent any construction detail that is not visible in the source image.` |\n| 整张都很实、没有微距感 | `Only the [部位] is in focus; everything beyond [X] must fall into smooth bokeh.` |\n| 颜色变了 | `Sample the colour directly from the source image; no grading, no saturation boost.` |\n\n---\n\n## 6、执行流程\n\n1. **挑原图**：分辨率越高越好；确认目标部位清晰可见、无遮挡。\n2. **列部位清单**：一个 SKU 通常出 2~3 张（领口 + 面料 + 一个特色工艺）。\n3. **每条 prompt 只放大一个部位**，从第三节取景描述抄。\n4. **补齐三件事**：占满画面 / 浅景深 / 侧光。\n5. **`--quality high`**（不要降档）→ `--batch 2` 挑图，落盘到 `docs/clothing-detail/`。\n6. **质检**：纹理是否真实（不是塑料感）、有没有编出不存在的工艺、颜色是否一致。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 纹理塑料感 | 质量档位低或原图糊 | `--quality high` + 追加解析纹理句；换高分辨率原图 |\n| 放大不够，还是半身 | 未写占比 | 追加 70% 画面占比句 |\n| 编出了原图没有的拉链/刺绣 | 模型补全 | 追加禁止编造句 |\n| 没有微距景深 | 未写景深 | 追加只有目标部位对焦的句子 |\n| 颜色比原图艳 | 自动调色 | 追加取色约束句 |\n| 三个部位挤在一张图 | 一条 prompt 写了多个部位 | 拆成多条，一条一个部位 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.19:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-detail\",\n  \"version\": \"1.0.19\",\n  \"publishedAt\": 1791596817263\n}\n\nFile v1.0.19:references/model-flags.md\n\n# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。\n\nFile v1.0.19:references/provider-cli.md\n\n<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTTP status code error (500)` |\n| 504 | 异步任务失败 | `=== Generation Failed ===` / `Prompt violates safety policy` |\n\n**给 Agent 的硬性要求**\n\n1. 命中 `insufficient_balance` → 明确告诉用户算力不足，并给出充值入口\n   <https://dlazy.com/dashboard/organization/settings?tab=credits>\n2. 命中 `unauthorized` / 缺 key → 告诉用户去 <https://dlazy.com/dashboard/organization/api-key>\n   取 key，用 `dlazy auth set <key>` 存好再继续。\n3. 用 `gen.mjs` 时，429 与 5xx 已自动重试；仍失败才向用户报错。\n4. **不要**为了「跑通」而偷偷降级参数（尺寸、档位、批量），先问用户。\n\nFile v1.0.19:scripts/lib/tasks.json\n\n{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-video-ad\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"ugc-testimonial\":         { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true }\r\n  }\r\n}\n\nFile v1.0.19:skill-card.md\n\n## Description:\n\nGuides the creation of close-up clothing-detail images from garment photos for e-commerce listings.\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 product-content creators use this skill to draft prompts and commands for close-ups of visible garment construction, stitching, and fabric texture.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Clothing images, prompts, and product details are sent to the configured cloud image provider.\n\nMitigation: Use --dry-run first, select an approved provider explicitly, and avoid confidential designs unless its data handling meets your policies.\n\nRisk: Generated close-ups may depict fabric or construction details not visible in the source photo.\n\nMitigation: Use a clear source image and review the resulting texture, construction, and color against the actual garment before publishing.\n\n## Reference(s):\n\n- [Clothing Detail on ClawHub](https://clawhub.ai/dlazyai/skills/clothing-detail)\n- [Provider CLI reference](references/provider-cli.md)\n- [Image model flags](references/model-flags.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands]\n\n**Output Format:** [Markdown with prompt text and shell commands]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Commands can produce JPEG clothing-detail images through a configured cloud image provider.]\n\n## Skill Version(s):\n\n1.0.19 (source: skill frontmatter and ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.19:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.18: 11 files, 24906 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 (2091b), SKILL.md (10468b), _meta.json (135b)\n\nFile v1.0.18:SKILL.md\n\n---\nname: clothing-detail\nversion: 1.0.18\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024，60 credits。领口罗纹与麻花panel的交接、每根纱线的捻向、羊毛纤维的绒毛感都被解析出来，侧光让菱形提花的凹凸立体可见，远端落入柔和虚化。\n\n---\n\n## 1、能力边界\n\n| 能力 | 说明 |\n| --- | --- |\n| 取景部位 | 领口罗纹 / 袖口 / 下摆 / 纽扣 / 拉链 / 口袋 / 刺绣 / 印花 / 织法结构 / 面料纤维 |\n| 风格控制 | 参考图（照抄某张细节图的机位与光线）或自定义提示词 |\n| 服装类型 | 帮助模型判断哪些部位值得放大 |\n| 生成比例 | `1:1`（方图细节位）/ `3:4`（竖版详情页） |\n\n**不做**：不改颜色、织法与结构；不添加原图没有的工艺（不存在的刺绣、不存在的拉链）；不虚构面料成分。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 原图分辨率越高越好 | 微距是在放大原图信息，原图糊 = 细节图编 |\n| ✅ 目标部位在原图里清晰可见 | 原图里看不清的部位，输出的是模型的想象 |\n| ✅ 一次只放大一个部位 | 一张图里塞三个特写等于都不清楚 |\n| ❌ 低分辨率 / 强压缩图 | 会放大出塑料感的假纹理 |\n| ❌ 目标部位被遮挡 | 挡住的工艺只能靠编 |\n\n---\n\n## 3、取景部位 → prompt 写法\n\n| 部位 | 取景描述 |\n| --- | --- |\n| 领口罗纹 | `the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join` |\n| 袖口 | `the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density` |\n| 下摆 | `the hem band and side seam, showing hem width and the finishing stitch` |\n| 纽扣 | `a single button and its buttonhole, showing button material, thread cross and hole finishing` |\n| 拉链 | `the zipper teeth and puller, showing tooth pitch, metal finish and the tape stitching` |\n| 刺绣 / 印花 | `the [刺绣/印花] motif filling the frame, showing thread direction / print edge sharpness and substrate texture` |\n| 织法结构 | `the [麻花/罗纹/提花] stitch structure, showing individual yarn plies and the twist of each loop` |\n| 面料纤维 | `the fabric surface at extreme magnification, showing fibre halo and weave interlacing` |\n\n**每条都要补三件事**：\n\n```text\nfilling the frame                      ← 特写要占满画面\nshallow depth of field with the far edge softly out of focus   ← 微距的景深特征\nsoft directional light raking across the surface to reveal depth  ← 侧光才能显出立体纹理\n```\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型 + `--quality high`；细节图的全部价值就是纹理保真度，这是本技能唯一不能省的地方）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-detail \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-detail-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-detail.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]`；带风格参考时 `[原图, 参考图]` | 顺序即 prompt 中的 image 1 / 2 |\n| `--size` | `1024x1024`（方图细节位）/ `1024x1536`（竖版详情页） | 对应原站 1:1 / 3:4 |\n| `--quality` | `high`（**不要降**） | 细节图靠纹理说话 |\n| `--imageFormat` | `jpeg` | 通用格式 |\n| `--batch` | `2` | 取景位置有随机性 |\n| `--save` | `docs/clothing-detail/output-<sku>-<部位>.jpg` | 按部位归档 |\n\n### Command Examples\n\n```bash\n# basic call: 领口细节\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the collar area of this garment and render a photorealistic close-up filling the frame. Show the ribbed crewneck collar meeting the body panel, individual yarn plies and the twist of each loop, soft directional light raking across the surface. Keep colour and stitch pattern exactly as in the source. Shallow depth of field, clean neutral background bokeh, no person, no text.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 一个 SKU 批量出 3 个部位的细节图\nSRC=docs/clothing-detail/garment-flatlay.jpg\nCOMMON='Render a photorealistic macro close-up filling the frame. Keep the colour and stitch pattern exactly as in the source image. Shallow depth of field with the far edge softly out of focus, soft directional light raking across the surface to reveal depth, clean neutral background bokeh. No person, no text, no watermark.'\nfor P in collar cuff stitch; do\n  case $P in\n    collar) VIEW='Zoom into the collar area: the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join' ;;\n    cuff)   VIEW='Zoom into the cuff area: the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density' ;;\n    stitch) VIEW='Zoom into the cable-knit panel: the stitch structure, showing individual yarn plies and the twist of each loop' ;;\n  esac\n  dlazy gpt-image-2 \\\n    --prompt \"Macro detail shot for an e-commerce detail page. $VIEW. $COMMON\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat jpeg \\\n    --save \"docs/clothing-detail/output-sku001-$P.jpg\"\ndone\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nMacro detail shot for an e-commerce detail page.\n\nZoom into [部位] of this [品类 + 颜色 + 面料] and render a photorealistic close-up\nthat fills the frame. Show [第三节表格里的取景描述].\n\nKeep the colour and stitch pattern exactly as in the source.\n\nShallow depth of field with the far edge softly out of focus,\nsoft directional light raking across the surface to reveal depth,\nclean neutral background bokeh.\n\nNo person, no text, no watermark.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 纹理像塑料 | `Resolve individual [yarn plies / weave threads / fibre ends]; the surface must read as real textile, not plastic or CG.` |\n| 放大得不够 | `Extreme magnification: the [部位] must occupy at least 70% of the frame.` |\n| 编出了不存在的工艺 | `Do not invent any construction detail that is not visible in the source image.` |\n| 整张都很实、没有微距感 | `Only the [部位] is in focus; everything beyond [X] must fall into smooth bokeh.` |\n| 颜色变了 | `Sample the colour directly from the source image; no grading, no saturation boost.` |\n\n---\n\n## 6、执行流程\n\n1. **挑原图**：分辨率越高越好；确认目标部位清晰可见、无遮挡。\n2. **列部位清单**：一个 SKU 通常出 2~3 张（领口 + 面料 + 一个特色工艺）。\n3. **每条 prompt 只放大一个部位**，从第三节取景描述抄。\n4. **补齐三件事**：占满画面 / 浅景深 / 侧光。\n5. **`--quality high`**（不要降档）→ `--batch 2` 挑图，落盘到 `docs/clothing-detail/`。\n6. **质检**：纹理是否真实（不是塑料感）、有没有编出不存在的工艺、颜色是否一致。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 纹理塑料感 | 质量档位低或原图糊 | `--quality high` + 追加解析纹理句；换高分辨率原图 |\n| 放大不够，还是半身 | 未写占比 | 追加 70% 画面占比句 |\n| 编出了原图没有的拉链/刺绣 | 模型补全 | 追加禁止编造句 |\n| 没有微距景深 | 未写景深 | 追加只有目标部位对焦的句子 |\n| 颜色比原图艳 | 自动调色 | 追加取色约束句 |\n| 三个部位挤在一张图 | 一条 prompt 写了多个部位 | 拆成多条，一条一个部位 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.18:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-detail\",\n  \"version\": \"1.0.18\",\n  \"publishedAt\": 1791423596956\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\nGenerates close-up images of garment details, such as fabric texture, stitching, and knit construction, from clothing photos.\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 designers use this skill to create product-page close-ups of visible garment features, such as collars, cuffs, and fabric texture, from existing clothing images.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Garment images and prompts may be sent to the selected external image provider.\n\nMitigation: Avoid sensitive product photos and private image URLs unless third-party processing is acceptable.\n\nRisk: Cloud image generation may incur charges or save files to an unintended location.\n\nMitigation: Preview with --dry-run before paid runs and choose the output directory explicitly.\n\nRisk: Generated close-ups may invent construction details or shift garment colors.\n\nMitigation: Use clear source photos and review every result against the garment before publication.\n\nRisk: Provider API credentials may grant access beyond this task.\n\nMitigation: Keep API keys scoped and revocable.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/dlazyai/skills/clothing-detail)\n- [Provider CLI 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 saved JPEG images]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports square or portrait detail images; provider and save path are configurable.]\n\n## Skill Version(s):\n\n1.0.18 (source: frontmatter and 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.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, 24813 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 (1897b), SKILL.md (10468b), _meta.json (135b)\n\nFile v1.0.17:SKILL.md\n\n---\nname: clothing-detail\nversion: 1.0.17\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024，60 credits。领口罗纹与麻花panel的交接、每根纱线的捻向、羊毛纤维的绒毛感都被解析出来，侧光让菱形提花的凹凸立体可见，远端落入柔和虚化。\n\n---\n\n## 1、能力边界\n\n| 能力 | 说明 |\n| --- | --- |\n| 取景部位 | 领口罗纹 / 袖口 / 下摆 / 纽扣 / 拉链 / 口袋 / 刺绣 / 印花 / 织法结构 / 面料纤维 |\n| 风格控制 | 参考图（照抄某张细节图的机位与光线）或自定义提示词 |\n| 服装类型 | 帮助模型判断哪些部位值得放大 |\n| 生成比例 | `1:1`（方图细节位）/ `3:4`（竖版详情页） |\n\n**不做**：不改颜色、织法与结构；不添加原图没有的工艺（不存在的刺绣、不存在的拉链）；不虚构面料成分。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 原图分辨率越高越好 | 微距是在放大原图信息，原图糊 = 细节图编 |\n| ✅ 目标部位在原图里清晰可见 | 原图里看不清的部位，输出的是模型的想象 |\n| ✅ 一次只放大一个部位 | 一张图里塞三个特写等于都不清楚 |\n| ❌ 低分辨率 / 强压缩图 | 会放大出塑料感的假纹理 |\n| ❌ 目标部位被遮挡 | 挡住的工艺只能靠编 |\n\n---\n\n## 3、取景部位 → prompt 写法\n\n| 部位 | 取景描述 |\n| --- | --- |\n| 领口罗纹 | `the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join` |\n| 袖口 | `the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density` |\n| 下摆 | `the hem band and side seam, showing hem width and the finishing stitch` |\n| 纽扣 | `a single button and its buttonhole, showing button material, thread cross and hole finishing` |\n| 拉链 | `the zipper teeth and puller, showing tooth pitch, metal finish and the tape stitching` |\n| 刺绣 / 印花 | `the [刺绣/印花] motif filling the frame, showing thread direction / print edge sharpness and substrate texture` |\n| 织法结构 | `the [麻花/罗纹/提花] stitch structure, showing individual yarn plies and the twist of each loop` |\n| 面料纤维 | `the fabric surface at extreme magnification, showing fibre halo and weave interlacing` |\n\n**每条都要补三件事**：\n\n```text\nfilling the frame                      ← 特写要占满画面\nshallow depth of field with the far edge softly out of focus   ← 微距的景深特征\nsoft directional light raking across the surface to reveal depth  ← 侧光才能显出立体纹理\n```\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型 + `--quality high`；细节图的全部价值就是纹理保真度，这是本技能唯一不能省的地方）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-detail \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-detail-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-detail.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]`；带风格参考时 `[原图, 参考图]` | 顺序即 prompt 中的 image 1 / 2 |\n| `--size` | `1024x1024`（方图细节位）/ `1024x1536`（竖版详情页） | 对应原站 1:1 / 3:4 |\n| `--quality` | `high`（**不要降**） | 细节图靠纹理说话 |\n| `--imageFormat` | `jpeg` | 通用格式 |\n| `--batch` | `2` | 取景位置有随机性 |\n| `--save` | `docs/clothing-detail/output-<sku>-<部位>.jpg` | 按部位归档 |\n\n### Command Examples\n\n```bash\n# basic call: 领口细节\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the collar area of this garment and render a photorealistic close-up filling the frame. Show the ribbed crewneck collar meeting the body panel, individual yarn plies and the twist of each loop, soft directional light raking across the surface. Keep colour and stitch pattern exactly as in the source. Shallow depth of field, clean neutral background bokeh, no person, no text.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 一个 SKU 批量出 3 个部位的细节图\nSRC=docs/clothing-detail/garment-flatlay.jpg\nCOMMON='Render a photorealistic macro close-up filling the frame. Keep the colour and stitch pattern exactly as in the source image. Shallow depth of field with the far edge softly out of focus, soft directional light raking across the surface to reveal depth, clean neutral background bokeh. No person, no text, no watermark.'\nfor P in collar cuff stitch; do\n  case $P in\n    collar) VIEW='Zoom into the collar area: the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join' ;;\n    cuff)   VIEW='Zoom into the cuff area: the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density' ;;\n    stitch) VIEW='Zoom into the cable-knit panel: the stitch structure, showing individual yarn plies and the twist of each loop' ;;\n  esac\n  dlazy gpt-image-2 \\\n    --prompt \"Macro detail shot for an e-commerce detail page. $VIEW. $COMMON\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat jpeg \\\n    --save \"docs/clothing-detail/output-sku001-$P.jpg\"\ndone\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nMacro detail shot for an e-commerce detail page.\n\nZoom into [部位] of this [品类 + 颜色 + 面料] and render a photorealistic close-up\nthat fills the frame. Show [第三节表格里的取景描述].\n\nKeep the colour and stitch pattern exactly as in the source.\n\nShallow depth of field with the far edge softly out of focus,\nsoft directional light raking across the surface to reveal depth,\nclean neutral background bokeh.\n\nNo person, no text, no watermark.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 纹理像塑料 | `Resolve individual [yarn plies / weave threads / fibre ends]; the surface must read as real textile, not plastic or CG.` |\n| 放大得不够 | `Extreme magnification: the [部位] must occupy at least 70% of the frame.` |\n| 编出了不存在的工艺 | `Do not invent any construction detail that is not visible in the source image.` |\n| 整张都很实、没有微距感 | `Only the [部位] is in focus; everything beyond [X] must fall into smooth bokeh.` |\n| 颜色变了 | `Sample the colour directly from the source image; no grading, no saturation boost.` |\n\n---\n\n## 6、执行流程\n\n1. **挑原图**：分辨率越高越好；确认目标部位清晰可见、无遮挡。\n2. **列部位清单**：一个 SKU 通常出 2~3 张（领口 + 面料 + 一个特色工艺）。\n3. **每条 prompt 只放大一个部位**，从第三节取景描述抄。\n4. **补齐三件事**：占满画面 / 浅景深 / 侧光。\n5. **`--quality high`**（不要降档）→ `--batch 2` 挑图，落盘到 `docs/clothing-detail/`。\n6. **质检**：纹理是否真实（不是塑料感）、有没有编出不存在的工艺、颜色是否一致。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 纹理塑料感 | 质量档位低或原图糊 | `--quality high` + 追加解析纹理句；换高分辨率原图 |\n| 放大不够，还是半身 | 未写占比 | 追加 70% 画面占比句 |\n| 编出了原图没有的拉链/刺绣 | 模型补全 | 追加禁止编造句 |\n| 没有微距景深 | 未写景深 | 追加只有目标部位对焦的句子 |\n| 颜色比原图艳 | 自动调色 | 追加取色约束句 |\n| 三个部位挤在一张图 | 一条 prompt 写了多个部位 | 拆成多条，一条一个部位 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.17:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-detail\",\n  \"version\": \"1.0.17\",\n  \"publishedAt\": 1791078027426\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\nGuides agents in creating photorealistic close-ups of garment details from product photos for e-commerce pages.\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 designers use this skill to prepare prompts and commands for close-up product images showing garment features such as collars, seams, and fabric texture.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Selected garment images and prompts are sent to the configured cloud image provider.\n\nMitigation: Use --dry-run to review requests, choose the provider explicitly when needed, and exclude private or unrelated local files.\n\nRisk: Generated close-ups can depict garment details that are not visible in the source photo.\n\nMitigation: Start with a clear source image and check the result against the actual garment before publishing.\n\n## Reference(s):\n\n- [Clothing Detail release on ClawHub](https://clawhub.ai/dlazyai/skills/clothing-detail)\n- [Provider CLI guide](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, Image files]\n\n**Output Format:** [Markdown guidance and commands; generated JPEG images]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Square or portrait images; provider usage may incur charges.]\n\n## Skill Version(s):\n\n1.0.17 (source: skill frontmatter and ClawHub release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.17:examples/brand.yaml\n\n# ⚠️ 由 scripts/build-skills.mjs 从 shared/examples/brand.yaml 同步生成，不要直接改这里。\r\n# 店铺品牌视觉规范 —— 所有生图技能读这一份，保证几百个 SKU 看起来像同一家店。\r\n#   node scripts/brand.mjs --brand brand.yaml --for flat-lay\r\n#   node scripts/gen.mjs --task flat-lay --brand brand.yaml --prompt '...'\r\n\r\nbrand:\r\n  name: 示例品牌\r\n  # 一句话概括调性，会原样进 prompt\r\n  tone: quiet minimalist, warm and lived-in, never glossy or commercial\r\n\r\nmodel:\r\n  # 锁模特：给一张脸的参考图，所有技能都会把它作为最后一张参考图传入\r\n  reference: assets/model/face-a.jpg\r\n  description: East Asian woman, late twenties, natural makeup, shoulder-length black hair\r\n  body: slim, height around 168cm\r\n\r\nphotography:\r\n  background: seamless off-white studio backdrop, RGB 248 248 246\r\n  lighting: soft large softbox from camera left, gentle fill, no hard shadows\r\n  camera: 85mm equivalent, eye level, shallow depth of field\r\n  grade: neutral white balance around 5200K, low contrast, slightly lifted blacks\r\n  crop: full body with headroom, product centered\r\n\r\nlayout:\r\n  # 给带排版的技能（主图 / 详情页）用\r\n  margin: at least 8% empty margin on all sides\r\n  typeface: clean sans-serif, no decorative fonts\r\n  text_color: near-black on light background\r\n\r\nforbid:\r\n  - no visible brand logos other than the product's own\r\n  - no text or watermark\r\n  - no exaggerated poses or dramatic wind effects\r\n  - no oversaturated colors\r\n\r\n# 可选：把这些直接写进合规目标，生成时就按平台要求出图\r\ncompliance:\r\n  platform: amazon\n\nArchive v1.0.16: 11 files, 24787 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 (1899b), SKILL.md (10468b), _meta.json (135b)\n\nFile v1.0.16:SKILL.md\n\n---\nname: clothing-detail\nversion: 1.0.16\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024，60 credits。领口罗纹与麻花panel的交接、每根纱线的捻向、羊毛纤维的绒毛感都被解析出来，侧光让菱形提花的凹凸立体可见，远端落入柔和虚化。\n\n---\n\n## 1、能力边界\n\n| 能力 | 说明 |\n| --- | --- |\n| 取景部位 | 领口罗纹 / 袖口 / 下摆 / 纽扣 / 拉链 / 口袋 / 刺绣 / 印花 / 织法结构 / 面料纤维 |\n| 风格控制 | 参考图（照抄某张细节图的机位与光线）或自定义提示词 |\n| 服装类型 | 帮助模型判断哪些部位值得放大 |\n| 生成比例 | `1:1`（方图细节位）/ `3:4`（竖版详情页） |\n\n**不做**：不改颜色、织法与结构；不添加原图没有的工艺（不存在的刺绣、不存在的拉链）；不虚构面料成分。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 原图分辨率越高越好 | 微距是在放大原图信息，原图糊 = 细节图编 |\n| ✅ 目标部位在原图里清晰可见 | 原图里看不清的部位，输出的是模型的想象 |\n| ✅ 一次只放大一个部位 | 一张图里塞三个特写等于都不清楚 |\n| ❌ 低分辨率 / 强压缩图 | 会放大出塑料感的假纹理 |\n| ❌ 目标部位被遮挡 | 挡住的工艺只能靠编 |\n\n---\n\n## 3、取景部位 → prompt 写法\n\n| 部位 | 取景描述 |\n| --- | --- |\n| 领口罗纹 | `the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join` |\n| 袖口 | `the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density` |\n| 下摆 | `the hem band and side seam, showing hem width and the finishing stitch` |\n| 纽扣 | `a single button and its buttonhole, showing button material, thread cross and hole finishing` |\n| 拉链 | `the zipper teeth and puller, showing tooth pitch, metal finish and the tape stitching` |\n| 刺绣 / 印花 | `the [刺绣/印花] motif filling the frame, showing thread direction / print edge sharpness and substrate texture` |\n| 织法结构 | `the [麻花/罗纹/提花] stitch structure, showing individual yarn plies and the twist of each loop` |\n| 面料纤维 | `the fabric surface at extreme magnification, showing fibre halo and weave interlacing` |\n\n**每条都要补三件事**：\n\n```text\nfilling the frame                      ← 特写要占满画面\nshallow depth of field with the far edge softly out of focus   ← 微距的景深特征\nsoft directional light raking across the surface to reveal depth  ← 侧光才能显出立体纹理\n```\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型 + `--quality high`；细节图的全部价值就是纹理保真度，这是本技能唯一不能省的地方）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-detail \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-detail-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-detail.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]`；带风格参考时 `[原图, 参考图]` | 顺序即 prompt 中的 image 1 / 2 |\n| `--size` | `1024x1024`（方图细节位）/ `1024x1536`（竖版详情页） | 对应原站 1:1 / 3:4 |\n| `--quality` | `high`（**不要降**） | 细节图靠纹理说话 |\n| `--imageFormat` | `jpeg` | 通用格式 |\n| `--batch` | `2` | 取景位置有随机性 |\n| `--save` | `docs/clothing-detail/output-<sku>-<部位>.jpg` | 按部位归档 |\n\n### Command Examples\n\n```bash\n# basic call: 领口细节\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the collar area of this garment and render a photorealistic close-up filling the frame. Show the ribbed crewneck collar meeting the body panel, individual yarn plies and the twist of each loop, soft directional light raking across the surface. Keep colour and stitch pattern exactly as in the source. Shallow depth of field, clean neutral background bokeh, no person, no text.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 一个 SKU 批量出 3 个部位的细节图\nSRC=docs/clothing-detail/garment-flatlay.jpg\nCOMMON='Render a photorealistic macro close-up filling the frame. Keep the colour and stitch pattern exactly as in the source image. Shallow depth of field with the far edge softly out of focus, soft directional light raking across the surface to reveal depth, clean neutral background bokeh. No person, no text, no watermark.'\nfor P in collar cuff stitch; do\n  case $P in\n    collar) VIEW='Zoom into the collar area: the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join' ;;\n    cuff)   VIEW='Zoom into the cuff area: the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density' ;;\n    stitch) VIEW='Zoom into the cable-knit panel: the stitch structure, showing individual yarn plies and the twist of each loop' ;;\n  esac\n  dlazy gpt-image-2 \\\n    --prompt \"Macro detail shot for an e-commerce detail page. $VIEW. $COMMON\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat jpeg \\\n    --save \"docs/clothing-detail/output-sku001-$P.jpg\"\ndone\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nMacro detail shot for an e-commerce detail page.\n\nZoom into [部位] of this [品类 + 颜色 + 面料] and render a photorealistic close-up\nthat fills the frame. Show [第三节表格里的取景描述].\n\nKeep the colour and stitch pattern exactly as in the source.\n\nShallow depth of field with the far edge softly out of focus,\nsoft directional light raking across the surface to reveal depth,\nclean neutral background bokeh.\n\nNo person, no text, no watermark.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 纹理像塑料 | `Resolve individual [yarn plies / weave threads / fibre ends]; the surface must read as real textile, not plastic or CG.` |\n| 放大得不够 | `Extreme magnification: the [部位] must occupy at least 70% of the frame.` |\n| 编出了不存在的工艺 | `Do not invent any construction detail that is not visible in the source image.` |\n| 整张都很实、没有微距感 | `Only the [部位] is in focus; everything beyond [X] must fall into smooth bokeh.` |\n| 颜色变了 | `Sample the colour directly from the source image; no grading, no saturation boost.` |\n\n---\n\n## 6、执行流程\n\n1. **挑原图**：分辨率越高越好；确认目标部位清晰可见、无遮挡。\n2. **列部位清单**：一个 SKU 通常出 2~3 张（领口 + 面料 + 一个特色工艺）。\n3. **每条 prompt 只放大一个部位**，从第三节取景描述抄。\n4. **补齐三件事**：占满画面 / 浅景深 / 侧光。\n5. **`--quality high`**（不要降档）→ `--batch 2` 挑图，落盘到 `docs/clothing-detail/`。\n6. **质检**：纹理是否真实（不是塑料感）、有没有编出不存在的工艺、颜色是否一致。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 纹理塑料感 | 质量档位低或原图糊 | `--quality high` + 追加解析纹理句；换高分辨率原图 |\n| 放大不够，还是半身 | 未写占比 | 追加 70% 画面占比句 |\n| 编出了原图没有的拉链/刺绣 | 模型补全 | 追加禁止编造句 |\n| 没有微距景深 | 未写景深 | 追加只有目标部位对焦的句子 |\n| 颜色比原图艳 | 自动调色 | 追加取色约束句 |\n| 三个部位挤在一张图 | 一条 prompt 写了多个部位 | 拆成多条，一条一个部位 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.16:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-detail\",\n  \"version\": \"1.0.16\",\n  \"publishedAt\": 1790918040107\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\nGenerates photorealistic close-ups of visible garment construction and fabric details from clothing photos for e-commerce product pages.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nE-commerce sellers and product-content teams use garment photos to create close-ups of collars, cuffs, seams, and fabric textures for product listings.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Garment images and prompts are sent to the selected cloud image provider.\n\nMitigation: Submit only images and prompts approved for upload, and confirm the selected provider before running.\n\nRisk: Image generation may incur charges and create details not visible in the source photo.\n\nMitigation: Use --dry-run to review the request and cost, then check generated details against the source before publishing.\n\n## Reference(s):\n\n- [Clothing Detail skill release](https://clawhub.ai/dlazyai/skills/clothing-detail)\n- [Provider CLI 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):** [Image files, Prompt guidance, Shell commands]\n\n**Output Format:** [JPEG garment-detail images with Markdown usage guidance and command examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Square or portrait close-ups saved to a specified output path; generation can use a style reference image.]\n\n## Skill Version(s):\n\n1.0.16 (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.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, 24852 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 (1934b), SKILL.md (10468b), _meta.json (135b)\n\nFile v1.0.15:SKILL.md\n\n---\nname: clothing-detail\nversion: 1.0.15\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024，60 credits。领口罗纹与麻花panel的交接、每根纱线的捻向、羊毛纤维的绒毛感都被解析出来，侧光让菱形提花的凹凸立体可见，远端落入柔和虚化。\n\n---\n\n## 1、能力边界\n\n| 能力 | 说明 |\n| --- | --- |\n| 取景部位 | 领口罗纹 / 袖口 / 下摆 / 纽扣 / 拉链 / 口袋 / 刺绣 / 印花 / 织法结构 / 面料纤维 |\n| 风格控制 | 参考图（照抄某张细节图的机位与光线）或自定义提示词 |\n| 服装类型 | 帮助模型判断哪些部位值得放大 |\n| 生成比例 | `1:1`（方图细节位）/ `3:4`（竖版详情页） |\n\n**不做**：不改颜色、织法与结构；不添加原图没有的工艺（不存在的刺绣、不存在的拉链）；不虚构面料成分。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 原图分辨率越高越好 | 微距是在放大原图信息，原图糊 = 细节图编 |\n| ✅ 目标部位在原图里清晰可见 | 原图里看不清的部位，输出的是模型的想象 |\n| ✅ 一次只放大一个部位 | 一张图里塞三个特写等于都不清楚 |\n| ❌ 低分辨率 / 强压缩图 | 会放大出塑料感的假纹理 |\n| ❌ 目标部位被遮挡 | 挡住的工艺只能靠编 |\n\n---\n\n## 3、取景部位 → prompt 写法\n\n| 部位 | 取景描述 |\n| --- | --- |\n| 领口罗纹 | `the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join` |\n| 袖口 | `the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density` |\n| 下摆 | `the hem band and side seam, showing hem width and the finishing stitch` |\n| 纽扣 | `a single button and its buttonhole, showing button material, thread cross and hole finishing` |\n| 拉链 | `the zipper teeth and puller, showing tooth pitch, metal finish and the tape stitching` |\n| 刺绣 / 印花 | `the [刺绣/印花] motif filling the frame, showing thread direction / print edge sharpness and substrate texture` |\n| 织法结构 | `the [麻花/罗纹/提花] stitch structure, showing individual yarn plies and the twist of each loop` |\n| 面料纤维 | `the fabric surface at extreme magnification, showing fibre halo and weave interlacing` |\n\n**每条都要补三件事**：\n\n```text\nfilling the frame                      ← 特写要占满画面\nshallow depth of field with the far edge softly out of focus   ← 微距的景深特征\nsoft directional light raking across the surface to reveal depth  ← 侧光才能显出立体纹理\n```\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型 + `--quality high`；细节图的全部价值就是纹理保真度，这是本技能唯一不能省的地方）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-detail \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-detail-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-detail.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]`；带风格参考时 `[原图, 参考图]` | 顺序即 prompt 中的 image 1 / 2 |\n| `--size` | `1024x1024`（方图细节位）/ `1024x1536`（竖版详情页） | 对应原站 1:1 / 3:4 |\n| `--quality` | `high`（**不要降**） | 细节图靠纹理说话 |\n| `--imageFormat` | `jpeg` | 通用格式 |\n| `--batch` | `2` | 取景位置有随机性 |\n| `--save` | `docs/clothing-detail/output-<sku>-<部位>.jpg` | 按部位归档 |\n\n### Command Examples\n\n```bash\n# basic call: 领口细节\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the collar area of this garment and render a photorealistic close-up filling the frame. Show the ribbed crewneck collar meeting the body panel, individual yarn plies and the twist of each loop, soft directional light raking across the surface. Keep colour and stitch pattern exactly as in the source. Shallow depth of field, clean neutral background bokeh, no person, no text.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 一个 SKU 批量出 3 个部位的细节图\nSRC=docs/clothing-detail/garment-flatlay.jpg\nCOMMON='Render a photorealistic macro close-up filling the frame. Keep the colour and stitch pattern exactly as in the source image. Shallow depth of field with the far edge softly out of focus, soft directional light raking across the surface to reveal depth, clean neutral background bokeh. No person, no text, no watermark.'\nfor P in collar cuff stitch; do\n  case $P in\n    collar) VIEW='Zoom into the collar area: the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join' ;;\n    cuff)   VIEW='Zoom into the cuff area: the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density' ;;\n    stitch) VIEW='Zoom into the cable-knit panel: the stitch structure, showing individual yarn plies and the twist of each loop' ;;\n  esac\n  dlazy gpt-image-2 \\\n    --prompt \"Macro detail shot for an e-commerce detail page. $VIEW. $COMMON\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat jpeg \\\n    --save \"docs/clothing-detail/output-sku001-$P.jpg\"\ndone\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nMacro detail shot for an e-commerce detail page.\n\nZoom into [部位] of this [品类 + 颜色 + 面料] and render a photorealistic close-up\nthat fills the frame. Show [第三节表格里的取景描述].\n\nKeep the colour and stitch pattern exactly as in the source.\n\nShallow depth of field with the far edge softly out of focus,\nsoft directional light raking across the surface to reveal depth,\nclean neutral background bokeh.\n\nNo person, no text, no watermark.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 纹理像塑料 | `Resolve individual [yarn plies / weave threads / fibre ends]; the surface must read as real textile, not plastic or CG.` |\n| 放大得不够 | `Extreme magnification: the [部位] must occupy at least 70% of the frame.` |\n| 编出了不存在的工艺 | `Do not invent any construction detail that is not visible in the source image.` |\n| 整张都很实、没有微距感 | `Only the [部位] is in focus; everything beyond [X] must fall into smooth bokeh.` |\n| 颜色变了 | `Sample the colour directly from the source image; no grading, no saturation boost.` |\n\n---\n\n## 6、执行流程\n\n1. **挑原图**：分辨率越高越好；确认目标部位清晰可见、无遮挡。\n2. **列部位清单**：一个 SKU 通常出 2~3 张（领口 + 面料 + 一个特色工艺）。\n3. **每条 prompt 只放大一个部位**，从第三节取景描述抄。\n4. **补齐三件事**：占满画面 / 浅景深 / 侧光。\n5. **`--quality high`**（不要降档）→ `--batch 2` 挑图，落盘到 `docs/clothing-detail/`。\n6. **质检**：纹理是否真实（不是塑料感）、有没有编出不存在的工艺、颜色是否一致。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 纹理塑料感 | 质量档位低或原图糊 | `--quality high` + 追加解析纹理句；换高分辨率原图 |\n| 放大不够，还是半身 | 未写占比 | 追加 70% 画面占比句 |\n| 编出了原图没有的拉链/刺绣 | 模型补全 | 追加禁止编造句 |\n| 没有微距景深 | 未写景深 | 追加只有目标部位对焦的句子 |\n| 颜色比原图艳 | 自动调色 | 追加取色约束句 |\n| 三个部位挤在一张图 | 一条 prompt 写了多个部位 | 拆成多条，一条一个部位 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.15:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-detail\",\n  \"version\": \"1.0.15\",\n  \"publishedAt\": 1790732602873\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 the creation of close-up clothing detail images from product photos for e-commerce listings.\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 product creators use the skill to create close-up views of visible fabric textures, seams, and garment construction from existing clothing photos.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Product images and prompts are sent to a configured cloud provider.\n\nMitigation: Use only approved providers and avoid confidential designs unless their terms permit uploads.\n\nRisk: Generation can incur charges and uses provider credentials.\n\nMitigation: Check the request and estimated cost with dry-run first; keep API keys scoped and revocable.\n\nRisk: Close-ups can depict garment details that are not visible in the source photo.\n\nMitigation: Start with clear, unobstructed source images and review each result against the original before publication.\n\n## Reference(s):\n\n- [Model flags](references/model-flags.md)\n- [Provider CLI and data flow](references/provider-cli.md)\n- [dLazy CLI source and usage](https://github.com/dlazy-ai/cli)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Images]\n\n**Output Format:** [Markdown instructions and generated image files (JPEG, PNG, or WebP)]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Square or portrait close-ups; optional local save path and batch generation.]\n\n## Skill Version(s):\n\n1.0.15 (source: frontmatter and server-resolved release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 24816 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 (1905b), SKILL.md (10468b), _meta.json (135b)\n\nFile v1.0.14:SKILL.md\n\n---\nname: clothing-detail\nversion: 1.0.14\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024，60 credits。领口罗纹与麻花panel的交接、每根纱线的捻向、羊毛纤维的绒毛感都被解析出来，侧光让菱形提花的凹凸立体可见，远端落入柔和虚化。\n\n---\n\n## 1、能力边界\n\n| 能力 | 说明 |\n| --- | --- |\n| 取景部位 | 领口罗纹 / 袖口 / 下摆 / 纽扣 / 拉链 / 口袋 / 刺绣 / 印花 / 织法结构 / 面料纤维 |\n| 风格控制 | 参考图（照抄某张细节图的机位与光线）或自定义提示词 |\n| 服装类型 | 帮助模型判断哪些部位值得放大 |\n| 生成比例 | `1:1`（方图细节位）/ `3:4`（竖版详情页） |\n\n**不做**：不改颜色、织法与结构；不添加原图没有的工艺（不存在的刺绣、不存在的拉链）；不虚构面料成分。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 原图分辨率越高越好 | 微距是在放大原图信息，原图糊 = 细节图编 |\n| ✅ 目标部位在原图里清晰可见 | 原图里看不清的部位，输出的是模型的想象 |\n| ✅ 一次只放大一个部位 | 一张图里塞三个特写等于都不清楚 |\n| ❌ 低分辨率 / 强压缩图 | 会放大出塑料感的假纹理 |\n| ❌ 目标部位被遮挡 | 挡住的工艺只能靠编 |\n\n---\n\n## 3、取景部位 → prompt 写法\n\n| 部位 | 取景描述 |\n| --- | --- |\n| 领口罗纹 | `the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join` |\n| 袖口 | `the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density` |\n| 下摆 | `the hem band and side seam, showing hem width and the finishing stitch` |\n| 纽扣 | `a single button and its buttonhole, showing button material, thread cross and hole finishing` |\n| 拉链 | `the zipper teeth and puller, showing tooth pitch, metal finish and the tape stitching` |\n| 刺绣 / 印花 | `the [刺绣/印花] motif filling the frame, showing thread direction / print edge sharpness and substrate texture` |\n| 织法结构 | `the [麻花/罗纹/提花] stitch structure, showing individual yarn plies and the twist of each loop` |\n| 面料纤维 | `the fabric surface at extreme magnification, showing fibre halo and weave interlacing` |\n\n**每条都要补三件事**：\n\n```text\nfilling the frame                      ← 特写要占满画面\nshallow depth of field with the far edge softly out of focus   ← 微距的景深特征\nsoft directional light raking across the surface to reveal depth  ← 侧光才能显出立体纹理\n```\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型 + `--quality high`；细节图的全部价值就是纹理保真度，这是本技能唯一不能省的地方）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-detail \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-detail-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-detail.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]`；带风格参考时 `[原图, 参考图]` | 顺序即 prompt 中的 image 1 / 2 |\n| `--size` | `1024x1024`（方图细节位）/ `1024x1536`（竖版详情页） | 对应原站 1:1 / 3:4 |\n| `--quality` | `high`（**不要降**） | 细节图靠纹理说话 |\n| `--imageFormat` | `jpeg` | 通用格式 |\n| `--batch` | `2` | 取景位置有随机性 |\n| `--save` | `docs/clothing-detail/output-<sku>-<部位>.jpg` | 按部位归档 |\n\n### Command Examples\n\n```bash\n# basic call: 领口细节\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the collar area of this garment and render a photorealistic close-up filling the frame. Show the ribbed crewneck collar meeting the body panel, individual yarn plies and the twist of each loop, soft directional light raking across the surface. Keep colour and stitch pattern exactly as in the source. Shallow depth of field, clean neutral background bokeh, no person, no text.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 一个 SKU 批量出 3 个部位的细节图\nSRC=docs/clothing-detail/garment-flatlay.jpg\nCOMMON='Render a photorealistic macro close-up filling the frame. Keep the colour and stitch pattern exactly as in the source image. Shallow depth of field with the far edge softly out of focus, soft directional light raking across the surface to reveal depth, clean neutral background bokeh. No person, no text, no watermark.'\nfor P in collar cuff stitch; do\n  case $P in\n    collar) VIEW='Zoom into the collar area: the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join' ;;\n    cuff)   VIEW='Zoom into the cuff area: the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density' ;;\n    stitch) VIEW='Zoom into the cable-knit panel: the stitch structure, showing individual yarn plies and the twist of each loop' ;;\n  esac\n  dlazy gpt-image-2 \\\n    --prompt \"Macro detail shot for an e-commerce detail page. $VIEW. $COMMON\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat jpeg \\\n    --save \"docs/clothing-detail/output-sku001-$P.jpg\"\ndone\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nMacro detail shot for an e-commerce detail page.\n\nZoom into [部位] of this [品类 + 颜色 + 面料] and render a photorealistic close-up\nthat fills the frame. Show [第三节表格里的取景描述].\n\nKeep the colour and stitch pattern exactly as in the source.\n\nShallow depth of field with the far edge softly out of focus,\nsoft directional light raking across the surface to reveal depth,\nclean neutral background bokeh.\n\nNo person, no text, no watermark.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 纹理像塑料 | `Resolve individual [yarn plies / weave threads / fibre ends]; the surface must read as real textile, not plastic or CG.` |\n| 放大得不够 | `Extreme magnification: the [部位] must occupy at least 70% of the frame.` |\n| 编出了不存在的工艺 | `Do not invent any construction detail that is not visible in the source image.` |\n| 整张都很实、没有微距感 | `Only the [部位] is in focus; everything beyond [X] must fall into smooth bokeh.` |\n| 颜色变了 | `Sample the colour directly from the source image; no grading, no saturation boost.` |\n\n---\n\n## 6、执行流程\n\n1. **挑原图**：分辨率越高越好；确认目标部位清晰可见、无遮挡。\n2. **列部位清单**：一个 SKU 通常出 2~3 张（领口 + 面料 + 一个特色工艺）。\n3. **每条 prompt 只放大一个部位**，从第三节取景描述抄。\n4. **补齐三件事**：占满画面 / 浅景深 / 侧光。\n5. **`--quality high`**（不要降档）→ `--batch 2` 挑图，落盘到 `docs/clothing-detail/`。\n6. **质检**：纹理是否真实（不是塑料感）、有没有编出不存在的工艺、颜色是否一致。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 纹理塑料感 | 质量档位低或原图糊 | `--quality high` + 追加解析纹理句；换高分辨率原图 |\n| 放大不够，还是半身 | 未写占比 | 追加 70% 画面占比句 |\n| 编出了原图没有的拉链/刺绣 | 模型补全 | 追加禁止编造句 |\n| 没有微距景深 | 未写景深 | 追加只有目标部位对焦的句子 |\n| 颜色比原图艳 | 自动调色 | 追加取色约束句 |\n| 三个部位挤在一张图 | 一条 prompt 写了多个部位 | 拆成多条，一条一个部位 |\n\n---\n\n## Tips\n\nVisit https://dlazy.com for more information.\n\nFile v1.0.14:_meta.json\n\n{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-detail\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1790562834050\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\nGenerates photorealistic close-ups of visible garment details, such as fabric texture, seams, and knit construction, from product photos.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nE-commerce sellers and creative teams use this skill to turn garment product photos into detail images of collars, cuffs, seams, and textiles for product listings.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Product photos and prompts are sent to the selected cloud image provider.\n\nMitigation: Avoid sensitive or private photos and confirm the chosen provider before sending images.\n\nRisk: Image generation may incur charges or require additional CLI installation.\n\nMitigation: Check the request with --dry-run or --doctor first and pin any separately installed npx package.\n\nRisk: Generated close-ups can suggest garment details absent from the source photo.\n\nMitigation: Use clear source images and review each result against the garment before publishing.\n\n## Reference(s):\n\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, Image files]\n\n**Output Format:** [Text instructions and generated JPEG product-detail images]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Square or portrait close-ups of one visible garment feature per image.]\n\n## Skill Version(s):\n\n1.0.14 (source: server-resolved release 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.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, 24961 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 (2266b), SKILL.md (10468b), _meta.json (135b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: clothing-detail\nversion: 1.0.13\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024，60 credits。领口罗纹与麻花panel的交接、每根纱线的捻向、羊毛纤维的绒毛感都被解析出来，侧光让菱形提花的凹凸立体可见，远端落入柔和虚化。\n\n---\n\n## 1、能力边界\n\n| 能力 | 说明 |\n| --- | --- |\n| 取景部位 | 领口罗纹 / 袖口 / 下摆 / 纽扣 / 拉链 / 口袋 / 刺绣 / 印花 / 织法结构 / 面料纤维 |\n| 风格控制 | 参考图（照抄某张细节图的机位与光线）或自定义提示词 |\n| 服装类型 | 帮助模型判断哪些部位值得放大 |\n| 生成比例 | `1:1`（方图细节位）/ `3:4`（竖版详情页） |\n\n**不做**：不改颜色、织法与结构；不添加原图没有的工艺（不存在的刺绣、不存在的拉链）；不虚构面料成分。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 原图分辨率越高越好 | 微距是在放大原图信息，原图糊 = 细节图编 |\n| ✅ 目标部位在原图里清晰可见 | 原图里看不清的部位，输出的是模型的想象 |\n| ✅ 一次只放大一个部位 | 一张图里塞三个特写等于都不清楚 |\n| ❌ 低分辨率 / 强压缩图 | 会放大出塑料感的假纹理 |\n| ❌ 目标部位被遮挡 | 挡住的工艺只能靠编 |\n\n---\n\n## 3、取景部位 → prompt 写法\n\n| 部位 | 取景描述 |\n| --- | --- |\n| 领口罗纹 | `the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join` |\n| 袖口 | `the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density` |\n| 下摆 | `the hem band and side seam, showing hem width and the finishing stitch` |\n| 纽扣 | `a single button and its buttonhole, showing button material, thread cross and hole finishing` |\n| 拉链 | `the zipper teeth and puller, showing tooth pitch, metal finish and the tape stitching` |\n| 刺绣 / 印花 | `the [刺绣/印花] motif filling the frame, showing thread direction / print edge sharpness and substrate texture` |\n| 织法结构 | `the [麻花/罗纹/提花] stitch structure, showing individual yarn plies and the twist of each loop` |\n| 面料纤维 | `the fabric surface at extreme magnification, showing fibre halo and weave interlacing` |\n\n**每条都要补三件事**：\n\n```text\nfilling the frame                      ← 特写要占满画面\nshallow depth of field with the far edge softly out of focus   ← 微距的景深特征\nsoft directional light raking across the surface to reveal depth  ← 侧光才能显出立体纹理\n```\n\n---\n\n## 4、工具调用\n\n本技能使用 dLazy 的 **`gpt-image-2`**（图像编辑模型 + `--quality high`；细节图的全部价值就是纹理保真度，这是本技能唯一不能省的地方）。\n\n### 调用方式\n\n两种等价写法，选一种。统一入口会自动选后端、失败重试、建目录落盘、估算成本：\n\n```bash\n# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-detail \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-detail-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-detail.jpg\n```\n\n**参数约定（本技能固定用法）**\n\n| 参数 | 取值 | 理由 |\n| --- | --- | --- |\n| `--images` | `[原图]`；带风格参考时 `[原图, 参考图]` | 顺序即 prompt 中的 image 1 / 2 |\n| `--size` | `1024x1024`（方图细节位）/ `1024x1536`（竖版详情页） | 对应原站 1:1 / 3:4 |\n| `--quality` | `high`（**不要降**） | 细节图靠纹理说话 |\n| `--imageFormat` | `jpeg` | 通用格式 |\n| `--batch` | `2` | 取景位置有随机性 |\n| `--save` | `docs/clothing-detail/output-<sku>-<部位>.jpg` | 按部位归档 |\n\n### Command Examples\n\n```bash\n# basic call: 领口细节\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the collar area of this garment and render a photorealistic close-up filling the frame. Show the ribbed crewneck collar meeting the body panel, individual yarn plies and the twist of each loop, soft directional light raking across the surface. Keep colour and stitch pattern exactly as in the source. Shallow depth of field, clean neutral background bokeh, no person, no text.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 一个 SKU 批量出 3 个部位的细节图\nSRC=docs/clothing-detail/garment-flatlay.jpg\nCOMMON='Render a photorealistic macro close-up filling the frame. Keep the colour and stitch pattern exactly as in the source image. Shallow depth of field with the far edge softly out of focus, soft directional light raking across the surface to reveal depth, clean neutral background bokeh. No person, no text, no watermark.'\nfor P in collar cuff stitch; do\n  case $P in\n    collar) VIEW='Zoom into the collar area: the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join' ;;\n    cuff)   VIEW='Zoom into the cuff area: the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density' ;;\n    stitch) VIEW='Zoom into the cable-knit panel: the stitch structure, showing individual yarn plies and the twist of each loop' ;;\n  esac\n  dlazy gpt-image-2 \\\n    --prompt \"Macro detail shot for an e-commerce detail page. $VIEW. $COMMON\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat jpeg \\\n    --save \"docs/clothing-detail/output-sku001-$P.jpg\"\ndone\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high\n```\n\n### 延伸阅读\n\n| 要查什么 | 去哪 |\n| --- | --- |\n| 认证、多后端配置、输出结构、错误码 | [`references/provider-cli.md`](references/provider-cli.md) |\n| `gpt-image-2` 的全部可用参数 | [`references/model-flags.md`](references/model-flags.md) |\n| 统一入口的全部选项 | `node scripts/gen.mjs --help` |\n\n## 5、Prompt 模板\n\n```text\nMacro detail shot for an e-commerce detail page.\n\nZoom into [部位] of this [品类 + 颜色 + 面料] and render a photorealistic close-up\nthat fills the frame. Show [第三节表格里的取景描述].\n\nKeep the colour and stitch pattern exactly as in the source.\n\nShallow depth of field with the far edge softly out of focus,\nsoft directional light raking across the surface to reveal depth,\nclean neutral background bokeh.\n\nNo person, no text, no watermark.\n```\n\n**按问题追加的修正句**\n\n| 问题 | 追加到 prompt 末尾 |\n| --- | --- |\n| 纹理像塑料 | `Resolve individual [yarn plies / weave threads / fibre ends]; the surface must read as real textile, not plastic or CG.` |\n| 放大得不够 | `Extreme magnification: the [部位] must occupy at least 70% of the frame.` |\n| 编出了不存在的工艺 | `Do not invent any construction detail that is not visible in the source image.` |\n| 整张都很实、没有微距感 | `Only the [部位] is in focus; everything beyond [X] must fall into smooth bokeh.` |\n| 颜色变了 | `Sample the colour directly from the source image; no grading, no saturation boost.` |\n\n---\n\n## 6、执行流程\n\n1. **挑原图**：分辨率越高越好；确认目标部位清晰可见、无遮挡。\n2. **列部位清单**：一个 SKU 通常出 2~3 张（领口 + 面料 + 一个特色工艺）。\n3. **每条 prompt 只放大一个部位**，从第三节取景描述抄。\n4. **补齐三件事**：占满画面 / 浅景深 / 侧光。\n5. **`--quality high`**（不要降档）→ `--batch 2` 挑图，落盘到 `docs/clothing-detail/`。\n6. **质检**：纹理是否真实（不是塑料感）、有没有编出不存在的工艺、颜色是否一致。\n\n---\n\n## 7、常见问题\n\n| 现象 | 原因 | 处理 |\n| --- | --- | --- |\n| 纹理塑料感 | 质量档位低或原图糊 | `--quality high` + 追加解析纹理句；换高分辨率原图 |\n| 放大不够，还是半身 | 未写占比 | 追加 70% 画面占比句 |\n| 编出了原图没有的拉链/刺绣 | 模型补全 | 追加禁止编造句 |\n| 没有微距景深 | 未写景深 | 追加只有目标部位对焦的句子 |\n| 颜色比原图艳 | 自动调色 | 追加取色约束句 |\n| 三个部位挤在一张图 | 一条 prompt 写了多个部位 | 拆成多条，一条一个部位 |\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\": \"clothing-detail\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1790232932221\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\nGenerates macro e-commerce detail images from clothing photos, focusing on fabric texture, stitching, weave, and visible construction details.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dlazyai](https://clawhub.ai/user/dlazyai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nE-commerce operators, merchandisers, and creative production teams use this skill to turn garment product images into close-up detail shots for collars, cuffs, hems, buttons, zippers, embroidery, prints, weave structures, and fabric fibers.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The bundled generation runner can send prompts and images to cloud providers and supports tasks beyond this clothing-detail workflow.\n\nMitigation: Use only images suitable for the selected provider, pin or restrict the provider when possible, avoid sensitive local files, and review command parameters before execution.\n\nRisk: Low-quality, obstructed, or unclear source images can lead to unrealistic textures or invented garment construction details.\n\nMitigation: Use high-resolution source images where the target detail is visible, generate one detail area per prompt, and add explicit instructions not to invent construction details.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dlazyai/skills/clothing-detail)\n- [Provider CLI reference](references/provider-cli.md)\n- [gpt-image-2 parameter reference](references/model-flags.md)\n- [dLazy](https://dlazy.com)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, shell commands, configuration, code]\n\n**Output Format:** [Markdown guidance with inline bash commands and optional JavaScript helper scripts]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces prompts and commands for image generation; saved assets are JPEG clothing-detail images when the commands are executed.]\n\n## Skill Version(s):\n\n1.0.13 (source: frontmatter and server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 25188 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 (2756b), SKILL.md (10468b), _meta.json (135b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: clothing-detail\nversion: 1.0.12\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the fram\n\nArchive v1.0.11: 11 files, 25009 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 (2321b), SKILL.md (10468b), _meta.json (135b)\n\nArchive v1.0.10: 11 files, 25192 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 (2930b), SKILL.md (10468b), _meta.json (135b)","readmeExcerpt":"Skill: 服装细节放大图 Clothing Detail Owner: dlazyai Summary: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。 Tags: latest:1.0.19 Version history: v1.0.19 | 2026-10-10T01:46:57.263Z | user 例行版本更新 2026-10-10 v1.0.18 | 2026-10-08T01:39:56.956Z | user 例行版本更新 2026-10-08 v1.0.17 | 2026-10-04T01:40:27.426Z | user 例行版本更新 2026-10-04 v1.0.16 | 2026-10-02T05:14:00.107Z | user 例行版本更新 2026-10-02 v1.0.15 | 2026-09-30","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"dlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg"},{"language":"text","snippet":"filling the frame                      ← 特写要占满画面\nshallow depth of field with the far edge softly out of focus   ← 微距的景深特征\nsoft directional light raking across the surface to reveal depth  ← 侧光才能显出立体纹理"},{"language":"bash","snippet":"# A. 统一入口（推荐）：可切任意后端，加 --dry-run 不计费空跑\nnode scripts/gen.mjs --task clothing-detail \\\n  --prompt '<见下方 Prompt 模板>' \\\n  --images <按下表顺序> \\\n  --save output/clothing-detail-<sku>.jpg\n\n# B. 直接用 dLazy CLI（不想引入 Node 依赖时，效果等价）\ndlazy gpt-image-2 --prompt '...' --images ... --save output/clothing-detail.jpg"},{"language":"bash","snippet":"# basic call: 领口细节\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the collar area of this garment and render a photorealistic close-up filling the frame. Show the ribbed crewneck collar meeting the body panel, individual yarn plies and the twist of each loop, soft directional light raking across the surface. Keep colour and stitch pattern exactly as in the source. Shallow depth of field, clean neutral background bokeh, no person, no text.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high\n\n# complex call: 一个 SKU 批量出 3 个部位的细节图\nSRC=docs/clothing-detail/garment-flatlay.jpg\nCOMMON='Render a photorealistic macro close-up filling the frame. Keep the colour and stitch pattern exactly as in the source image. Shallow depth of field with the far edge softly out of focus, soft directional light raking across the surface to reveal depth, clean neutral background bokeh. No person, no text, no watermark.'\nfor P in collar cuff stitch; do\n  case $P in\n    collar) VIEW='Zoom into the collar area: the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join' ;;\n    cuff)   VIEW='Zoom into the cuff area: the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density' ;;\n    stitch) VIEW='Zoom into the cable-knit panel: the stitch structure, showing individual yarn plies and the twist of each loop' ;;\n  esac\n  dlazy gpt-image-2 \\\n    --prompt \"Macro detail shot for an e-commerce detail page. $VIEW. $COMMON\" \\\n    --images \"$SRC\" --size 1024x1024 --quality high --imageFormat jpeg \\\n    --save \"docs/clothing-detail/output-sku001-$P.jpg\"\ndone\n\n# 先估价不真跑\ndlazy gpt-image-2 --dry-run --prompt '...' --images a.jpg --size 1024x1024 --quality high"},{"language":"text","snippet":"Macro detail shot for an e-commerce detail page.\n\nZoom into [部位] of this [品类 + 颜色 + 面料] and render a photorealistic close-up\nthat fills the frame. Show [第三节表格里的取景描述].\n\nKeep the colour and stitch pattern exactly as in the source.\n\nShallow depth of field with the far edge softly out of focus,\nsoft directional light raking across the surface to reveal depth,\nclean neutral background bokeh.\n\nNo person, no text, no watermark."},{"language":"bash","snippet":"dlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: clothing-detail\nversion: 1.0.19\ndescription: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。\n---\n\n# clothing-detail — 服装图生成细节放大图\n\n一张服装图 → **局部微距特写**。详情页里「证明这件衣服做得好」的那几张图。\n\n为什么需要：转化率高的详情页通常有 2~3 张细节图（领口、袖口、面料纹理），但拍微距要专门的镜头和布光。本技能从常规商品图推出这些特写。\n\n---\n\n## 生成效果示例\n\n| 输入：服装图 |\n| --- |\n| <img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/garment-flatlay.jpg\" width=\"280\"> |\n| `garment-flatlay.jpg` — 军绿麻花针织毛衣平铺图，800×800 |\n\n实际执行的命令：\n\n```bash\ndlazy gpt-image-2 \\\n  --prompt 'Macro detail shot for an e-commerce detail page. Zoom into the shoulder-and-collar area of this olive-green cable-knit sweater and render a photorealistic close-up that fills the frame. Show the ribbed crewneck collar meeting the raglan-style cable panel, individual yarn plies and the twist of the cable braid, the loft of the wool fibres, and soft directional light raking across the surface to reveal depth. Keep the colour and stitch pattern exactly as in the source. Shallow depth of field with the far edge softly out of focus, clean neutral background bokeh, no person, no text, no watermark.' \\\n  --images docs/clothing-detail/garment-flatlay.jpg \\\n  --size 1024x1024 --quality high --imageFormat jpeg \\\n  --save docs/clothing-detail/example-output.jpg\n```\n\n**输出**\n\n<img src=\"https://raw.githubusercontent.com/dlazy-ai/ecommerce-skills/main/docs/clothing-detail/example-output.jpg\" width=\"320\">\n\n`example-output.jpg` — 1024×1024，60 credits。领口罗纹与麻花panel的交接、每根纱线的捻向、羊毛纤维的绒毛感都被解析出来，侧光让菱形提花的凹凸立体可见，远端落入柔和虚化。\n\n---\n\n## 1、能力边界\n\n| 能力 | 说明 |\n| --- | --- |\n| 取景部位 | 领口罗纹 / 袖口 / 下摆 / 纽扣 / 拉链 / 口袋 / 刺绣 / 印花 / 织法结构 / 面料纤维 |\n| 风格控制 | 参考图（照抄某张细节图的机位与光线）或自定义提示词 |\n| 服装类型 | 帮助模型判断哪些部位值得放大 |\n| 生成比例 | `1:1`（方图细节位）/ `3:4`（竖版详情页） |\n\n**不做**：不改颜色、织法与结构；不添加原图没有的工艺（不存在的刺绣、不存在的拉链）；不虚构面料成分。\n\n---\n\n## 2、输入素材规则\n\n生成前先自检这几条硬性约束：\n\n- 大小：**20KB ~ 15MB**\n- 分辨率：**大于 400×400**\n- 格式：**jpg / jpeg / png / webp**\n\n**输入建议**\n\n| 做法 | 说明 |\n| --- | --- |\n| ✅ 原图分辨率越高越好 | 微距是在放大原图信息，原图糊 = 细节图编 |\n| ✅ 目标部位在原图里清晰可见 | 原图里看不清的部位，输出的是模型的想象 |\n| ✅ 一次只放大一个部位 | 一张图里塞三个特写等于都不清楚 |\n| ❌ 低分辨率 / 强压缩图 | 会放大出塑料感的假纹理 |\n| ❌ 目标部位被遮挡 | 挡住的工艺只能靠编 |\n\n---\n\n## 3、取景部位 → prompt 写法\n\n| 部位 | 取景描述 |\n| --- | --- |\n| 领口罗纹 | `the ribbed crewneck collar meeting the body panel, showing rib wale spacing and the seam join` |\n| 袖口 | `the ribbed cuff and the sleeve seam, showing rib elasticity and stitch density` |\n| 下摆 | `the hem band and side seam, showing hem width and the finishing stitch` |\n| 纽扣 | `a single button and its buttonhole, showing button material, thread cross and hole finishing` |\n| 拉链 | `the zipper teeth and puller, showing tooth pitch, metal finish and the tape stitching` |\n| 刺绣 / 印花 | `the [刺绣/印花] motif filling the frame, showing thread direction / print edge sharpness and substrate texture` |\n| 织法结构 | `the [麻花/罗纹/提花] stitch structure, showing individual yarn plies and the twist of each loop` |\n| 面料纤维 | `the fabric surface at extreme magnification, showing fibre halo and weave interlacing` |\n\n*"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7c5wgeajfcfvdfb5ceemvdb984cjpd\",\n  \"slug\": \"clothing-detail\",\n  \"version\": \"1.0.19\",\n  \"publishedAt\": 1791596817263\n}"},{"path":"references/model-flags.md","content":"# `gpt-image-2` 参数清单\r\n\r\n本技能默认用的模型的完整参数。日常只需要「参数约定」里那几个，\r\n这份清单在需要用到非常规参数时再看。\r\n\r\n**CRITICAL INSTRUCTION FOR AGENT**:\r\nRun the `dlazy gpt-image-2` command to get results.\r\n\r\n```bash\r\ndlazy gpt-image-2 -h\r\n\r\nOptions:\r\n  --prompt <prompt>            Prompt\r\n  --images [images...]         Images [image: url or local path] (max 5)\r\n  --size <size>                Size [default: auto] (choices: \"1024x1024\",\r\n                               \"1536x1024\", \"1024x1536\", \"2048x2048\",\r\n                               \"2048x1152\", \"3840x2160\", \"2160x3840\", \"auto\")\r\n  --imageFormat <imageFormat>  Image Format [default: jpeg] (choices: \"jpeg\",\r\n                               \"png\", \"webp\")\r\n  --quality <quality>          Quality [default: medium] (choices: \"low\",\r\n                               \"medium\", \"high\")\r\n  --dry-run                    Print payload without executing the tool\r\n  --no-wait                    Return generateId immediately for async tasks\r\n  --timeout <seconds>          Max seconds to wait for async completion\r\n                               (default: \"1800\")\r\n  --input <jsonOrFile>         Inline JSON or @path/to/file.json — merged under\r\n                               flag values (flags win)\r\n  --save <path>                Download the result asset to this local path\r\n                               (mkdir + retry handled for you). A destination\r\n                               path — NOT a response format; for stdout shape\r\n                               use --format\r\n  --batch <n>                  Fan-out N parallel runs (cloud tools only)\r\n                               (default: \"1\")\r\n  -h, --help                   display help for command\r\n```\r\n\r\n> Any flag also accepts pipe references — `-` (auto-pick from upstream stdin), `@N` (n-th output), `@N.path` (jsonpath into output), `@*` (all primary values), `@stdin` / `@stdin:path` (whole envelope). See `dlazy --help` for details.\r\n\r\n---\r\n\r\n换其他后端时参数由 `scripts/gen.mjs` 统一翻译，见 [`provider-cli.md`](provider-cli.md)。"},{"path":"references/provider-cli.md","content":"<!-- 由 scripts/build-skills.mjs 从 shared/references/provider-cli.md 同步生成，不要直接改这里。 -->\n# 后端调用参考\n\n技能正文只写「要生成什么」。认证、计费、错误码、输出结构这些每个技能都一样的东西放在这里，\n**用到时再读**，不占技能的常驻上下文。\n\n---\n\n## 一、认证\n\n### 默认后端 dLazy\n\n```bash\ndlazy login            # 设备码流程，远程 shell 也能用，自动写入本地配置\ndlazy auth set <KEY>   # 已有 key 时直接写入\n```\n\nkey 存在用户配置目录（macOS/Linux `~/.dlazy/config.json`，Windows `%USERPROFILE%\\.dlazy\\config.json`），\n权限限本机用户。也可以每次调用用环境变量 `DLAZY_API_KEY` 传入。\n\n手动获取：登录 [dlazy.com](https://dlazy.com) → [API Key 页面](https://dlazy.com/dashboard/organization/api-key)。\nkey 按组织隔离，可随时轮换或吊销。\n\n### 其他后端\n\n本技能库不锁定单一厂商。配好任意一家的 key 即可跑：\n\n| 后端 | 环境变量 | 说明 |\n| --- | --- | --- |\n| `dlazy` | `dlazy login` 或 `DLAZY_API_KEY` | 默认，最省事 |\n| `openai` | `OPENAI_API_KEY` | 走 `/v1/images/edits` 与 `/v1/images/generations` |\n| `gemini` | `GEMINI_API_KEY` | Nano Banana 系列 |\n| `fal` | `FAL_KEY` | |\n| `replicate` | `REPLICATE_API_TOKEN` | |\n| `ark` | `ARK_API_KEY` + `ARK_MODEL` | 火山方舟，模型 ID 需按开通情况填 |\n\n选路优先级：`--provider` 参数 > `PROVIDER` 环境变量 > 第一个配了 key 的 > `dlazy`。\n\n```bash\nnode scripts/gen.mjs --doctor     # 看当前哪个后端可用\n```\n\n各后端的模型 ID 可用 `GEN_MODEL_OPENAI` / `GEN_MODEL_GEMINI` / `GEN_MODEL_FAL` /\n`GEN_MODEL_REPLICATE` / `GEN_MODEL_ARK` 覆盖。**厂商目录会变，以各家最新文档为准。**\n\n---\n\n## 二、两种调用方式\n\n### 方式 A：统一入口（推荐）\n\n```bash\nnode scripts/gen.mjs --task <技能名> --prompt '...' --images a.jpg b.jpg --save out.jpg\n```\n\n它负责：后端选路、默认尺寸档位、失败重试（429/5xx 指数退避）、落盘建目录、成本估算。\n\n```bash\nnode scripts/gen.mjs --task flat-lay --prompt '...' --dry-run   # 不调用不计费，只看要发什么\nnode scripts/gen.mjs --help\n```\n\n### 方式 B：直接用 dLazy CLI\n\n不想引入 Node 依赖时，技能正文里的 `dlazy ...` 命令可以原样执行，效果等价。\n\n```bash\nnpx @dlazy/cli@1.2.3 <command>     # 不装全局二进制\n```\n\n- CLI 源码：[github.com/dlazy-ai/cli](https://github.com/dlazy-ai/cli) · npm 包 `@dlazy/cli`\n\n---\n\n## 三、数据流向\n\n调用 dLazy 时：提示词与参数发往 `api.dlazy.com`；传入的本地图片会上传到 `files.dlazy.com`\n供模型读取；产出 URL 同样托管在 `files.dlazy.com`。这是云端生成 API 的通用形态。\n换成其他后端时，数据流向对应厂商，不经过 dLazy。\n\n---\n\n## 四、输出结构\n\n`gen.mjs`（加 `--json`）：\n\n```json\n{\n  \"ok\": true,\n  \"task\": \"flat-lay\",\n  \"provider\": \"dlazy\",\n  \"model\": \"gpt-image-2\",\n  \"files\": [\"docs/flat-lay/output-sku001.jpg\"],\n  \"texts\": [],\n  \"estimatedCredits\": 60,\n  \"elapsedMs\": 58213\n}\n```\n\ndLazy CLI 原生：\n\n```json\n{\n  \"ok\": true,\n  \"result\": {\n    \"tool\": \"gpt-image-2\",\n    \"data\": { \"urls\": [\"https://files.dlazy.com/data/ai/....jpg\"] },\n    \"savedPath\": \"docs/flat-lay/example-output.jpg\"\n  }\n}\n```\n\n加 `--no-wait` 的异步任务不返回 `data`，返回 `task: { generateId, status }`，\n用 `dlazy status <generateId> --wait` 轮询。\n\n文本类模型（如质检）产出在 `result.data.texts[0]`：\n\n```bash\ndlazy claude-sonnet-5 --prompt '...' --images x.jpg \\\n  | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"result\"][\"data\"][\"texts\"][0])'\n```\n\n---\n\n## 五、错误处理\n\n| Code | 类型 | 示例 |\n| --- | --- | --- |\n| 401 | 未授权 / 无 key | `ok: false, code: \"unauthorized\"` |\n| 501 | 缺必填参数 | `error: required option '--prompt <prompt>' not specified` |\n| 502 | 本地文件读不到 | `Error: Image file not found: ...` |\n| 503 | 余额不足 | `ok: false, code: \"insufficient_balance\"` |\n| 503 | 服务端错误 | `HTT"},{"path":"scripts/lib/tasks.json","content":"{\r\n  \"_note\": \"技能 → 默认模型与参数。dlazy 列为默认后端的模型名；其他后端走 providers.mjs 的通用映射，可用 GEN_MODEL_<PROVIDER> 覆盖。\",\r\n  \"_credits\": { \"gpt-image-2\": 60, \"seedream-5.0\": 30, \"seedream-5.0-pro\": 45, \"banana-pro\": 25, \"claude-sonnet-5\": 3 },\r\n  \"tasks\": {\r\n    \"flat-lay\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"wear-everything\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"image-fusion\":            { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"one-shot\":                { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"fission-pattern\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-detail\":             { \"model\": \"seedream-5.0-pro\", \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"creative-scene\":          { \"model\": \"banana-pro\",       \"size\": \"1024x1536\", \"format\": \"jpeg\" },\r\n    \"batch-image\":             { \"model\": \"seedream-5.0\",     \"size\": \"3:4\",       \"resolution\": \"2k\" },\r\n    \"to-3d\":                   { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-extraction\":     { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"fabric-on-body\":          { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-detail\":         { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"clothing-grass-planting\": { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"medium\", \"format\": \"jpeg\" },\r\n    \"item-selling-point\":      { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"item-change-background\":  { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"remove-watermark\":        { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"material-enhancement\":    { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"item-repair\":             { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"detect-task\":             { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"listing-optimizer\":       { \"model\": \"gpt-image-2\",      \"size\": \"1024x1024\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"cross-border-localize\":   { \"model\": \"seedream-5.0-pro\", \"size\": \"1:1\",       \"resolution\": \"2k\" },\r\n    \"brand-kit\":               { \"model\": \"gpt-image-2\",      \"size\": \"1024x1536\", \"quality\": \"high\",   \"format\": \"jpeg\" },\r\n    \"platform-compliance\":     { \"model\": \"claude-sonnet-5\",  \"text\": true },\r\n    \"main-image-video\":        { \"model\": \"$DLAZY_VIDEO_MODEL\", \"video\": true },\r\n    \"product-"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。 Skill: 服装细节放大图 Clothing Detail Owner: dlazyai Summary: 服装工艺细节放大图。服装图 → 面料纹理、走线、织法的微距特写。当用户说「细节图」「特写」「面料放大」「工艺展示」「近景细节」时使用。 Tags: latest:1.0.19 Version history: v1.0.19 | 2026-10-10T01:46:57.263Z | user 例行版本更新 2026-10-10 v1.0.18 | 2026-10-08T01:39:56.956Z | user 例行版本更新 2026-10-08 v1.0.17 | 2026-10-04T01:40:27.426Z | user 例行版本更新 2026-10-04 v1.0.16 | 2026-10-02T05:14:00.107Z | user 例行版本更新 2026-10-02 v1.0.15 | 2026-09-30","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1068,"uniquenessScore":52,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T22:08:38.348Z","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-10T22:08:38.348Z","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-11T00:35:10.491Z","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"}]}}}