linkfox-aigc-imagegen-product
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese商品图生成
Product Image Generation
统一入口:非服饰类商品(美妆、数码、家居、食品等)的全类型电商出图能力。单张直出 & 套图编排都从这一个 skill 进入。
Unified Entry: Full-category e-commerce image generation capability for non-apparel products (cosmetics, digital products, home goods, food, etc.). Both single-image direct generation & image set orchestration are accessed through this skill.
入口路由
Entry Routing
| 条件 | 路径 | 操作 |
|---|---|---|
| 只要一张特定类型的图(如"做一张白底图") | 单张直出 | 确定 type → Read 对应 |
| 要多张 / 多类型 / 套图(如"做一套图""出5张图") | 套图编排 | Read |
| Condition | Path | Operation |
|---|---|---|
| Only one specific type of image is needed (e.g., "create a white background image") | Single-image Direct Generation | Confirm type → Read corresponding |
| Multiple images / multiple types / image sets are needed (e.g., "create an image set" "generate 5 images") | Image Set Orchestration | Read |
类型路由表
Type Routing Table
| type | 名称 | 与卖点关联 | 是否有画面描述 | 默认比例 | 详情 reference |
|---|---|---|---|---|---|
| WHITE_BG | 白底图 | 否 | 否 | 1:1 | |
| SCENE | 场景图 | 是 | 是 | 1:1 | |
| CLOSE_UP | 特写图 | 是 | 是 | 1:1 | |
| SELLING_POINT | 卖点图 | 是 | 是 | 1:1 | |
| PREMIUM_APLUS | 高级A+图 | 是 | 是 | 1464:600 | |
| STANDARD_APLUS | 普通A+图 | 是 | 是 | 970:600 | |
| PHONE_APLUS | 手机A+图 | 是 | 是 | 600:450 | |
确定 type 后,必须 Read 对应的 type reference 文件获取该类型的步骤 2 差异逻辑和提示词模板,禁止跳过。
| type | Name | Associated with Selling Points | Has Scene Description | Default Ratio | Details Reference |
|---|---|---|---|---|---|
| WHITE_BG | White Background Image | No | No | 1:1 | |
| SCENE | Scene Image | Yes | Yes | 1:1 | |
| CLOSE_UP | Close-up Image | Yes | Yes | 1:1 | |
| SELLING_POINT | Selling Point Image | Yes | Yes | 1:1 | |
| PREMIUM_APLUS | Premium A+ Image | Yes | Yes | 1464:600 | |
| STANDARD_APLUS | Standard A+ Image | Yes | Yes | 970:600 | |
| PHONE_APLUS | Mobile A+ Image | Yes | Yes | 600:450 | |
After confirming the type, must Read the corresponding type reference file to obtain the step 2 differential logic and prompt template for that type, prohibit skipping.
不适用
Inapplicable Scenarios
- 服饰 / 模特类图片(上装/下装/连衣裙/外套/鞋帽等)→ 走 系列。
linkfox-aigc-imagegen-cloth - 纯图片编辑操作(换背景、去水印、换角度等已有明确创意方向的操作)→ 走 。
linkfox-aigc-imagegen - 纯文字生成 → 。
linkfox-aigc-textgen - 视频生成 → 。
linkfox-aigc-videogen
- Apparel / model-related images (tops/bottoms/dresses/outerwear/shoes & hats, etc.) → Use series.
linkfox-aigc-imagegen-cloth - Pure image editing operations (background replacement, watermark removal, angle change, etc. with clear creative directions) → Use .
linkfox-aigc-imagegen - Pure text generation → .
linkfox-aigc-textgen - Video generation → .
linkfox-aigc-videogen
共享流水线
Shared Pipeline
所有类型都走同一条 3 步流水线,差异部分由各 type reference 定义。
All types follow the same 3-step pipeline, with differences defined by each type reference.
步骤 1:校验图片 URL 可访问性(所有类型通用)
Step 1: Verify Image URL Accessibility (Universal for All Types)
- 输入:
imageUrls - 空数组护栏(强制):若 为空数组 / 缺失 / 全部无效,立即停止,不得带空图调下游。优先从上下文(用户本轮/历史上传的原始图片路径)补齐;仍无法补齐时如实向用户报错并请求重新上传,禁止带空
imageUrls继续执行。imageUrls - 操作:逐项检查 中的值(保持原顺序):已是公开 URL(http/https 开头)→ 直接透传;本地文件路径(非 http/https)→ 调
imageUrls上传获得公开 URL 后替换。linkfox-file-upload - 输出:(全部为公开可访问的 HTTPS URL)
imageUrls
- Input:
imageUrls - Empty Array Guard (Mandatory): If is an empty array / missing / all invalid, stop immediately, do not call downstream with empty images. Prioritize supplementing from context (original image paths uploaded by the user in current/historical rounds); if still unable to supplement, truthfully report an error to the user and request re-upload, prohibit continuing execution with empty
imageUrls.imageUrls - Operation: Check each value in one by one (maintain original order): if it is already a public URL (starts with http/https) → directly pass through; if it is a local file path (non http/https) → call
imageUrlsto upload and obtain a public URL for replacement.linkfox-file-upload - Output: (all are publicly accessible HTTPS URLs)
imageUrls
步骤 2:构造最终 prompt(差异部分见各 type reference)
Step 2: Construct Final Prompt (Differences See Each Type Reference)
各类型的步骤 2 逻辑不同(是否调 textgen、用哪个模型、是否做敏感词规避等),详见已 Read 的 。
references/types/<type>.md白底图静态直出约束(WHITE_BG):用构建 imagegen 参数文件,脚本会自动从scripts/build_imagegen_prompt.py --type WHITE_BG的references/types/white-bg.md代码块提取白底图静态正文作为最终 prompt。正文较长,一律交脚本读取,不要手动复制或经 shell 变量传递。texttextgen 链式调用约束(适用于除白底图外的所有类型):凡需调的类型,必须使用本 skill 的linkfox-aigc-textgen辅助脚本构建 textgen 参数文件(脚本自动完成模板读取、占位符填充、模型/thinkingLevel 设置、敏感词规避指令追加),然后按 textgen SKILL.md 的链式调用方式执行。build_textgen_params.py套图强制走 pipeline 三阶段:套图路径用跑 plan / dispatch / summary 三阶段,agent 按顺序发 3 个 Bash;并发由 skill 层 dispatch 用scripts/run_collection_pipeline.py完成,agent 自己不并发:ThreadPoolExecutor
写--phase plan/image-plan.json,stdout 直接打 markdown 表格 + 1 行 status JSON(含collection-state.json/specs[]/run_one_task_script/state_file)total- 用户确认后,agent 只发 1 个 dispatch Bash:
;dispatch 内部用python <本skill根>/scripts/run_collection_pipeline.py --phase dispatch --state <state_file>并发跑ThreadPoolExecutor,每个子任务落run_one_task.py --index 1..N片段;dispatch 自身 stdout 不 emittask-result-<id>.json,仅末尾 1 行Saved full response供 agent 内部解析(这条 Bash 不渲染图,是正常的){"status":"dispatch_complete",...} 读片段 → stdout 打末尾 markdown 明细(每张成功图自带--phase summary --state <state_file>内联引用,前端 markdown 渲染器据此渲染整组图)+ 1 行 status JSON;同时合并写collection-asset-manifest.json禁止 Agent 手工 S1 或 Read S0~S3 全文;禁止用户确认后自己拆 N 个 Bash 跑(旧协议;现在并发已在 skill 层完成,自己并发只会重复出图);禁止转发 summary markdown 时把run_one_task.py行剥掉(整组图就靠这些行渲染);禁止在 summary 之外另贴![]()(与 markdownSaved full response: [...]双重渲染)。下方 bash 单步链路仅适用于单张直出。![]()路径铁律:本链路横跨两个 skill 目录(构参脚本属本 skill,生文与注参脚本属),当前工作目录不固定,所有脚本一律用绝对路径调用,不要用裸linkfox-aigc-textgen相对路径(相对路径会指向错误目录导致执行失败)。其中scripts/...= 本 SKILL.md 所在目录的绝对路径;<本skill根目录>通过<textgen根目录>解析其 SKILL.md 所在目录的绝对路径取得。skill:linkfox-aigc-textgen
- 构参(本 skill):
python <本skill根目录>/scripts/build_textgen_params.py --type <TYPE> ... --out <textgen_params.json>- 生文(textgen skill):
——PROMPT=$(python <textgen根目录>/scripts/aigc_textgen.py --stdin --content-only < <textgen_params.json>)输出单行 content 捕获进变量(换行压平为--content-only、下游自动还原的机制见 textgen SKILL.md)。⏎- 注参(步骤 3,用
内联):用jq把jq内联拼进下游 imagegen 参数 JSON,再交$PROMPT出图。linkfox-aigc-imagegenbashPROMPT=$(python <textgen根目录>/scripts/aigc_textgen.py --stdin --content-only < <textgen_params.json>) PARAMS=$(jq -nc --arg p "$PROMPT" --argjson imgs '<步骤1的URL JSON数组>' \ '{prompt:$p, imageUrls:$imgs, provider:"<provider>", outputNum:1, aspectRatio:"<ratio>", resolution:"<resolution>"}') # 然后按 linkfox-aigc-imagegen SKILL.md 的调用方式把 $PARAMS 传入出图禁止手动用 Write 工具构造 textgen 参数文件(必须经)、用build_textgen_params.py抽取原始 content(会重新引入真实换行符破坏拼接)、或直接写 Python 调 API 绕过此链路。jq -r
The step 2 logic varies by type (whether to call textgen, which model to use, whether to avoid sensitive words, etc.), see the Read for details.
references/types/<type>.mdWhite Background Image Static Direct Generation Constraint (WHITE_BG): Useto build the imagegen parameter file. The script will automatically extract the white background image static text from thescripts/build_imagegen_prompt.py --type WHITE_BGcode block intextas the final prompt. The text is long, always let the script read it, do not manually copy or pass via shell variables.references/types/white-bg.mdTextgen Chain Call Constraint (Applicable to All Types Except White Background Image): For types that need to call, must use this skill'slinkfox-aigc-textgenauxiliary script to build the textgen parameter file (the script automatically completes template reading, placeholder filling, model/thinkingLevel setting, sensitive word avoidance instruction appending), then execute according to the chain call method in textgen SKILL.md.build_textgen_params.pyImage Set Must Go Through Pipeline Three Phases: Useto run plan / dispatch / summary three phases for image set path, agent sends 3 Bash commands in sequence; concurrency is completed by skill layer dispatch usingscripts/run_collection_pipeline.py, agent itself does not run concurrently:ThreadPoolExecutor
writes--phase plan/image-plan.json, stdout directly outputs markdown table + 1 line of status JSON (includingcollection-state.json/specs[]/run_one_task_script/state_file)total- After user confirmation, agent only sends 1 dispatch Bash:
; dispatch internally usespython <root of this skill>/scripts/run_collection_pipeline.py --phase dispatch --state <state_file>to runThreadPoolExecutorconcurrently, each subtask outputsrun_one_task.py --index 1..Nfragment; dispatch itself does not emittask-result-<id>.jsonin stdout, only 1 lineSaved full responseat the end for agent internal parsing (this Bash does not render images, it is normal){"status":"dispatch_complete",...} reads fragments → stdout outputs final markdown details (each successful image comes with--phase summary --state <state_file>inline reference, front-end markdown renderer renders the entire set of images based on this) + 1 line of status JSON; meanwhile, it merges and writescollection-asset-manifest.jsonProhibit Agent from manually executing S1 or reading full text of S0~S3; prohibit splitting into N Bash commands to runafter user confirmation (old protocol; concurrency is now completed at skill layer, self-concurrency will only result in duplicate images); prohibit strippingrun_one_task.pylines when forwarding summary markdown (the entire set of images relies on these lines for rendering); prohibit attaching![]()outside summary (double rendering with markdownSaved full response: [...]). The following bash single-step link only applies to single-image direct generation.![]()Path Iron Rule: This link spans two skill directories (parameter construction scripts belong to this skill, text generation and parameter annotation scripts belong to), the current working directory is not fixed, all scripts must be called with absolute paths, do not use barelinkfox-aigc-textgenrelative paths (relative paths will point to wrong directories and cause execution failure). Wherescripts/...= absolute path of the directory where this SKILL.md is located;<root of this skill>is obtained by parsing the absolute path of the directory where its SKILL.md is located via<textgen root directory>.skill:linkfox-aigc-textgen
- Parameter Construction (this skill):
python <root of this skill>/scripts/build_textgen_params.py --type <TYPE> ... --out <textgen_params.json>- Text Generation (textgen skill):
——PROMPT=$(python <textgen root directory>/scripts/aigc_textgen.py --stdin --content-only < <textgen_params.json>)outputs single-line content captured into variable (line breaks are flattened to--content-only, downstream automatic restoration mechanism see textgen SKILL.md).⏎- Parameter Annotation (step 3, inline with
): Usejqto inlinejqinto downstream imagegen parameter JSON, then pass to$PROMPTfor image generation.linkfox-aigc-imagegenbashPROMPT=$(python <textgen root directory>/scripts/aigc_textgen.py --stdin --content-only < <textgen_params.json>) PARAMS=$(jq -nc --arg p "$PROMPT" --argjson imgs '<URL JSON array from step 1>' \ '{prompt:$p, imageUrls:$imgs, provider:"<provider>", outputNum:1, aspectRatio:"<ratio>", resolution:"<resolution>"}') # Then pass $PARAMS to image generation according to the calling method in linkfox-aigc-imagegen SKILL.mdProhibit manually constructing textgen parameter files with Write tool (must use), extracting original content withbuild_textgen_params.py(will reintroduce real line breaks and break splicing), or directly writing Python to call API to bypass this link.jq -r
步骤 3:调 linkfox-aigc-imagegen
出图(所有类型通用)
linkfox-aigc-imagegenStep 3: Call linkfox-aigc-imagegen
for Image Generation (Universal for All Types)
linkfox-aigc-imagegen- 输入:步骤 2 的 、步骤 1 的
prompt、imageUrls、ratio、resolutionprovider - 操作:Read 的 SKILL.md,按其调用方式执行出图脚本。传入参数:
skill:linkfox-aigc-imagegen- :步骤 2 产出的最终 prompt
prompt - :步骤 1 的全部图片 URL
imageUrls - :入参指定的模型(默认
provider)BANANA_PRO - :
aspectRatio原样透传ratio - :原样透传
resolution - :
outputNum1
- 输出:图片(后的本地路径)
Saved full response: - 单张直出交付(按类型):本 skill 单张直出场景按 §3.1 走,agent 在 imagegen Bash 完成后必须:
references/runtime/03-deliver.md-
解析 stdout 的取本地路径(成功时 1 张)
Saved full response: ["..."] -
在对话回复正文里追加 markdown 内联块:markdown
- 第 1 张 · <类型中文名>  -
类型中文名对照:SCENE→场景图 / CLOSE_UP→特写图 / SELLING_POINT→卖点图 / WHITE_BG→白底图 / PREMIUM_APLUS→高级A+图 / STANDARD_APLUS→普通A+图 / PHONE_APLUS→手机A+图
-
禁止把/
Saved full response: [...]协议原文复述进对话回复——它是 skill ↔ bridge 内部协议行,复述会让用户看到裸露的 JSON 数组路径(即"协议行裸露"故障);只读它取路径,不抄字面Saved full response: <json路径> -
禁止自行 echo 一遍字面让 bridge 再渲染——bridge 路径 A 的「任务产出」资源卡是 imagegen Bash stdout 自动触发的,agent 不要手动复制
Saved full response: -
双重渲染(markdown 内联图 + bridge「任务产出」资源卡同时呈现)是当前协议下的预期行为,不算故障
-
失败情形(stdout 是单文件)按本 SKILL.md「错误处理与失败护栏」如实告知,不追加内联图
Saved full response: <data 路径>.json
-
- Input: from step 2,
promptfrom step 1,imageUrls,ratio,resolutionprovider - Operation: Read SKILL.md of and execute image generation script according to its calling method. Pass parameters:
skill:linkfox-aigc-imagegen- : Final prompt produced in step 2
prompt - : All image URLs from step 1
imageUrls - : Model specified by input parameters (default
provider)BANANA_PRO - : Pass
aspectRatioas isratio - : Pass as is
resolution - :
outputNum1
- Output: Image (local path after )
Saved full response: - Single-image Direct Generation Delivery (By Type): For single-image direct generation scenario of this skill, follow §3.1 of . After imagegen Bash is completed, agent must:
references/runtime/03-deliver.md-
Parsein stdout to get local path (1 image when successful)
Saved full response: ["..."] -
Append markdown inline block to the conversation reply body:markdown
- Image 1 · <Chinese name of type>  -
Chinese Name Mapping: SCENE→Scene Image / CLOSE_UP→Close-up Image / SELLING_POINT→Selling Point Image / WHITE_BG→White Background Image / PREMIUM_APLUS→Premium A+ Image / STANDARD_APLUS→Standard A+ Image / PHONE_APLUS→Mobile A+ Image
-
Prohibit repeating the protocol text/
Saved full response: [...]into conversation reply — it is an internal protocol line between skill ↔ bridge, repeating it will let users see exposed JSON array paths (i.e., "protocol line exposure" fault); only read it to get the path, do not copy the literalSaved full response: <json path> -
Prohibit manually echoingliteral to let bridge render again — bridge path A's "task output" resource card is automatically triggered by imagegen Bash stdout, agent should not copy manually
Saved full response: -
Double rendering (markdown inline image + bridge "task output" resource card displayed simultaneously) is expected behavior under current protocol, not a fault
-
For failure cases (stdout issingle file), truthfully inform according to "Error Handling and Failure Guards" in this SKILL.md, do not append inline image
Saved full response: <data path>.json
-
中间产物落盘(强制)
Intermediate Product Storage (Mandatory)
所有要跨步骤复用或交付的文件一律落到会话目录 (协议见仓库 「输出文件位置」)。
<cwd>/linkfox/<YYYY-MM-DD>/<session>/{data|media}/CLAUDE.md| 产物类型 | 目录 | 获取方式 |
|---|---|---|
| 品牌基因 JSON | | |
| 套图规划 image-plan.json | | S2 确认后 |
| imageUrls 数组 | | 步骤 1 校验后 Write 到 |
| task-result-*.json | | 每个 |
| collection-asset-manifest.json | | summary phase 自动从 task-result 片段中合并 |
| 单张构参 JSON(textgen/imagegen 入参) | | |
| 结果图 | | |
DATADIR=$(python <brand-gene根目录>/scripts/save_brand_gene.py --datadir)--brand-gene-fileAll files to be reused across steps or delivered must be stored in the session directory (protocol see "Output File Location" in repository ).
<cwd>/linkfox/<YYYY-MM-DD>/<session>/{data|media}/CLAUDE.md| Product Type | Directory | Acquisition Method |
|---|---|---|
| Brand Gene JSON | | |
| Image Set Plan image-plan.json | | Append and store item by item via |
| imageUrls Array | | Write to |
| task-result-*.json | | Task result fragment stored after each |
| collection-asset-manifest.json | | Automatically merge |
| Single-image Parameter Construction JSON (textgen/imagegen input parameters) | | |
| Result Images | | Automatically stored by |
DATADIR=$(python <brand-gene root directory>/scripts/save_brand_gene.py --datadir)--brand-gene-file下游 skill 调用约定
Downstream Skill Calling Convention
本 skill 依赖下表两个下游 skill,按文档化方式调用:先 Read 对方 SKILL.md 了解其调用方式,单张直出按步骤 2/3 的链式命令、套图按 + 编排——两者都按文档以绝对路径调用下游官方脚本(这是允许的)。本 skill 自带的 / / / 等是参数构建与编排辅助脚本,可直接运行。脱离上述文档化链路自行拼调用、或直连下游 HTTP API 才是不允许的。
scripts/run_collection_pipeline.pyscripts/run_one_task.pybuild_textgen_params.pybuild_imagegen_prompt.pyrun_collection_pipeline.pyrun_one_task.py| 下游 skill | 用途 | 调用时机 |
|---|---|---|
| AI 生图 | 步骤 3(所有类型) |
| 提示词改写 | 步骤 2(除白底图外的所有类型) |
调用方式:Read 的 SKILL.md,按其中的调用方式章节执行。
skill:<skill-name>This skill relies on the two downstream skills in the table below, call according to documented methods: first Read the other party's SKILL.md to understand their calling method, single-image direct generation follows the chain commands in steps 2/3, image set follows + orchestration — both call downstream official scripts with absolute paths as documented (this is allowed). This skill's own / / / etc. are parameter construction and orchestration auxiliary scripts, which can be run directly. It is not allowed to splice calls on your own outside the above documented link, or directly connect to downstream HTTP APIs.
scripts/run_collection_pipeline.pyscripts/run_one_task.pybuild_textgen_params.pybuild_imagegen_prompt.pyrun_collection_pipeline.pyrun_one_task.py| Downstream Skill | Purpose | Calling Timing |
|---|---|---|
| AI Image Generation | Step 3 (all types) |
| Prompt Rewriting | Step 2 (all types except white background image) |
Calling Method: Read SKILL.md of and execute according to its calling method section.
skill:<skill-name>共享输入参数
Shared Input Parameters
以下参数为所有类型通用(类型特有参数见各 type reference):
| 参数 | 类型 | 默认 | 说明 |
|---|---|---|---|
| string[] | 必填 | 商品参考图 URL。步骤 1 会校验可访问性 |
| string | 随类型 | 图片比例,原样透传给 imagegen 的 |
| string | 2K | 分辨率,2K / 4K |
| string | — | 生图模型( |
The following parameters are universal for all types (type-specific parameters see each type reference):
| Parameter | Type | Default | Description |
|---|---|---|---|
| string[] | Required | Product reference image URLs. Step 1 will verify accessibility |
| string | Varies by type | Image ratio, passed directly to |
| string | 2K | Resolution, 2K / 4K |
| string | — | Image generation model ( |
错误处理与失败护栏
Error Handling and Failure Guards
skill 对业务失败也返回 exit 0(不是非零退出),所以不能靠命令退出码判断成败,必须解析 stdout。linkfox-aigc-imagegen
1. 怎么判一次调用成败
- 成功:stdout 含 (JSON 数组路径)→ 图片已落盘 media/,取路径展示。
Saved full response: ["xxx.png", ...] - 失败:stdout 含 (单个 JSON 文件路径,非数组)→ 无图片产物,需读该 JSON 查看错误详情(
Saved full response: xxx.json/errcode/errmsg)。error
2. 失败怎么处理(按类型分流)
| 失败类型 | 判断依据 | 处理 |
|---|---|---|
| 参数非法 | | 用 |
| 认证失败 | | 停止并提示用户配置 |
| 瞬时错误 | | 最多自动重试 1 次;再失败转「其它错误」 |
| 其它错误 | 配额、内容被拒、服务端 5xx、未知 errcode 等 | 不重试,如实告知用户失败原因 |
3. 硬性护栏(违反即视为故障)
- ❌ 禁止因生图失败改调任何其它 skill——本 skill 的生图路径唯一(),失败就按上表处理或上报,绝不"换一个 skill 试试"。
linkfox-aigc-imagegen - ❌ 禁止无上限重试:除"瞬时错误最多 1 次"外,同一类失败不得反复重试。
- ❌ 禁止把失败的返回体当成功继续往下走(展示空图、告诉用户"已生成")。
skill returns exit 0 for business failures (non-zero exit is not used), so cannot judge success or failure by command exit code, must parse stdout.linkfox-aigc-imagegen
1. How to Judge Success or Failure of a Call
- Success: stdout contains (JSON array path) → Image has been stored in media/, get the path to display.
Saved full response: ["xxx.png", ...] - Failure: stdout contains (single JSON file path, non-array) → No image product, need to read the JSON to view error details (
Saved full response: xxx.json/errcode/errmsg).error
2. How to Handle Failures (By Failure Type)
| Failure Type | Judgment Basis | Handling |
|---|---|---|
| Invalid Parameters | | Use |
| Authentication Failure | | Stop and prompt user to configure |
| Transient Error | | Automatically retry at most 1 time; if failed again, switch to "Other Errors" |
| Other Errors | Quota exceeded, content rejected, server 5xx, unknown errcode, etc. | Do not retry, truthfully inform user of failure reason |
3. Hard Guards (Violation is Considered a Fault)
- ❌ Prohibit calling any other skill due to image generation failure — this skill has only one image generation path (), handle or report according to the above table when failed, never "try another skill".
linkfox-aigc-imagegen - ❌ Prohibit unlimited retries: Except "transient error at most 1 time", do not retry the same type of failure repeatedly.
- ❌ Prohibit treating failed return body as success and continue (display empty image, tell user "generated successfully").
全局规则
Global Rules
模型类型规则
Model Type Rules
本 skill 支持以下 5 个生图模型,模型由 agent 层通过 参数传入;若未传入则由本 skill 向用户确认。
provider| 模型名称 | 内部代码 |
|---|---|
| LFBanana Pro | |
| Img2 | |
| LFBanana2 | |
| Linkfox-Image-1 | |
| Wan 2.7 | |
模型确认:若 为空或不在上表内,使用 让用户从上述 5 个模型中选择,用户选择后再继续执行。将 统一下发给步骤 3。
providerAskUserQuestionproviderThis skill supports the following 5 image generation models, models are passed in by agent layer via parameter; if not passed in, this skill will confirm with the user.
provider| Model Name | Internal Code |
|---|---|
| LFBanana Pro | |
| Img2 | |
| LFBanana2 | |
| Linkfox-Image-1 | |
| Wan 2.7 | |
Model Confirmation: If is empty or not in the above table, use to let user select from the above 5 models, continue execution after user selection. Distribute uniformly to step 3.
providerAskUserQuestionprovider分辨率规则
Resolution Rules
分辨率是步骤 3 的必传参数。本 skill 支持 2K、4K。
- agent 层透传了 (值为 2K 或 4K):直接使用
resolution - agent 层未透传:使用 让用户从 2K / 4K 中选择
AskUserQuestion
Resolution is a mandatory parameter for step 3. This skill supports 2K, 4K.
- Agent layer passed (value is 2K or 4K): use directly
resolution - Agent layer did not pass: use to let user select from 2K / 4K
AskUserQuestion
任务独立性声明
Task Independence Statement
套图中的每张图片都是独立任务,各任务之间互不依赖。单个类型出图失败不影响其余任务继续执行。
Each image in the image set is an independent task, and tasks do not depend on each other. Failure of image generation for a single type does not affect the continued execution of other tasks.
执行期约束
Execution Constraints
- 无上传环节:商品图片以 形式直接传递,本 skill 不涉及本地文件上传操作(步骤 1 的 URL 校验除外),禁止探查或调用任何上传脚本。
imageUrls - 计划管理工具使用规范:单张直出时不使用计划工具。套图并发出图前须为 N 张图创建任务计划(见 )。
references/runtime/02-confirm.md - 套图落盘:plan / summary 由 写盘;禁止 Agent 凭记忆 Write 整份 manifest / image-plan。
run_collection_pipeline.py - Listing 报告回写资产清单(强制):套图 summary 完成后保留 。Listing HTML 合并只用
$DATADIR/collection-asset-manifest.json。如果 manifest 中仍是本地agent-listing-result-html-skill/scripts/merge-listing-assets.mjs路径,由调用方先用media/换成公开 OSS URL 并更新 manifest,再执行 merge;本 skill 不直接上传,但不得暗示本地路径可直接写入 HTML。linkfox-file-upload
- No Upload Link: Product images are directly passed in the form of , this skill does not involve local file upload operations (except URL verification in step 1), prohibit probing or calling any upload scripts.
imageUrls - Planning Tool Usage Specification: Do not use planning tools for single-image direct generation. Must create task plans for N images before concurrent image generation for image sets (see ).
references/runtime/02-confirm.md - Image Set Storage: plan / summary are written to disk by ; prohibit Agent from writing the entire manifest / image-plan from memory via Write.
run_collection_pipeline.py - Listing Report Write-back Asset Manifest (Mandatory): Retain after image set summary is completed. Listing HTML merge only uses
$DATADIR/collection-asset-manifest.json. If the manifest still contains localagent-listing-result-html-skill/scripts/merge-listing-assets.mjspaths, the caller must first usemedia/to replace them with public OSS URLs and update the manifest, then execute merge; this skill does not upload directly, but must not imply that local paths can be directly written into HTML.linkfox-file-upload
套图编排流程(runtime,渐进 Read)
Image Set Orchestration Process (runtime, Progressive Read)
仅套图路径触发;单张直出不要 Read 本节。
| 步骤 | Read | 操作 |
|---|---|---|
| 入口 | | S0 场景判定 |
| plan | | 写 job.json → |
| 确认 → dispatch → summary | | 用户确认 → agent 发 1 个 |
维护细则见 ,运行时禁止 Read。
references/maintainer/collection/Only triggered by image set path; do not read this section for single-image direct generation.
| Step | Read | Operation |
|---|---|---|
| Entry | | S0 scenario judgment |
| plan | | Write job.json → |
| Confirm → Dispatch → Summary | | User confirmation → agent sends 1 |
Maintenance details see , prohibit reading during runtime.
references/maintainer/collection/已知局限
Known Limitations
- 白底图模板为静态指令,无品类识别与结构判定,全品类统一按"去背 + 精修 + 居中放大"处理;异形 / 透明 / 反光类产品的边缘处理可能不及预期。
- 场景图/特写图强依赖 (
linkfox-aigc-textgen)对品类与结构的判定,判定错误会直接传导到构图。GEM_3_FLASH - 卖点图/A+ 共用字典模板,靠 区分;意图填错会导致版式串型。
{layoutInfo} - 模板正文以服装品类口吻写就("面料质感 / 版型优势"),用于非服饰商品时由模型自适应。
- 多张参考图时由模型自行判断主体,复杂组合下可能误判。
- 不做敏感词改写(场景图/特写图/白底图):若卖点/场景含违禁内容,本链路不拦截,由上游或人工把关。卖点图/A+ 图在 textgen 环节含敏感词规避。
- White background image template is static instruction, no category recognition and structure judgment, all categories are uniformly processed as "background removal + retouching + centered enlargement"; edge processing of special-shaped / transparent / reflective products may not meet expectations.
- Scene images/close-up images strongly rely on category and structure judgment of (
linkfox-aigc-textgen), judgment errors will directly affect composition.GEM_3_FLASH - Selling point images/A+ images share dictionary templates, distinguished by ; wrong intent filling will lead to layout mismatch.
{layoutInfo} - Template text is written in apparel category tone ("fabric texture / version advantage"), adapted by model when used for non-apparel products.
- When multiple reference images are provided, the model judges the subject by itself, which may lead to misjudgment in complex combinations.
- No sensitive word rewriting (scene images/close-up images/white background images): if selling points/scenes contain prohibited content, this link does not intercept, controlled by upstream or manual review. Selling point images/A+ images include sensitive word avoidance in textgen phase.
解决认证和积分问题
Resolve Authentication and Credit Issues
发生以下异常情况时,采用 references/onboarding.md 引导解决问题:
When the following abnormal situations occur, guide users to solve problems using references/onboarding.md:
异常情况
Abnormal Situations
- 未配置API Key:环境变量未配置 ,也未配置
LINKFOX_AGENT_API_KEY。LINKFOXAGENT_API_KEY - 响应401或402状态码
- 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。
- API Key Not Configured: Environment variable is not configured, nor is
LINKFOX_AGENT_API_KEY.LINKFOXAGENT_API_KEY - Response Returns 401 or 402 Status Code
- Response Indicates Insufficient Credits or Balance: Message contains "insufficient credit balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/need recharge/please recharge", or similar meanings.