Generate images in CATIMATION(唯一出图入口 · 分级调度)
When the user wants one image, call the generate_image tool. When the user
wants MORE THAN ONE image, call generate_images instead. Both tools are
provided by the catimation MCP server and replace the built-in imagegen /
image_gen skill: they render inside the chat AND persist results to local files
(paths returned), the app's history page, and the ATTACHMENTS file panel.
本 skill 是出图的唯一顶层编排者。 导演/分镜/工艺 skill 由这里按任务分级选择性
加载;下游 skill 不得反过来重跑路由或重新编排本流程。
When to Use
- 用户要生成 / 画 / 渲染 / 编辑 / 重绘图片、插画、海报、图标、配图。
- 你自己回答时需要一张配图。
- 用户给了图想以图改图 / 换风格 → 走本 skill 并带上
referenceImages。
- 图层分离 / 拆图层 / 分层 / 「把前景抠出来」/「背景单独给我」/「拆成 PSD 那样的图层」
→ 也走本 skill,
generate_image 带 layerDecomposition: true(见 Steps 第 2 步)。
这不是出新图,是把一张图拆成底图 + 透明图层。
- 优先于内置 imagegen / image_gen(后者 Windows 不可用且不落盘)。
STEP 0 — 任务分级(先定级,再加载)
STEP -1:这是纯文本任务吗? 写文案、写剧本、整理文件、列清单、改一段文字 ——
这些一个 skill 都不要加载,也不进分级,直接做完交付。用户说「快点」「简单弄一下」
时同理。只有真要出图时才继续往下看分级表。
默认进入快速模式;只有命中升级条件才升级。规格/方向确认过一次就不再重复问,
自检做过就不再重复做。
提示词骨架(直接用下面这份,不必再去读别的 skill): 每条图片提示词按七字段
顺序拼装,英文、现在时、重要元素前置、≤120 词。丢字段就是出图不稳的直接来源。
- 主体 + 动作 ——
[char1] reaches for a brass door handle(用角色标签,别内联外貌)
- 角色引用 ——
[char1] [char2],外貌在全局段定义一次,每格只引用标签。
有参考图时标签必须绑到具体某一张,见下方「参考图绑定」
- 场景环境 —— 地点、天气、时间
- 镜头相机 ——
medium shot, eye-level, 50mm
- 光照 —— 方向 + 质感 + 色温,如
warm tungsten side-light from left, soft, 3200K
- 构图 ——
rule of thirds, subject at left intersection, shallow DoF on background
- 风格情绪 —— 画风、色板、情绪基调
画质要求写成正向(sharp focus, correct anatomy, five clear fingers),而不是堆
「不要…」清单;只有目标模型有独立负向字段且确需时才补负向。空洞形容词
(beautiful / amazing)单独出现不算数,必须配具体描述。
参考图绑定(有参考图就必写,与视频侧同一套纪律): 参考图按位置认人 ——
referenceImages 里的第 N 张就是 reference image N。本 app 保证这个顺序原样送达:
不去重、不静默丢弃、并发上传也按输入序排列。所以角色标签必须绑到序号,
只写 [char1] 而不说它是哪张图里的人,多人多图时模型只能猜 —— 这正是「同一个人
在组图里换脸」的头号成因。两种写法按主体数量选:
- 单主体、不复用 —— 行内绑定,首次出现时写一次:
[char1] (reference image 1) reaches for a brass door handle
- 多主体或跨图复用 —— 先在提示词开头定义为主体,之后全程只用标签:
Reference image 1 defines [char1]: <2–3 个稳定静态特征>. Reference image 2 defines [char2]: <...>. 特征只挑不随镜头变的(脸型 / 发色发型 / 标志物 / 常驻配饰),
别把姿势、表情、光线这类会变的写进定义里。
四条硬规矩:
- 有几张就写几条 —— 逐份负责,一张都不许留白。 传了 N 张参考图,提示词里就要有
N 条职责说明,一条对一张,序号对得上。人物图 → 定义成主体标签;不是人物的图也
照样要有职责,写明它贡献哪一维:
Reference image 3: color palette and film grain only — do not copy its composition or subjects. 漏写哪张,模型就会自己给它安排
用途,最常见的就是把风格参考图里的人也一起画进画面。这轮确实用不上的图,要么
别传,要么明写一句 Reference image 4: not used this time. —— 别指望模型自己
看出来哪张是多余的。
- 一张参考图只定义一个出场主体。 单人设定图不要同时定义两个会同时出场的人;
有多张单人候选时先一人一图分配。同一主体的多视角(正面 / 侧面 / 全身)才可以
合并到同一个标签。
- 裸 asset ID 严禁进正文。
asset://… 只出现在 referenceImages 参数里,
提示词里一律用 [charN] 或 reference image N —— 模型关联不了无语义 ID。
- 别照抄视频侧的
@图片N。 那是 Seedance 上游认识的提示词素材引用语法,视频链路
原样发过去正好;图片模型不认识它,同样原样透传就成了一段无意义文字。图片提示词一律写
英文原形 reference image N。
第 4 字段(镜头相机)和第 6 字段(构图)不许凭记忆编术语 —— 但也不必逐张查库。
查的单位是「这个机位/运动」,不是「这条提示词」(逐张查会让一组 20 张白耗几十分钟):
- 只有用到非常规机位或运动时才查
search_cinematography_kb(dolly in、arc、
low-angle pedestal、rack focus…),拿库里的权威写法;medium shot, eye-level, 50mm
这类常规组合不查。
- 一个机位查一次,同一任务内直接复用;只有它是关键设计、或第一版措辞含糊时,才追加
一次 critique/fix 对照。整组的查库次数是个位数,不是张数的三倍。
- 查到什么就原样写什么,不要译成中文。
rack focus、low-angle、deep focus
是模型训练时见到的确切词形;提示词整体是中文也照样保留这些英文原词。
做动画风格时按同样口径用 query_sakuga_dataset 拿技法标签(smears、
impact_frames、background_animation…)与作画/studio 归属。工具不可用时退回联网
检索,并在交付里说明这条未经库校准。
需要字段边界、负向清单、完整范例时再读 director-prompt-engineering;
骨架够用的任务不要读它 —— 多一次文件读取就是多一个来回。
角色要复用时才载角色链。 判据是这个人还要再出现(组图、系列、同一个人跨会话
再出、或用户给了人物参考图)—— 只有这时才载下面两个;单张一次性的人物图不载:
director-anchor-extraction-quality —— 有参考图时先把它提成 Face / Build /
Outfit / Markers 四段锚点。锚点不足 40 词就是形象漂移的根因,相似角色还要写出
相对差异(「A 比 B 高约 10cm」),被遮挡的部位标 [inferred]。
director-character-consistency —— 跨图锁死发型 / 服装 / 道具,肤色用相对描述
而非绝对色值。组图里每一张都要带上完整锚点,不能只在第一张写。
一次性、画面里没人的配图(图标、纹理、风景、抽象背景)不加载这条链。多格反复重描
外貌导致微漂移、想省 token 时,再按需看 director-structured-captioning
(HoloCine 结构,用 [char1] 标签引用而不重描外貌)。
跨任务一致性靠人像库,不靠记忆。 角色链只管「这一批图里不漂」;「下个会话还是同一个人」
要靠 catimation-portrait-library。判据:这个角色会不会再出现第二次? 会 → 出完图就
add_to_portrait_library 把 Face / Build / Outfit / Markers 锚点和用户选定的主锚图存成
asset://assetId,下次 list_portrait_library 找回再传进 referenceImages,别凭聊天记录重新
描述。用户说「还是上次那个人」时先查库,查不到再问,别自己重画。一次性的路人、配角不必入库。
| 模式 |
典型请求 |
自选技法预算 |
默认动作 |
| 快速 |
一次性配图、图标、简单插画、明确的单图请求 |
0 个 —— 入口 + 底座就够 |
按七字段写 prompt 生成,四项验收自检 |
| 标准 |
带风格目标/参考图/人物的单图 |
2–3 个对症技法 |
按症状表挑技法再写 prompt |
| 专业 |
复杂构图与光影、系列一致性、参考复刻、角色锚点 |
3–4 个对症技法,另必载 director-orchestrator |
13 维按需展开 |
| 制片 |
电影/分镜项目的角色卡、场景卡、逐镜出图 |
按 film-studio 阶段加载 |
过资产门,锚点逐字下传 |
底座不占技法名额。 catimation-portrait-library(角色会复用就载)与角色链
(画面里有需要复用的人就载)是自动触发的底座,不是「对症技法」;上表限的是自选
技法数量。一张带人物的标准图同时载入底座 + 角色链 + 2 个技法是正常的,不算超预算。
七字段骨架已内联在上面,快速模式一个文件都不用额外读。
升级条件: ① 明确的风格复刻/真实作品·品牌·时代参考;② 系列/组图/角色一致性;
③ 复杂镜头设计(构图·打光·调色多维协同);④ 制片流程内的出图任务。超预算加载
必须能说出具体风险。方向开放(「更高级/更有电影感/给我选项」)时先载入
catimation-brainstorm 用 ask_user 弹一张选项卡定向,别自己猜。
标准模式症状表(浏览 ~/.agents/skills/,plain-text 名称按需加载 2–3 个):
| 症状 / 任务信号 |
对症技法(按需挑,非必载) |
| 人物假/塑料/空洞 |
storyboard-live-character-realism |
| 画面平/像壁纸/没纵深 |
storyboard-foreground-occlusion · storyboard-pseudo-perspective |
| 光平/糖水/塑料高光 |
storyboard-light-reconstruction |
| 色调跑偏/要 HEX 色卡 |
storyboard-color-grading-control |
| 风格不像/系列不统一 |
director-style-consistency |
| 多格反复重描外貌/外观微漂移/想省 token |
director-structured-captioning |
| 提到真实电影/导演/品牌/时代 |
codex-research-grounded-prompting(先查证再落笔) |
| 涉敏感/合规内容 |
storyboard-negative-control |
Steps
- Turn the request into one clear, descriptive prompt. 按 STEP 0 内联的七字段骨架
拼装(主体动作 → 角色引用 → 场景 → 镜头相机 → 光照 → 构图 →
风格情绪),不要凭记忆随手写。画面里有需要复用的人物时,角色引用那一段用角色链
提出来的 Face / Build / Outfit / Markers 锚点原文,组图的每一张都要带全。
标准及以上模式再按 STEP 0 把对症技法折进 prompt(物理/可复现参数优先于情绪
形容词,默认只写正向提示词)。
- If the user asks for exactly ONE image, call
generate_image with:
prompt (required): the description from step 1.
model (optional): rendering channel override. Omit it to honor the
user's channel picker in the chat composer (default 腾讯 2.6-s). Only set it when you
have a concrete reason — a consistent 组图 series (→ wan2.7-image-pro) or a
channel the user explicitly names this turn.
ratio (optional): aspect ratio, e.g. 1:1, 16:9, 9:16, 4:3, 3:2.
Omit or auto lets the model decide.
resolution (optional): clarity tier — prefer 2K by default. Use 1K
only when the user asks for fast/cheap/draft; use 4K only when the user
explicitly asks for print/ultra-detail/4K.
quality (optional): auto/low/medium/high; 2.5/2.6(官转 flare/sunburst 与
腾讯 og-v2.5/2.6)另有 xhigh/max. Prefer high on 2.5 (auto drifts cost).
transparentBackground (optional, 2.5/2.6 / NovelAI V5 only:官转 flare/sunburst 或腾讯
custom-model-og-v2.5/2.6-f/-s): true 出带 alpha 的透明底 PNG——用户要 透明底 / 贴纸 /
logo / 素材 / 「不要背景」时用,并显式传一条支持透明底的 model。其它渠道忽略此参数照常出
不透明底;这不是图层分离(那是 layerDecomposition)。
maskImage (optional, gpt-image-2 / 2.5 / 2.6 only,含官转与腾讯 og-v2.5 / og-v2.6): 局部重绘(inpainting /
擦除)遮罩,本地路径或 URL。带 alpha 的 PNG,alpha=0 处 = 允许重绘;尺寸须与
referenceImages[0] 一致(只作用于第一张),<4MB。用法:referenceImages: [原图] +
maskImage + 显式 model;prompt 先写透明区域里的那一个改动,再列必须保留的部分——
mask 是 prompt-guided,不是像素级硬约束。灯箱「擦除」会附 <原图名>.mask.png,即此参数,
并点名用户当前选的那条渠道(官转 / 腾讯 2.5 / 2.6);其它渠道没有 mask 字段,传了会被拒
(不会静默重画整张)。
modelParams (optional, 悠船 youchuan-* / NovelAI nai-diffusion-* only,别家忽略): 悠船旋钮(hd 原生 2K /
quality / chaos / stylize / raw / iw / sref / sw / seed / no)。默认一个都
别传;只有用户明说「更疯 / 风格化拉高 / 关掉 2K / 固定 seed / 排除某元素」才设对应项。
越界值会被拒绝而不是截断(按次计费);NovelAI 的键见工具说明。
GIF / SVG(output_format 等,型号见工具说明)仅 2.6 官转与腾讯 2.6 能出,文生图一张,别家被拒。
count (optional): number of images from THIS one prompt (default 1). Two
different meanings, pick by what the user wants:
- consistent 组图 series —
model: 'wan2.7-image-pro' + count 2–12
(same character/subject across frames, e.g. 同一只猫的四季).
- independent variations (原生多图) —
count 2–4 on the OpenAI 官转
channels gpt-image-{2.5,2.6}-{flare,sunburst} / gpt-image-2
(and 腾讯 og-v2 / og-v2.5 / og-v2.6, 文生图; NovelAI 1–4), or 2–6 on qwen-image-3.0-pro. ONE
request returns count variants of the same prompt (文生图与改图都行).
官转按 token 每张计费,count: 4 ≈ 单张 4 倍 —— 用户要「几个方案挑一挑」
时才加,别默认给多张。
Other channels (2.5 -all / vip / 腾讯 image2 / nano / seedream) ignore count
(always 1). For several unrelated images, use generate_images (one prompt
each) instead.
referenceImages (optional but important): array of local file paths
or data/http URLs for image-to-image / editing. If the user gave you any
image material, you MUST reuse it here (see "Reference images" below).
layerDecomposition (optional, 图层分离专用): set true 时这一次不是出新图,
而是把一张输入图拆成 1 张底图 + 最多 16 张带透明通道的 PNG 图层。见下方
「图层分离」一节的硬约束——四条全部由工具前置校验,违反会被直接拒掉而不是静默降级。
- If the user asks for TWO OR MORE images, call
generate_images ONCE with:
prompts (required): one prompt per requested image. If the user asks for
N images, provide exactly N prompts.
- shared
model (optional, same choices as above), ratio, resolution,
quality, and referenceImages when appropriate.
- Do not spawn subagents and do not call
generate_image one-by-one.
generate_images performs the parallel fan-out internally and returns one
combined result.
- The tool returns a short text result that begins with
✅ generate_image DONE
or ✅ generate_images DONE,
names the 📁 SAVED FOLDER, lists the saved FILES:, and ends with a compact
{ ok, count, model, historyId, paths, dir } JSON line (plus one
resource_link per file). A successful return means the task is complete —
the image is already shown to the user and saved to history + the file panel.
You do not need to embed, re-describe, or base64 the pixels. Just confirm
briefly in the user's language and cite the saved path(s) when relevant.
- 交付优先,然后自检(deliver first, then QA)。
A
✅ DONE return means the image is ALREADY rendered in the chat.
- 第一步永远是交付:先用一句话向用户确认(图已出 + 保存路径),再做任何
自检。用户看不到工具调用——先闷头质检再回话,在用户眼里就是「卡死」。
- 看图上限(上下文保护,与工具 banner 一致):主 agent 直接
view_image 最多
5 张——再多会注入数 MB base64 直接撑爆线程。快速模式若
画面简单、无人物,可以只核对 DONE banner 不看图。
- 超过 5 张别放弃看,改走 catimation-subagents:并发调
understand_document
(它就是看图那条路,走 qwen 返回文本,图不进主上下文),结论落成
<图名>.vision.json / .md 旁挂在图旁边,下次直接读文本不重看。组图/系列这样
能张张都看,而不是「看代表性几张然后猜其余」——那是拿信息换预算。看完还要接着
改提示词重生成时才升级到子代理。
然后过一遍四项验收清单:
- ① 符合用户要求:主体 / 数量 / 画幅比例 / 文字内容 / 明确指定的元素是否都对上;
用户给了
referenceImages 时是否真的体现了参考(而非从零另画)。
- ② 质量合理:无多/缺手指与肢体、无崩脸、无乱码文字、无明显伪影/拼接错位;
分辨率与清晰度匹配用途。
- ③ 风格一致:与用户指定风格一致;系列/组图内各帧画风、色调、角色外观前后一致;
若项目有角色锚点 / 圣经(character_bible)或既定风格,新图须与之吻合。
- ④ 过本级门:标准及以上时,对症技法的落地证据是否出现在 prompt 里;
角色身份是否使用用户选定的主锚(大头照+全身照、多视图板或其它确认资产;
多套候选拿不准时先询问);
制片流程中是否满足
film-studio 的资产门。快速模式只查 ①–③。
- 若任一项不达标:先告诉用户哪里不对、准备怎么改,再带改进后的提示词重生成
(保留可用部分时把上一版回传为
referenceImages 做图生图),再复检。最多迭代
2–3 次即收敛——别在边角小瑕疵上死磕,每次重生成都花钱。
- You still do NOT need
query_history to find an image you just generated,
and do NOT shell out (dir/ls/where/find/Get-ChildItem) to hunt for
the file — the path is already in the return; view_image that path directly.
Choosing a model (user's composer picker is the default; you may override)
The model param is an optional override. By default (omit it) generation runs
on the channel the user picked in the chat composer (Flare / Sunburst / All 2.5 /
VIP / Image2 / 腾讯 / Nano2 / Nano2.1 / 万相 / 千问 / 悠船 / NovelAI / Seedream; default 腾讯 2.6-s) — 各渠道共用
ratio × resolution × quality(Seedream 仅 1K/2K 无 quality; gpt-image-2.5-all 把尺寸
写进 prompt). Omit model for ordinary requests. Set it only with a concrete reason:
gpt-image-2.5-flare — flare / 速度优先 / 2.5 文生图 / 透明底. ~20s,同价取代 gpt-image-2; quality 默认 high,另有 xhigh/max; 支持 transparentBackground(2.5 家族独有,含下面腾讯两条).
gpt-image-2.5-sunburst — sunburst / 画质优先 / 2.5 改图 / 透明底. ~40s,同价更锐; 也支持 transparentBackground.
gpt-image-2.6-flare / gpt-image-2.6-sunburst — 官转 2.6(可走平台额度),取向与能力同上两条。
gpt-image-2.5-all — all / 网页逆向 / $0.03. 尺寸写进 prompt,不发 size/quality.
gpt-image-2-vip — 仅用户说 官逆/vip 时. 不要当默认,也不要编 2.5 vip 渠道.
gpt-image-2 — 仅用户点名旧官转/gpt-image-2. 日常改用 flare/sunburst.
wan2.7-image-pro (阿里万相 2.7 pro) — pick when the user says 万相 /
wanxiang / wan / 通义万相, OR when they want a consistent multi-image 组图
series (e.g. "同一只猫的四季组图,前后一致"). For a 组图 series, call
generate_image with model: 'wan2.7-image-pro' and count = how many frames
(2–12) — it returns one front-to-back-consistent set from a single prompt
(do NOT use generate_images, which makes unrelated images). Wan excels at
超清文生图、图像编辑、组图; it also supports 4K (text-to-image only —
editing/组图 cap at 2K).
gemini-3.1-flash-image (Nano Banana 2) — pick when the user says nano /
nano2 / nano banana / gemini / 谷歌. 谷歌 Gemini 原生端点,出图快(~15s)、支持
超多宽高比与 4K,中文/文字与一致性也不错。
gemini-nano-banana-2.1 (Nano Banana 2.1) — user says nano 2.1 / 新版 nano.
Nano2 升级版:画质、图中文字、多轮改图更稳;仅 1K/2K/4K(无 0.5K)。只说 nano 时仍用 Nano2。
doubao-seedream-5-0-pro-260628 (火山豆包 Seedream 5.0 Pro) — pick when the
user says seedream / 即梦 / 豆包 / seedream 5 / sd5, OR when the request is a
multi-reference fusion(把多张参考图的角色+场景+风格融进一张图,最多 10 张
参考图,这是它的强项), OR when the user wants 图层分离(唯一支持的渠道,
见「图层分离」一节). 注意:普通出图仅单图(count 无效)、分辨率只有 1K/2K
(无 4K)、无 quality 轴;要 4K 或组图时换别的渠道。
custom-imagemodel-gt (腾讯 image2) — pick when the user says 腾讯 / tencent /
image2 腾讯. 快(~30s),网关已关水印。
custom-model-og-v2 (腾讯 image2 fast) — pick when the user says 便宜 / 快 /
image2 fast / og. 与腾讯 image2 能力相同,但更快(~20s)、价格约 1/6、且能一次
出多张。用户没有特别偏好而只是想省钱或求快时,这条优先于 custom-imagemodel-gt。
custom-model-og-v{2.5,2.6}-{f,s} (腾讯 2.5 / 2.6 Flare / Sunburst) — pick when the user says 腾讯 2.5 / 2.6 /
腾讯 flare / 腾讯 sunburst, or wants 2.5 但走平台额度. 与官转同模型、不同线:og 协议、
五档 quality 默认 high、count 1–4(文生图);transparentBackground 与 maskImage 同样支持
(别为透明底或擦除跳回官转)。2.5 与 image2 fast 同价;2.6 低档 token 约 2.5 的 4 倍(high 档接近),
擦除也一次做对、别无谓重试。默认渠道是 2.6-s,别擅自降到 2.5。
qwen-image-3.0-pro (阿里通义千问 Image 3.0 Pro) — pick when the user says
千问 / qwen / qwen image. 一次可出 1–6 张,参考图最多 3 张(传更多会被拒绝,
不是截断——需要最多 10 张时改用 Seedream 5.0 Pro)。上游可能改写请求尺寸,
所以别向用户承诺确切像素;负向提示词会被网关丢弃,要压画质问题写进正向提示词。
youchuan-v8.2 / youchuan-v8.2-turbo (悠船 Midjourney V8.2 快速 / 极速) — pick when
the user says Midjourney / MJ / 悠船。同一模型两档速度(快速 ~60s、极速 ~30s 但更贵),
一次固定出 4 张、只计一次费(count 无效);用户没说要快就用快速。ratio 支持 auto 与
任意 W:H;最多 20 张 http(s) 参考图(本地图自动上传,不收 base64);没有 resolution /
quality 轴,原生 2K 等旋钮走 modelParams(hd 默认开、计费 ×1.5)。提示词里别写
--v / --turbo / --hd 这类参数(网关会拒):版本与速度只由 model 决定。
不自动重试,失败后先告诉用户再重来。
nai-diffusion-5-full / nai-diffusion-5-curated / nai-diffusion-4-5-full / nai-diffusion-4-5-curated (NovelAI V5 / V4.5) — pick when the user says NovelAI / NAI / 动漫插画 / 多角色同框;只说 NovelAI 时用 nai-diffusion-5-full。一次出 count 张(1–4)、按张计费;referenceImages 至多 1 张(= 图生图,多给被拒);transparentBackground 仅 V5。角色提示词(modelParams.characters)、负面词、采样器等旋钮见工具说明,默认都别传,越界被拒。
- 以上渠道都接受
referenceImages(图生图 / 图像编辑)。
站点要求(已自动处理 — 无需手动切站点)
六条腾讯渠道(custom-imagemodel-gt / custom-model-og-v2 / custom-model-og-v2.5-f /
custom-model-og-v2.5-s / custom-model-og-v2.6-f / custom-model-og-v2.6-s)、wan2.7-image-pro(阿里万相 2.7 pro)、qwen-image-3.0-pro
(通义千问 Image 3.0 Pro)、youchuan-v8.2 / youchuan-v8.2-turbo(悠船)和
doubao-seedream-5-0-pro-260628(Seedream 5.0 Pro)和四条 NovelAI
都只经 Miau API 代理提供。
出图时应用会自动把这些渠道的请求固定走 Miau API 站点(无论用户当前在「API 设置」
里选了哪个站点),所以你不需要让用户手动切站点——直接调用即可。
- 唯一前提:Miau API 站点已配置 API Key。若没配,工具会返回清晰错误
「未配置『Miau API』站点的 API Key …」——这时再提醒用户到「API 设置」为 Miau API
站点填入 Key 即可。
- 其余渠道(官转 2.5/2.6 / -all / vip / gpt-image-2 / Nano2 / Nano2.1)跟随当前站点(不钉 Miau):
选 Miau 可走平台额度,选 apiyi 走 Key。不要编 2.5 vip 渠道。
只为具体理由设 model(组图 → 万相、多参考图融合 → Seedream、2.5 文生图 → flare、2.5 改图 →
sunburst、MJ/悠船 → youchuan、二次元/多角色 → NovelAI、或用户点名的渠道)。Never invent a model name.
Reference images — reuse the user's material (important)
If the user provides ANY image material, treat it as a reference and pass it in
referenceImages (image-to-image) instead of doing text-to-image. Look for:
- Paths listed in the prompt under
[Attached files at these local paths: …]
or [Referenced files at these local paths: …] — these are the files the
user attached/@-mentioned in chat. Pass the image ones as referenceImages.
- The user pointing at an image with language like "按这张图 / 参考这张 /
基于这张 / 用这张做 / edit this / make a variation of this / 换成…风格".
- An image the user just generated in this thread that they now want changed.
Rules:
- Be proactive: when material is present and the request is plausibly about it,
reuse it. Do not silently drop the reference and generate from scratch.
- You can pass MULTIPLE reference images — you are not limited to one.
referenceImages is an array: include every relevant image the user gave
(e.g. a character sheet + a background, several angles, a subject + a style
reference). Pass all of them together so the model can combine/condition on
the whole set, not just the first.
- Pass the local file path(s) directly. The tool sends the original reference
bytes and does not resize or recompress them automatically.
- If the provider rejects the reference payload with HTTP 413 / 文件大小超过限制,
load
ffmpeg-win, create smaller derivative copies without overwriting the
originals, then retry once with the derivative paths.
- If you are unsure whether the user wants the reference followed, prefer reusing
it and say briefly that you based it on their image(s).
图层分离(layerDecomposition)
把一张图拆成 1 张底图 + 最多 16 张带透明通道的 PNG 图层,逐层带叠放层级、
包围盒和图层名(如「HELLO白色粗体文字」「带柄红苹果」)。用户说 图层分离 / 拆图层 /
分层 / 把前景抠出来 / 背景单独给我 / 拆成 PSD 那样的图层 时用它。
四条硬约束,全部由工具前置校验——违反会返回明确错误,不会静默出一张普通图:
- 必须
model: 'doubao-seedream-5-0-pro-260628' —— 只有这一个渠道支持。
省略 model 会落到用户 composer 选的渠道上,那边不支持,请求会被拒。
- 必须且只能给一张待拆的图,放在
referenceImages[0]。没有输入图会被拒
(否则就退化成一次普通文生图)。
prompt 可以为空串 —— 这是全仓唯一一个空 prompt 才正确的地方。空 = 自动全拆
(模型自己识别主体/文字/背景/装饰),一句「图层分离」要的就是这个。要指定拆什么
才写,如 只拆出前景人物和标题文字。别为了「填满参数」而编一句提示词,
那会把自动全拆变成按你那句话拆。
ratio / count 在这里无效(层数由图的内容决定)。resolution 是另一套档位:
只有 auto / 1K / 1.5K / 2K 有意义,默认且几乎总该用 auto —— 拆分是对着
一张已有图做的,auto 让输出跟随原图的尺寸与宽高比;给固定档会让底图按那一档重出,
回来一张和你要拆的那张尺寸对不上的图。省略 resolution 就是 auto,不用特意写。
输入图有硬要求:png / jpeg,且不小于 512×512。 不满足由上游判定并原话报错,
我们不预先拦 —— 但用户给的是 webp / 小图时,先提醒一句比让他等一次失败的请求好。
计费按张,不是按次。 一次拆分出 N 张就扣 N 张的钱。复杂图可能到 17 张——先告诉用户
这一点再拆,尤其是用户说「随便试试」的时候。结果在出图页收成一张卡片(角标
「▤ N 层」),你不用额外操作。
Multiple images at once — use generate_images (important)
凡是这一轮要出不止一张图——用户说「生成 3 张」「做 4 个变体」、一组系列图、
几个不同主体,或者一个剧本/分镜里的多个镜头——都是 generate_images 一次调用,
不是循环调 generate_image。
带参考图时这条是硬性的,不是偏好。 generate_images 把共享的 referenceImages
只上传一次、所有 prompt 复用;循环调单张会把同一组参考图重读重传 N 遍(十个镜头共用
三张锚图:3 次 vs 30 次,画面结果完全一样)。批量还自带 3 路并发,参考图也只按渠道要的
形式编码一次。
- If the user asks for N images (2–20; above 20, split into batches), pass exactly N prompts to
generate_images.prompts.
- For variations, write N distinct but related prompts so the outputs are not clones.
- After
generate_images returns, confirm once and cite the saved paths; don't
re-announce each image separately.
Organize finished assets into the user's workspace (when in a project)
When you're working inside a user project/workspace folder (e.g. a film /
storyboard project, or the user asked you to organize outputs), proactively
COPY each finalized image into a tidy assets subfolder of that working
directory and give it a descriptive, ordered name — e.g.
<workspace>/assets/images/S01_hero_wide.png.
- COPY, don't move, from the saved path in the tool result, so the chat /
history / ATTACHMENTS copy stays intact.
- Group by purpose/shot and use zero-padded ordinals (
S01_, S02_…) so files
sort naturally.
- For a one-off casual generation outside any project, skip this unless asked —
the file is already saved and in history.
Common Mistakes
- 凭空编造
model 名;合法值只有上面「Choosing a model」列出的那些。用户没点名就
省略 model(交给用户在 composer 选的渠道,默认腾讯 2.6-s)。
- 用户点名某渠道却不显式传
model。
- 快速任务硬套专业流程(简单配图不需要 13 维框架);专业任务却跳过分级直接硬写。
- 图层分离踩坑:忘了同时指定
model;为「填满参数」编 prompt;拆前没告知按张计费(见上节)。
Notes
- 结果已落盘(见
paths)、进了历史页和 ATTACHMENTS 面板,无需额外保存;只有用户要它
放到指定位置时才移动/复制(项目内见上面的整理一节)。
- If
generate_image is genuinely unavailable in this session, you may fall back
to whatever image tool you do have — but generate_image is the preferred,
in-app path that actually displays and saves the result.
1---2name: catimation-image3description: >-4 FIRST-CHOICE image generator and the ONLY top-level image orchestrator in the5 CATIMATION desktop app — use INSTEAD OF the built-in imagegen / image_gen6 tool (unavailable on Windows, no persistence). Trigger7 whenever the user asks to generate / draw / render / edit / restyle an image,8 poster, or icon, or says 生成图片 / 画一张 / 配图 / 出图 / 改图 /9 图层分离. Runs the in-app generate_image tool and grades every request10 into 快速/标准/专业/制片 four tiers before loading any other skill.11metadata:12 source: https://skillmd.com/skills/2799662352/catimation-image13---1415<!-- skill-budget: pro -->1617# Generate images in CATIMATION(唯一出图入口 · 分级调度)1819When the user wants one image, call the **`generate_image`** tool. When the user20wants MORE THAN ONE image, call **`generate_images`** instead. Both tools are21provided by the `catimation` MCP server and replace the built-in imagegen /22image_gen skill: they render inside the chat AND persist results to local files23(paths returned), the app's history page, and the ATTACHMENTS file panel.2425**本 skill 是出图的唯一顶层编排者。** 导演/分镜/工艺 skill 由这里按任务分级选择性26加载;下游 skill 不得反过来重跑路由或重新编排本流程。2728## When to Use2930- 用户要生成 / 画 / 渲染 / 编辑 / 重绘图片、插画、海报、图标、配图。31- 你自己回答时需要一张配图。32- 用户给了图想以图改图 / 换风格 → 走本 skill 并带上 `referenceImages`。33- **图层分离 / 拆图层 / 分层 / 「把前景抠出来」/「背景单独给我」/「拆成 PSD 那样的图层」**34 → 也走本 skill,`generate_image` 带 `layerDecomposition: true`(见 Steps 第 2 步)。35 这不是出新图,是把一张图拆成底图 + 透明图层。36- 优先于内置 imagegen / image_gen(后者 Windows 不可用且不落盘)。3738## STEP 0 — 任务分级(先定级,再加载)3940**STEP -1:这是纯文本任务吗?** 写文案、写剧本、整理文件、列清单、改一段文字 ——41这些**一个 skill 都不要加载,也不进分级**,直接做完交付。用户说「快点」「简单弄一下」42时同理。**只有真要出图时**才继续往下看分级表。4344默认进入**快速**模式;只有命中升级条件才升级。规格/方向确认过一次就不再重复问,45自检做过就不再重复做。4647**提示词骨架(直接用下面这份,不必再去读别的 skill):** 每条图片提示词按七字段48顺序拼装,英文、现在时、重要元素前置、≤120 词。**丢字段就是出图不稳的直接来源。**49501. **主体 + 动作** —— `[char1] reaches for a brass door handle`(用角色标签,别内联外貌)512. **角色引用** —— `[char1]` `[char2]`,外貌在全局段定义一次,每格只引用标签。52 **有参考图时标签必须绑到具体某一张**,见下方「参考图绑定」533. **场景环境** —— 地点、天气、时间544. **镜头相机** —— `medium shot, eye-level, 50mm`555. **光照** —— 方向 + 质感 + 色温,如 `warm tungsten side-light from left, soft, 3200K`566. **构图** —— `rule of thirds, subject at left intersection, shallow DoF on background`577. **风格情绪** —— 画风、色板、情绪基调5859画质要求写成**正向**(`sharp focus, correct anatomy, five clear fingers`),而不是堆60「不要…」清单;只有目标模型有独立负向字段且确需时才补负向。空洞形容词61(beautiful / amazing)单独出现不算数,必须配具体描述。6263**参考图绑定(有参考图就必写,与视频侧同一套纪律):** 参考图**按位置认人** ——64`referenceImages` 里的第 N 张就是 reference image N。本 app 保证这个顺序原样送达:65不去重、不静默丢弃、并发上传也按输入序排列。所以**角色标签必须绑到序号**,66只写 `[char1]` 而不说它是哪张图里的人,多人多图时模型只能猜 —— 这正是「同一个人67在组图里换脸」的头号成因。两种写法按主体数量选:6869- **单主体、不复用** —— 行内绑定,首次出现时写一次:70 `[char1] (reference image 1) reaches for a brass door handle`71- **多主体或跨图复用** —— 先在提示词开头**定义为主体**,之后全程只用标签:72 `Reference image 1 defines [char1]: <2–3 个稳定静态特征>. Reference image 273 defines [char2]: <...>.` 特征只挑不随镜头变的(脸型 / 发色发型 / 标志物 / 常驻配饰),74 别把姿势、表情、光线这类会变的写进定义里。7576四条硬规矩:7778- **有几张就写几条 —— 逐份负责,一张都不许留白。** 传了 N 张参考图,提示词里就要有79 N 条职责说明,一条对一张,序号对得上。人物图 → 定义成主体标签;不是人物的图也80 照样要有职责,写明它贡献哪一维:`Reference image 3: color palette and film grain81 only — do not copy its composition or subjects.` **漏写哪张,模型就会自己给它安排82 用途**,最常见的就是把风格参考图里的人也一起画进画面。这轮确实用不上的图,要么83 别传,要么明写一句 `Reference image 4: not used this time.` —— 别指望模型自己84 看出来哪张是多余的。85- **一张参考图只定义一个出场主体。** 单人设定图不要同时定义两个会同时出场的人;86 有多张单人候选时先一人一图分配。同一主体的多视角(正面 / 侧面 / 全身)才可以87 合并到同一个标签。88- **裸 asset ID 严禁进正文。** `asset://…` 只出现在 `referenceImages` 参数里,89 提示词里一律用 `[charN]` 或 `reference image N` —— 模型关联不了无语义 ID。90- **别照抄视频侧的 `@图片N`。** 那是 Seedance 上游认识的提示词素材引用语法,视频链路91 原样发过去正好;图片模型不认识它,同样原样透传就成了一段无意义文字。图片提示词一律写92 英文原形 `reference image N`。9394**第 4 字段(镜头相机)和第 6 字段(构图)不许凭记忆编术语 —— 但也不必逐张查库。**95查的单位是「这个机位/运动」,不是「这条提示词」(逐张查会让一组 20 张白耗几十分钟):9697- **只有用到非常规机位或运动时才查** `search_cinematography_kb`(`dolly in`、`arc`、98 `low-angle pedestal`、`rack focus`…),拿库里的权威写法;`medium shot, eye-level, 50mm`99 这类常规组合**不查**。100- **一个机位查一次,同一任务内直接复用**;只有它是关键设计、或第一版措辞含糊时,才追加101 一次 critique/fix 对照。整组的查库次数是个位数,不是张数的三倍。102- **查到什么就原样写什么,不要译成中文。** `rack focus`、`low-angle`、`deep focus`103 是模型训练时见到的**确切词形**;**提示词整体是中文也照样保留这些英文原词**。104105做动画风格时按同样口径用 `query_sakuga_dataset` 拿技法标签(smears、106impact_frames、background_animation…)与作画/studio 归属。工具不可用时退回联网107检索,并在交付里说明这条未经库校准。108109> 需要字段边界、负向清单、完整范例时再读 `director-prompt-engineering`;110> **骨架够用的任务不要读它** —— 多一次文件读取就是多一个来回。111112**角色要复用时才载角色链。** 判据是**这个人还要再出现**(组图、系列、同一个人跨会话113再出、或用户给了人物参考图)—— 只有这时才载下面两个;单张一次性的人物图不载:114115- **`director-anchor-extraction-quality`** —— 有参考图时先把它提成 Face / Build /116 Outfit / Markers 四段锚点。**锚点不足 40 词就是形象漂移的根因**,相似角色还要写出117 相对差异(「A 比 B 高约 10cm」),被遮挡的部位标 `[inferred]`。118- **`director-character-consistency`** —— 跨图锁死发型 / 服装 / 道具,肤色用相对描述119 而非绝对色值。组图里每一张都要带上完整锚点,不能只在第一张写。120121一次性、画面里没人的配图(图标、纹理、风景、抽象背景)不加载这条链。多格反复重描122外貌导致微漂移、想省 token 时,再按需看 director-structured-captioning123(HoloCine 结构,用 `[char1]` 标签引用而不重描外貌)。124125**跨任务一致性靠人像库,不靠记忆。** 角色链只管「这一批图里不漂」;「下个会话还是同一个人」126要靠 `catimation-portrait-library`。判据:**这个角色会不会再出现第二次?** 会 → 出完图就127`add_to_portrait_library` 把 Face / Build / Outfit / Markers 锚点和用户选定的主锚图存成128`asset://assetId`,下次 `list_portrait_library` 找回再传进 `referenceImages`,别凭聊天记录重新129描述。用户说「还是上次那个人」时先查库,查不到再问,别自己重画。一次性的路人、配角不必入库。130131| 模式 | 典型请求 | 自选技法预算 | 默认动作 |132|---|---|---|---|133| **快速** | 一次性配图、图标、简单插画、明确的单图请求 | **0 个** —— 入口 + 底座就够 | 按七字段写 prompt 生成,四项验收自检 |134| **标准** | 带风格目标/参考图/人物的单图 | **2–3 个对症技法** | 按症状表挑技法再写 prompt |135| **专业** | 复杂构图与光影、系列一致性、参考复刻、角色锚点 | **3–4 个对症技法**,另必载 `director-orchestrator` | 13 维按需展开 |136| **制片** | 电影/分镜项目的角色卡、场景卡、逐镜出图 | 按 `film-studio` 阶段加载 | 过资产门,锚点逐字下传 |137138> **底座不占技法名额。** `catimation-portrait-library`(角色会复用就载)与角色链139> (画面里有需要复用的人就载)是自动触发的底座,不是「对症技法」;上表限的是自选140> 技法数量。一张带人物的标准图同时载入底座 + 角色链 + 2 个技法是正常的,不算超预算。141> 七字段骨架已内联在上面,快速模式一个文件都不用额外读。142143**升级条件:** ① 明确的风格复刻/真实作品·品牌·时代参考;② 系列/组图/角色一致性;144③ 复杂镜头设计(构图·打光·调色多维协同);④ 制片流程内的出图任务。超预算加载145必须能说出具体风险。**方向开放**(「更高级/更有电影感/给我选项」)时先载入146catimation-brainstorm 用 `ask_user` 弹一张选项卡定向,别自己猜。147148**标准模式症状表**(浏览 `~/.agents/skills/`,plain-text 名称按需加载 2–3 个):149150| 症状 / 任务信号 | 对症技法(按需挑,非必载) |151|---|---|152| 人物假/塑料/空洞 | storyboard-live-character-realism |153| 画面平/像壁纸/没纵深 | storyboard-foreground-occlusion · storyboard-pseudo-perspective |154| 光平/糖水/塑料高光 | storyboard-light-reconstruction |155| 色调跑偏/要 HEX 色卡 | storyboard-color-grading-control |156| 风格不像/系列不统一 | director-style-consistency |157| 多格反复重描外貌/外观微漂移/想省 token | director-structured-captioning |158| 提到真实电影/导演/品牌/时代 | codex-research-grounded-prompting(先查证再落笔) |159| 涉敏感/合规内容 | `storyboard-negative-control` |160161## Steps1621631. Turn the request into one clear, descriptive prompt. **按 STEP 0 内联的七字段骨架164 拼装**(主体动作 → 角色引用 → 场景 → 镜头相机 → 光照 → 构图 →165 风格情绪),不要凭记忆随手写。画面里有需要复用的人物时,角色引用那一段用角色链166 提出来的 Face / Build / Outfit / Markers 锚点原文,**组图的每一张都要带全**。167 标准及以上模式再按 STEP 0 把对症技法折进 prompt(物理/可复现参数优先于情绪168 形容词,默认只写正向提示词)。1692. If the user asks for exactly ONE image, call `generate_image` with:170 - `prompt` (required): the description from step 1.171 - `model` (optional): rendering channel **override**. **Omit it** to honor the172 user's channel picker in the chat composer (default 腾讯 2.6-s). Only set it when you173 have a concrete reason — a consistent 组图 series (→ `wan2.7-image-pro`) or a174 channel the user explicitly names this turn.175 - `ratio` (optional): aspect ratio, e.g. `1:1`, `16:9`, `9:16`, `4:3`, `3:2`.176 Omit or `auto` lets the model decide.177 - `resolution` (optional): clarity tier — prefer `2K` by default. Use `1K`178 only when the user asks for fast/cheap/draft; use `4K` only when the user179 explicitly asks for print/ultra-detail/4K.180 - `quality` (optional): `auto`/`low`/`medium`/`high`; 2.5/2.6(官转 flare/sunburst 与181 腾讯 og-v2.5/2.6)另有 `xhigh`/`max`. Prefer `high` on 2.5 (`auto` drifts cost).182 - `transparentBackground` (optional, **2.5/2.6 / NovelAI V5 only**:官转 flare/sunburst 或腾讯183 `custom-model-og-v2.5/2.6-f`/`-s`): `true` 出带 alpha 的透明底 PNG——用户要 透明底 / 贴纸 /184 logo / 素材 / 「不要背景」时用,并显式传一条支持透明底的 `model`。其它渠道忽略此参数照常出185 不透明底;这不是图层分离(那是 `layerDecomposition`)。186 - `maskImage` (optional, **gpt-image-2 / 2.5 / 2.6 only**,含官转与腾讯 og-v2.5 / og-v2.6): 局部重绘(inpainting /187 擦除)遮罩,本地路径或 URL。**带 alpha 的 PNG**,alpha=0 处 = 允许重绘;**尺寸须与188 `referenceImages[0]` 一致**(只作用于第一张),<4MB。用法:`referenceImages: [原图]` +189 `maskImage` + 显式 `model`;prompt 先写透明区域里的那一个改动,再列必须保留的部分——190 mask 是 prompt-guided,不是像素级硬约束。灯箱「擦除」会附 `<原图名>.mask.png`,即此参数,191 并点名用户当前选的那条渠道(官转 / 腾讯 2.5 / 2.6);其它渠道没有 mask 字段,传了会被拒192 (不会静默重画整张)。193 - `modelParams` (optional, **悠船 `youchuan-*` / NovelAI `nai-diffusion-*` only**,别家忽略): 悠船旋钮(`hd` 原生 2K /194 `quality` / `chaos` / `stylize` / `raw` / `iw` / `sref` / `sw` / `seed` / `no`)。**默认一个都195 别传**;只有用户明说「更疯 / 风格化拉高 / 关掉 2K / 固定 seed / 排除某元素」才设对应项。196 越界值会被**拒绝**而不是截断(按次计费);NovelAI 的键见工具说明。197 GIF / SVG(`output_format` 等,型号见工具说明)仅 2.6 官转与腾讯 2.6 能出,文生图一张,别家被拒。198 - `count` (optional): number of images from THIS one prompt (default 1). Two199 different meanings, pick by what the user wants:200 - **consistent 组图 series** — `model: 'wan2.7-image-pro'` + `count` 2–12201 (same character/subject across frames, e.g. 同一只猫的四季).202 - **independent variations (原生多图)** — `count` 2–4 on the OpenAI 官转203 channels `gpt-image-{2.5,2.6}-{flare,sunburst}` / `gpt-image-2`204 (and 腾讯 og-v2 / og-v2.5 / og-v2.6, 文生图; NovelAI 1–4), or 2–6 on `qwen-image-3.0-pro`. ONE205 request returns `count` variants of the same prompt (文生图与改图都行).206 官转按 token **每张**计费,`count: 4` ≈ 单张 4 倍 —— 用户要「几个方案挑一挑」207 时才加,别默认给多张。208 Other channels (2.5 -all / vip / 腾讯 image2 / nano / seedream) ignore `count`209 (always 1). For several *unrelated* images, use `generate_images` (one prompt210 each) instead.211 - `referenceImages` (optional but **important**): array of local file paths212 or data/http URLs for image-to-image / editing. **If the user gave you any213 image material, you MUST reuse it here** (see "Reference images" below).214 - `layerDecomposition` (optional, **图层分离专用**): set `true` 时这一次不是出新图,215 而是把**一张**输入图拆成 1 张底图 + 最多 16 张带透明通道的 PNG 图层。见下方216 「图层分离」一节的硬约束——四条全部由工具前置校验,违反会被直接拒掉而不是静默降级。2173. If the user asks for TWO OR MORE images, call `generate_images` ONCE with:218 - `prompts` (required): one prompt per requested image. If the user asks for219 N images, provide exactly N prompts.220 - shared `model` (optional, same choices as above), `ratio`, `resolution`,221 `quality`, and `referenceImages` when appropriate.222 - Do not spawn subagents and do not call `generate_image` one-by-one.223 `generate_images` performs the parallel fan-out internally and returns one224 combined result.2254. The tool returns a short text result that begins with `✅ generate_image DONE`226 or `✅ generate_images DONE`,227 names the `📁 SAVED FOLDER`, lists the saved `FILES:`, and ends with a compact228 `{ ok, count, model, historyId, paths, dir }` JSON line (plus one229 `resource_link` per file). **A successful return means the task is complete —**230 the image is already shown to the user and saved to history + the file panel.231 You do **not** need to embed, re-describe, or base64 the pixels. Just confirm232 briefly in the user's language and cite the saved path(s) when relevant.2335. **交付优先,然后自检(deliver first, then QA)。**234 A `✅ DONE` return means the image is ALREADY rendered in the chat.235 - **第一步永远是交付**:先用一句话向用户确认(图已出 + 保存路径),**再**做任何236 自检。用户看不到工具调用——先闷头质检再回话,在用户眼里就是「卡死」。237 - **看图上限**(上下文保护,与工具 banner 一致):主 agent 直接 `view_image` 最多238 **5 张**——再多会注入数 MB base64 直接撑爆线程。快速模式若239 画面简单、无人物,可以只核对 DONE banner 不看图。240 - **超过 5 张别放弃看,改走 catimation-subagents**:并发调 `understand_document`241 (它就是看图那条路,走 qwen 返回**文本**,图不进主上下文),结论落成242 `<图名>.vision.json` / `.md` 旁挂在图旁边,下次直接读文本不重看。组图/系列这样243 能张张都看,而不是「看代表性几张然后猜其余」——那是拿信息换预算。看完还要接着244 改提示词重生成时才升级到子代理。245 然后过一遍**四项验收清单**:246 - **① 符合用户要求**:主体 / 数量 / 画幅比例 / 文字内容 / 明确指定的元素是否都对上;247 用户给了 `referenceImages` 时是否真的体现了参考(而非从零另画)。248 - **② 质量合理**:无多/缺手指与肢体、无崩脸、无乱码文字、无明显伪影/拼接错位;249 分辨率与清晰度匹配用途。250 - **③ 风格一致**:与用户指定风格一致;**系列/组图**内各帧画风、色调、角色外观前后一致;251 若项目有角色锚点 / 圣经(character_bible)或既定风格,新图须与之吻合。252 - **④ 过本级门**:标准及以上时,对症技法的落地证据是否出现在 prompt 里;253 角色身份是否使用用户选定的主锚(大头照+全身照、多视图板或其它确认资产;254 多套候选拿不准时先询问);255 制片流程中是否满足 `film-studio` 的资产门。快速模式只查 ①–③。256 - 若任一项不达标:**先告诉用户**哪里不对、准备怎么改,再**带改进后的提示词重生成**257 (保留可用部分时把上一版回传为 `referenceImages` 做图生图),再复检。最多迭代258 2–3 次即收敛——别在边角小瑕疵上死磕,每次重生成都花钱。259 - You still do NOT need `query_history` to find an image you just generated,260 and do NOT shell out (`dir`/`ls`/`where`/`find`/`Get-ChildItem`) to hunt for261 the file — the path is already in the return; `view_image` that path directly.262263## Choosing a model (user's composer picker is the default; you may override)264265The `model` param is an **optional override**. By default (omit it) generation runs266on the channel the **user picked in the chat composer** (Flare / Sunburst / All 2.5 /267VIP / Image2 / 腾讯 / Nano2 / Nano2.1 / 万相 / 千问 / 悠船 / NovelAI / Seedream; default 腾讯 2.6-s) — 各渠道共用268ratio × resolution × quality(Seedream 仅 1K/2K 无 quality; `gpt-image-2.5-all` 把尺寸269写进 prompt). Omit `model` for ordinary requests. Set it only with a concrete reason:270271- **`gpt-image-2.5-flare`** — flare / 速度优先 / 2.5 文生图 / 透明底. ~20s,同价取代 gpt-image-2; quality 默认 high,另有 xhigh/max; 支持 `transparentBackground`(2.5 家族独有,含下面腾讯两条).272- **`gpt-image-2.5-sunburst`** — sunburst / 画质优先 / 2.5 改图 / 透明底. ~40s,同价更锐; 也支持 `transparentBackground`.273- **`gpt-image-2.6-flare` / `gpt-image-2.6-sunburst`** — 官转 2.6(可走平台额度),取向与能力同上两条。274- **`gpt-image-2.5-all`** — all / 网页逆向 / $0.03. 尺寸写进 prompt,不发 size/quality.275- **`gpt-image-2-vip`** — 仅用户说 官逆/vip 时. 不要当默认,也不要编 2.5 vip 渠道.276- **`gpt-image-2`** — 仅用户点名旧官转/gpt-image-2. 日常改用 flare/sunburst.277- **`wan2.7-image-pro` (阿里万相 2.7 pro)** — pick when the user says 万相 /278 wanxiang / wan / 通义万相, OR when they want a **consistent multi-image 组图279 series** (e.g. "同一只猫的四季组图,前后一致"). For a 组图 series, call280 `generate_image` with `model: 'wan2.7-image-pro'` and `count` = how many frames281 (2–12) — it returns one front-to-back-consistent set from a single prompt282 (do NOT use `generate_images`, which makes unrelated images). Wan excels at283 超清文生图、图像编辑、组图; it also supports 4K (text-to-image only —284 editing/组图 cap at 2K).285- **`gemini-3.1-flash-image` (Nano Banana 2)** — pick when the user says nano /286 nano2 / nano banana / gemini / 谷歌. 谷歌 Gemini 原生端点,出图快(~15s)、支持287 超多宽高比与 4K,中文/文字与一致性也不错。288- **`gemini-nano-banana-2.1` (Nano Banana 2.1)** — user says nano 2.1 / 新版 nano.289 Nano2 升级版:画质、图中文字、多轮改图更稳;仅 1K/2K/4K(无 0.5K)。只说 nano 时仍用 Nano2。290- **`doubao-seedream-5-0-pro-260628` (火山豆包 Seedream 5.0 Pro)** — pick when the291 user says seedream / 即梦 / 豆包 / seedream 5 / sd5, OR when the request is a292 **multi-reference fusion**(把多张参考图的角色+场景+风格融进一张图,最多 10 张293 参考图,这是它的强项), OR when the user wants **图层分离**(唯一支持的渠道,294 见「图层分离」一节). 注意:普通出图仅单图(`count` 无效)、分辨率只有 1K/2K295 (无 4K)、无 quality 轴;要 4K 或组图时换别的渠道。296- **`custom-imagemodel-gt` (腾讯 image2)** — pick when the user says 腾讯 / tencent /297 image2 腾讯. 快(~30s),网关已关水印。298- **`custom-model-og-v2` (腾讯 image2 fast)** — pick when the user says 便宜 / 快 /299 image2 fast / og. 与腾讯 image2 **能力相同**,但更快(~20s)、价格约 1/6、且能一次300 出多张。用户没有特别偏好而只是想省钱或求快时,这条优先于 `custom-imagemodel-gt`。301- **`custom-model-og-v{2.5,2.6}-{f,s}` (腾讯 2.5 / 2.6 Flare / Sunburst)** — pick when the user says 腾讯 2.5 / 2.6 /302 腾讯 flare / 腾讯 sunburst, or wants 2.5 但走平台额度. 与官转同模型、不同线:og 协议、303 五档 quality 默认 high、`count` 1–4(文生图);`transparentBackground` 与 `maskImage` **同样支持**304 (别为透明底或擦除跳回官转)。2.5 与 image2 fast 同价;**2.6 低档 token 约 2.5 的 4 倍(high 档接近)**,305 擦除也一次做对、别无谓重试。默认渠道是 2.6-s,别擅自降到 2.5。306- **`qwen-image-3.0-pro` (阿里通义千问 Image 3.0 Pro)** — pick when the user says307 千问 / qwen / qwen image. 一次可出 1–6 张,参考图最多 3 张(传更多会被**拒绝**,308 不是截断——需要最多 10 张时改用 Seedream 5.0 Pro)。上游可能改写请求尺寸,309 所以别向用户承诺确切像素;负向提示词会被网关丢弃,要压画质问题写进正向提示词。310- **`youchuan-v8.2` / `youchuan-v8.2-turbo` (悠船 Midjourney V8.2 快速 / 极速)** — pick when311 the user says Midjourney / MJ / 悠船。同一模型两档速度(快速 ~60s、极速 ~30s 但更贵),312 **一次固定出 4 张、只计一次费**(`count` 无效);用户没说要快就用快速。`ratio` 支持 auto 与313 任意 W:H;最多 20 张 http(s) 参考图(本地图自动上传,不收 base64);没有 `resolution` /314 `quality` 轴,原生 2K 等旋钮走 `modelParams`(`hd` 默认开、计费 ×1.5)。**提示词里别写315 `--v` / `--turbo` / `--hd` 这类参数**(网关会拒):版本与速度只由 `model` 决定。316 不自动重试,失败后先告诉用户再重来。317- **`nai-diffusion-5-full` / `nai-diffusion-5-curated` / `nai-diffusion-4-5-full` / `nai-diffusion-4-5-curated` (NovelAI V5 / V4.5)** — pick when the user says NovelAI / NAI / 动漫插画 / 多角色同框;只说 NovelAI 时用 `nai-diffusion-5-full`。一次出 `count` 张(1–4)、**按张计费**;`referenceImages` 至多 **1 张**(= 图生图,多给被拒);`transparentBackground` 仅 V5。角色提示词(`modelParams.characters`)、负面词、采样器等旋钮见工具说明,**默认都别传**,越界被拒。318- 以上渠道都接受 `referenceImages`(图生图 / 图像编辑)。319320### 站点要求(已自动处理 — 无需手动切站点)321322六条腾讯渠道(`custom-imagemodel-gt` / `custom-model-og-v2` / `custom-model-og-v2.5-f` /323`custom-model-og-v2.5-s` / `custom-model-og-v2.6-f` / `custom-model-og-v2.6-s`)、`wan2.7-image-pro`(阿里万相 2.7 pro)、`qwen-image-3.0-pro`324(通义千问 Image 3.0 Pro)、`youchuan-v8.2` / `youchuan-v8.2-turbo`(悠船)和325`doubao-seedream-5-0-pro-260628`(Seedream 5.0 Pro)和四条 NovelAI326**都只经 Miau API 代理提供**。327出图时应用会**自动把这些渠道的请求固定走 Miau API 站点**(无论用户当前在「API 设置」328里选了哪个站点),所以你**不需要**让用户手动切站点——直接调用即可。329330- 唯一前提:Miau API 站点已配置 API Key。若没配,工具会返回清晰错误331 「未配置『Miau API』站点的 API Key …」——这时再提醒用户到「API 设置」为 Miau API332 站点填入 Key 即可。333- 其余渠道(官转 2.5/2.6 / -all / vip / gpt-image-2 / Nano2 / Nano2.1)跟随当前站点(不钉 Miau):334 选 Miau 可走平台额度,选 apiyi 走 Key。不要编 2.5 vip 渠道。335336只为具体理由设 `model`(组图 → 万相、多参考图融合 → Seedream、2.5 文生图 → flare、2.5 改图 →337sunburst、MJ/悠船 → youchuan、二次元/多角色 → NovelAI、或用户点名的渠道)。Never invent a model name.338339## Reference images — reuse the user's material (important)340341If the user provides ANY image material, treat it as a reference and pass it in342`referenceImages` (image-to-image) instead of doing text-to-image. Look for:343344- Paths listed in the prompt under `[Attached files at these local paths: …]`345 or `[Referenced files at these local paths: …]` — these are the files the346 user attached/@-mentioned in chat. Pass the image ones as `referenceImages`.347- The user pointing at an image with language like "按这张图 / 参考这张 /348 基于这张 / 用这张做 / edit this / make a variation of this / 换成…风格".349- An image the user just generated in this thread that they now want changed.350351Rules:352- Be proactive: when material is present and the request is plausibly about it,353 reuse it. Do **not** silently drop the reference and generate from scratch.354- **You can pass MULTIPLE reference images — you are not limited to one.**355 `referenceImages` is an array: include every relevant image the user gave356 (e.g. a character sheet + a background, several angles, a subject + a style357 reference). Pass all of them together so the model can combine/condition on358 the whole set, not just the first.359- Pass the local file path(s) directly. The tool sends the original reference360 bytes and does not resize or recompress them automatically.361- If the provider rejects the reference payload with HTTP 413 / 文件大小超过限制,362 load `ffmpeg-win`, create smaller derivative copies without overwriting the363 originals, then retry once with the derivative paths.364- If you are unsure whether the user wants the reference followed, prefer reusing365 it and say briefly that you based it on their image(s).366367## 图层分离(layerDecomposition)368369把**一张**图拆成 1 张底图 + 最多 16 张带透明通道的 PNG 图层,逐层带叠放层级、370包围盒和图层名(如「HELLO白色粗体文字」「带柄红苹果」)。用户说 图层分离 / 拆图层 /371分层 / 把前景抠出来 / 背景单独给我 / 拆成 PSD 那样的图层 时用它。372373四条硬约束,**全部由工具前置校验**——违反会返回明确错误,不会静默出一张普通图:3743751. **必须 `model: 'doubao-seedream-5-0-pro-260628'`** —— 只有这一个渠道支持。376 省略 `model` 会落到用户 composer 选的渠道上,那边不支持,请求会被拒。3772. **必须且只能给一张待拆的图**,放在 `referenceImages[0]`。没有输入图会被拒378 (否则就退化成一次普通文生图)。3793. **`prompt` 可以为空串** —— 这是全仓唯一一个空 prompt 才正确的地方。空 = 自动全拆380 (模型自己识别主体/文字/背景/装饰),一句「图层分离」要的就是这个。要指定拆什么381 才写,如 `只拆出前景人物和标题文字`。**别为了「填满参数」而编一句提示词**,382 那会把自动全拆变成按你那句话拆。3834. **`ratio` / `count` 在这里无效**(层数由图的内容决定)。`resolution` 是**另一套档位**:384 只有 `auto` / `1K` / `1.5K` / `2K` 有意义,**默认且几乎总该用 `auto`** —— 拆分是对着385 一张已有图做的,`auto` 让输出跟随原图的尺寸与宽高比;给固定档会让底图按那一档重出,386 回来一张和你要拆的那张尺寸对不上的图。省略 `resolution` 就是 auto,不用特意写。387388**输入图有硬要求:png / jpeg,且不小于 512×512。** 不满足由上游判定并原话报错,389我们不预先拦 —— 但用户给的是 webp / 小图时,先提醒一句比让他等一次失败的请求好。390391**计费按张,不是按次。** 一次拆分出 N 张就扣 N 张的钱。复杂图可能到 17 张——**先告诉用户392这一点再拆**,尤其是用户说「随便试试」的时候。结果在出图页收成**一张**卡片(角标393「▤ N 层」),你不用额外操作。394395## Multiple images at once — use generate_images (important)396397凡是**这一轮要出不止一张图**——用户说「生成 3 张」「做 4 个变体」、一组系列图、398几个不同主体,**或者一个剧本/分镜里的多个镜头**——都是 `generate_images` 一次调用,399不是循环调 `generate_image`。400401**带参考图时这条是硬性的,不是偏好。** `generate_images` 把共享的 `referenceImages`402**只上传一次**、所有 prompt 复用;循环调单张会把同一组参考图重读重传 N 遍(十个镜头共用403三张锚图:3 次 vs 30 次,画面结果完全一样)。批量还自带 3 路并发,参考图也只按渠道要的404形式编码一次。405406- If the user asks for N images (2–20; above 20, split into batches), pass exactly N prompts to407 `generate_images.prompts`.408- For variations, write N distinct but related prompts so the outputs are not clones.409- After `generate_images` returns, confirm once and cite the saved `paths`; don't410 re-announce each image separately.411412## Organize finished assets into the user's workspace (when in a project)413414When you're working inside a user project/workspace folder (e.g. a film /415storyboard project, or the user asked you to organize outputs), proactively416**COPY** each finalized image into a tidy assets subfolder of that working417directory and give it a descriptive, ordered name — e.g.418`<workspace>/assets/images/S01_hero_wide.png`.419420- **COPY, don't move**, from the saved path in the tool result, so the chat /421 history / ATTACHMENTS copy stays intact.422- Group by purpose/shot and use zero-padded ordinals (`S01_`, `S02_`…) so files423 sort naturally.424- For a one-off casual generation outside any project, skip this unless asked —425 the file is already saved and in history.426427## Common Mistakes428429- 凭空编造 `model` 名;合法值只有上面「Choosing a model」列出的那些。用户没点名就430 省略 `model`(交给用户在 composer 选的渠道,默认腾讯 2.6-s)。431- 用户点名某渠道却不显式传 `model`。432- 快速任务硬套专业流程(简单配图不需要 13 维框架);专业任务却跳过分级直接硬写。433- 图层分离踩坑:忘了同时指定 `model`;为「填满参数」编 prompt;拆前没告知按张计费(见上节)。434435## Notes436437- 结果已落盘(见 `paths`)、进了历史页和 ATTACHMENTS 面板,无需额外保存;只有用户要它438 放到指定位置时才移动/复制(项目内见上面的整理一节)。439- If `generate_image` is genuinely unavailable in this session, you may fall back440 to whatever image tool you do have — but `generate_image` is the preferred,441 in-app path that actually displays and saves the result.