cawcut-generate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCawCut Generate
CawCut Generate
Generate images and videos via CawCut official node capabilities. Wraps . Always checks the live App catalog for a similar published App before generating, and hands off to when one is a good fit.
cawcut generatecawcut-app-runSkill files are English-only. and must not contain Chinese or other non-English prose (including YAML trigger phrases). Match the user's language only in live replies via .
SKILL.mdreferences/descriptionreply_language通过CawCut官方节点功能生成图像和视频。封装命令。在生成前始终检查实时应用目录是否存在相似的已发布应用,若匹配度高则转交至处理。
cawcut generatecawcut-app-run技能文件仅支持英文。和目录下不得包含中文或其他非英文文本(包括YAML中的触发短语)。仅通过在实时回复中匹配用户使用的语言。
SKILL.mdreferences/descriptionreply_languageStep 0 — Bootstrap
步骤0 — 初始化引导
Run bootstrap as a silent guardrail, not as a user-facing phase.
- At most once per AI session. If any command has already succeeded in this AI session, skip all bootstrap checks and continue.
cawcut - Use only one explicit check command: .
cawcut upgrade check --json- Do not also run ,
cawcut --version, orcommand -v cawcut.cawcut auth status - If , run
"update_available": trueyourself via Bash (do not ask the user to type it). It refreshes CLI + skills. After it succeeds, continue this skill from Step 1 — do not stop or ask the user to re-invoke.cawcut upgrade - If (local
"ahead_of_registry": trueis newer than npmcurrent), continue without upgrading. This usually means a local/dev build; do not ask the user to downgrade or runlatest.cawcut upgrade - If the check fails because is missing, ask the user to install the CLI via npm (external users — no git clone or repo
cawcut):./setupAfter install succeeds, continue bootstrap; auth is handled in step 4 below.bashnpm install -g @ubnt/cawcut - For other check failures, continue and mention the warning only if a later CLI command fails.
- Do not also run
- Do not print "bootstrap checks passed" after bootstrap — move directly to Step 1 (or, under the bare-invoke exception, straight to asking what to generate).
- Let the first real command (,
cawcut app list --json, orcawcut capabilities list --models --json --capability <cap>) validate auth. If it fails with token/auth errors (includingcawcut generate), runToken expiredyourself via Bash — do not ask the user to type it. Briefly tell the user a browser tab will open for OAuth consent; wait for login to finish, then retry the command that failed once. Only escalate to the user if login fails (denied, timeout, port conflict).cawcut auth login - This skill's references (,
references/troubleshooting.md) live under the base directory printed at the top of this skill body —references/models.mdthem directly atRead. Do not<base_dir>/references/<file>.md/findto locate them; that base directory can be a symlink that a plaingrepsilently fails to traverse.find <dir> - Structured user-ask tool (check every session). In Claude Code, use for every enumerable choice. In Cursor, use
AskUserQuestion. If either tool is in your allowed-tools list, you must use it for all enumerable decisions in this skill — App vs official generation, capability/mode, model pick, Phase A/B settings, enumAskQuestionvalues, media source, upload recovery — unless overflow forces a numbered text table for that batch only (see Interactive selection). Never default to a numbered text menu while--param/AskUserQuestionis available and the option count fits. A user declining one such call is not grounds to stop using it for the next decision — see Interactive selection's opening rule for how to read the decline message.AskQuestion
将初始化引导作为静默防护机制运行,而非面向用户的流程阶段。
- 每个AI会话最多执行一次。若本次AI会话中已有命令执行成功,则跳过所有初始化检查,直接继续后续流程。
cawcut - 仅使用一个明确的检查命令:。
cawcut upgrade check --json- 请勿同时运行、
cawcut --version或command -v cawcut。cawcut auth status - 若返回,通过Bash自行运行
"update_available": true(无需让用户手动输入)。该命令会刷新CLI及技能。执行成功后,从步骤1重新开始本技能流程,请勿中断或要求用户重新调用。cawcut upgrade - 若返回(本地
"ahead_of_registry": true版本比npmcurrent版本新),则无需升级,直接继续。这种情况通常意味着使用的是本地/开发版本,请勿要求用户降级或运行latest。cawcut upgrade - 若因未安装导致检查失败,请要求用户通过npm安装CLI(外部用户请勿使用git克隆或仓库
cawcut脚本):./setup安装成功后,继续初始化引导;认证将在下方步骤4处理。bashnpm install -g @ubnt/cawcut - 若出现其他检查失败情况,可继续流程,仅当后续CLI命令失败时再向用户提示警告信息。
- 请勿同时运行
- 初始化引导完成后,请勿打印「初始化检查通过」,直接进入步骤1(或在裸调用例外场景下,直接询问用户需要生成的内容)。
- 让第一个实际命令(、
cawcut app list --json或cawcut capabilities list --models --json --capability <cap>)验证认证状态。若因令牌/认证错误(包括cawcut generate)失败,通过Bash自行运行Token expired——无需让用户手动输入。简要告知用户将打开浏览器标签页进行OAuth授权;等待登录完成后,重试一次失败的命令。仅当登录失败(授权拒绝、超时、端口冲突)时,再将问题提交给用户处理。cawcut auth login - 本技能的参考文档(、
references/troubleshooting.md)位于本技能正文顶部显示的基础目录下——直接通过references/models.md读取这些文档。请勿使用<base_dir>/references/<file>.md/find命令查找它们;该基础目录可能是符号链接,普通grep命令可能无法遍历。find <dir> - 结构化用户询问工具(每次会话必查)。在Claude Code中,对所有可枚举选项使用**工具。在Cursor中,使用
AskUserQuestion工具。若你的可用工具列表中包含上述任一工具,则在本技能的所有可枚举决策中必须**使用该工具——包括应用与官方生成的选择、功能/模式、模型选择、A/B阶段设置、枚举AskQuestion值、媒体源、上传恢复等——除非选项数量过多,导致该批次只能使用编号文本表格(参见交互式选择规则)。当--param/AskUserQuestion可用且选项数量适配时,绝不要默认使用编号文本菜单。用户拒绝某次工具调用,并不意味着后续决策可以停止使用该工具——请参考交互式选择的开篇规则解读拒绝信息。AskQuestion
Catalog freshness (mandatory)
目录新鲜度(强制要求)
Source of truth: only the output of a command you run in this user message's turn for the current subject/capability/style. Never treat app names, IDs, counts, or JSON from earlier messages as authoritative — conversation memory is not a catalog. A "no App match" conclusion from a prior user message is never reusable.
cawcut app list …Per-user-message rule (highest priority): On every new user message, before writing any reply or calling any other tool, run first — this is a mechanical step, not a judgment call; do not reason about whether the message "could involve" App matching before running it. The catalog may have changed on the server since the last message (e.g. the user published a new App on the web). The bare-invoke case below is the only content-based exception — do not construct another one by analogy.
cawcut app list --jsonBare-invoke exception (the only content-based skip): If the message is only the skill invocation itself — no prompt, subject, media, or capability mentioned anywhere in it — there is nothing yet to match against any App's name/description, so skip for this message and ask the user what they want to generate instead (free text; see Workflow step 3's bare-invoke handling). The moment their reply contains real content, it's a new user message — run per the rule above before anything else, no carry-over.
app listapp list --jsonAlso re-run Step 1 when any of these is true:
- User's tool call (/
AskUserQuestion/ menu) was rejected or interrupted and their next message changes subject, capability, or style — treat exactly like a new user message and restart from Step 1, even as a "follow-up" in the same exchangeAskQuestion - User switched account, re-logged in, or just succeeded
cawcut auth login - User says they published, shared, or created a new App
- User asks to refresh or re-list Apps
Skip Step 1 catalog check only when all are true (same user message's turn, same subject/capability/style):
- You already ran for this user message and completed the smell test (or the user chose official generation after a plausible-match prompt)
cawcut app list --json - User is only tuning settings on the plan already in flight (ratio, resolution, quality, count, duration, "one more", "make it bigger")
- Or this turn started from handoff where the user already picked "Official generation instead" in this user message (see Decide-once guard in Step 1)
cawcut-app-run
Never skip the per-user-message across user messages — even if subject, capability, style, and wording are unchanged.
app listHard gate: Workflow step 9 runs a pre-flight check immediately before — see there.
cawcut generate唯一可信来源:仅以你在本次用户消息回合中针对当前主题/功能/风格运行命令的输出为准。绝不要将早期消息中的应用名称、ID、数量或JSON数据视为权威信息——对话记忆不能替代目录。之前用户消息回合得出的「无匹配应用」结论不可复用。
cawcut app list …每条用户消息规则(最高优先级):在每条新用户消息到来时,在撰写任何回复或调用其他工具之前,必须先运行——这是机械步骤,而非主观判断;请勿在运行前判断消息是否「可能涉及」应用匹配。自上次消息以来,服务器端的目录可能已发生变化(例如用户在网页端发布了新应用)。以下裸调用例外是唯一基于内容的例外情况——请勿类推其他例外。
cawcut app list --json裸调用例外(唯一可跳过的内容场景):若消息仅包含技能调用本身——未提及任何提示语、主题、媒体或功能,则暂时没有可与应用名称/描述匹配的内容,因此可跳过本次消息的查询,直接询问用户需要生成的内容(自由文本;参见工作流步骤3的裸调用处理)。一旦用户的回复包含实际内容,即视为新用户消息——必须先运行,再进行其他操作,无例外。
app listapp list --json当出现以下任一情况时,重新运行步骤1:
- 用户的工具调用(/
AskUserQuestion/菜单)被拒绝或中断,且用户下一条消息更改了主题、功能或风格——完全视为新用户消息,从步骤1重新开始,即使是同一场对话中的「后续请求」AskQuestion - 用户切换账户、重新登录,或刚刚成功
cawcut auth login - 用户表示已发布、共享或创建了新应用
- 用户要求刷新或重新列出应用
仅当以下所有条件满足时(同一条用户消息回合、同一主题/功能/风格),才可跳过步骤1的目录检查:
- 你已针对本次用户消息运行并完成初步匹配检查(或用户在匹配提示后选择了官方生成)
cawcut app list --json - 用户仅针对当前执行中的计划调整设置(比例、分辨率、质量、数量、时长、「再生成一个」「放大尺寸」等)
- 或本次回合是从转交而来,且用户在本次用户消息中已选择「改用官方生成」(参见步骤1中的「一次决策防护」)
cawcut-app-run
绝不要跨用户消息跳过每条用户消息必做的查询——即使主题、功能、风格和措辞完全相同。
app list硬性检查:工作流步骤9在执行前会运行预检——详见该步骤说明。
cawcut generateStep 1 — Check the App catalog first (before every cawcut generate
call)
cawcut generate步骤1 — 优先检查应用目录(在每次cawcut generate
调用前)
cawcut generateDecide-once guard (same user message only) — skip this entire step if this turn started because already ran the per-user-message in this user message and decided there's no matching App, or the user picked "Official generation instead" there. Go straight to capability/model discovery below; do not re-run to double-check a decision already made in this user message.
cawcut-app-runapp listapp listOtherwise, apply the Per-user-message rule, Bare-invoke exception, and Skip Step 1 checklists in Catalog freshness above. If you have not yet run for this user message and the bare-invoke exception doesn't apply, execute Step 1 below — do not reuse a prior message's list or "no match" conclusion.
cawcut app list --json- Run without
cawcut app list --json(lean JSON: name, description, credits, source — no--schema; token-efficient smell test).input_schema - Check whether any App's /
nameclearly overlaps with the user's ask. This is a quick smell test, not full scoring —descriptionowns the formal scoring rubric and re-checks properly once you hand off.cawcut-app-run - No plausible match — continue below with raw generation. Do not mention the catalog check to the user.
- Plausible match — always call /
AskUserQuestionfirst (numbered text only if the tool is unavailable):AskQuestionFound a published App that does this: <name> — <description> (N credits). 1. Use <name> 2. Continue with official generation- User picks the App → hand off to with that App name already decided. It skips catalog scoring/menus (its Step -1) and goes straight to
cawcut-app-run+ tables + input menu; it still live-fetchesdescribein that turn when it needs the internal app ID.app list --json - User picks official generation → continue this skill's flow below. Do not ask about the catalog again for the rest of this turn.
- User picks the App → hand off to
一次决策防护(仅适用于同一条用户消息)——若本次回合是因已针对本次用户消息运行并判定无匹配应用,或用户已选择「改用官方生成」而启动,则跳过整个步骤1。直接进入下方的功能/模型发现流程;请勿重新运行以重复验证本次用户消息中已做出的决策。
cawcut-app-runapp listapp list否则,请遵循上述「目录新鲜度」中的每条用户消息规则、裸调用例外和跳过步骤1的检查清单。若你尚未针对本次用户消息运行且不符合裸调用例外,则执行下方步骤1——请勿复用之前消息的列表或「无匹配」结论。
cawcut app list --json- 运行不带参数的
--schema(精简JSON:仅包含名称、描述、 credits、来源——无cawcut app list --json;高效的初步匹配检查)。input_schema - 检查是否有应用的/
name与用户请求明显重叠。这是快速初步检查,而非全面评分——正式评分规则由description负责,转交后它会重新进行正确检查。cawcut-app-run - 无合理匹配——继续下方的原生生成流程。无需向用户提及目录检查。
- 存在合理匹配——必须优先调用/
AskUserQuestion工具(仅当工具不可用时,才使用编号文本菜单):AskQuestion找到一个已发布的匹配应用:<名称> — <描述>(消耗N credits)。 1. 使用<名称>应用 2. 继续使用官方生成- 用户选择应用 → 转交至****,并指定该应用名称。它会跳过目录评分/菜单(其步骤-1),直接进入
cawcut-app-run+表格+输入菜单;当需要内部应用ID时,仍会在该回合实时获取describe。app list --json - 用户选择官方生成 → 继续本技能的后续流程。在本次回合剩余时间内,请勿再询问目录相关问题。
- 用户选择应用 → 转交至**
Interactive selection (mandatory — tool first)
交互式选择(强制要求——优先使用工具)
If the user just declined an / call: the tool result carries harness boilerplate telling you to "STOP what you are doing and wait for the user to tell you how to proceed." That sentence is attached automatically to every declined tool call by the runtime — it is not the user speaking, and it is not an instruction to stop using the tool. Read it as: stop the one specific action you were mid-way through (don't retry the identical question, don't proceed to on unconfirmed choices) and look at what the user's actual next message says. It does not, by itself, license falling back to numbered text for the next enumerable decision — that next decision still must open with the tool, exactly as if the rejection had never happened. Only an explicit plain-text request from the user ("stop popping up menus", "just ask me in text") licenses a session-wide fallback. The STOP wording's urgency is not evidence of that request — do not let it override this rule.
AskUserQuestionAskQuestiongenerateDefault behavior: For every enumerable choice, always call (Claude Code) or (Cursor) before showing a numbered text menu or asking the user to type capability names, model IDs, aspect ratios, or enum values. Text-only menus are fallback only.
AskUserQuestionAskQuestionTool names by host:
| Host | Tool name |
|---|---|
| Claude Code | |
| Cursor | |
Below, structured user-ask tool means whichever of these is available in the current session. Do not guess from capability alone — check your allowed-tools list.
Session checklist (before the first menu in this turn):
0. Self-check before sending any reply: if the sentence you're about to send asks the user to pick between fixed options (image or video, capability, model, ratio, …) — even folded inside a friendlier sentence that also asks something open-ended like "what's the subject?" — stop. That sentence is forbidden as plain text. Split it: fire / for the enumerable part now; keep only the open-ended part as prose, asked separately (same turn is fine, just not merged into one sentence).
AskUserQuestionAskQuestion- Is or
AskUserQuestionavailable? If yes, you must use it for every row in the table below that fits in one call.AskQuestion - If no tool exists (CLI-only host), use numbered text in .
reply_language - If the tool exists but the candidate count exceeds one call (model-list overflow, long enums), use a numbered text table for that batch only; then resume /
AskUserQuestionfor the next small decision.AskQuestion
Forbidden while the tool is available: numbered text menus (), "reply with the number or name", or asking the user to type capability names, model IDs, or enum values from memory.
1. … 2. …| Step | Always use structured user-ask tool for |
|---|---|
| Image vs video | Output type |
| Capability / input mode | text-to-image, image-to-image, text-to-video, … |
| Model | Each plan-visible model (mark default in label) — see Model-list overflow (Rule 10, Phase A Choice 2) when the candidate count exceeds what the tool can hold |
| Settings gate | Defaults / change model / customize settings (Phase A, single-select) |
| Settings — customize | One structured user-ask tool call, one question per axis from the current model's live schema (Phase B) — never collapse multiple axes into one single-select pick |
Each enum | Every |
| Media | Same three-way branch as |
Fallback only: Use numbered text menus in only when / is unavailable, or when option count/structure exceeds what the tool supports for that batch (model-list overflow, long enum lists). Falling back for one decision does not exempt the next small decision — re-check and use the tool again when it fits. UX rule 10 and Workflow step 7 text examples are fallback shape only — not the default when the tool is present. Only ask for free-text prompt content or a URL/path after the user picks a Custom / URL / path branch.
reply_languageAskUserQuestionAskQuestion若用户刚刚拒绝/调用:工具结果会包含运行时自动添加的 boilerplate 文本,提示你「立即停止当前操作,等待用户指示下一步」。这句话是运行时自动附加到所有被拒绝的工具调用中的——并非用户发言,也不是停止使用工具的指令。请将其解读为:停止你正在进行的某一项特定操作(不要重试相同问题,不要在未确认选项的情况下执行),查看用户实际的下一条消息内容。这绝不意味着后续可枚举决策可以退化为编号文本菜单——下一次决策仍必须优先使用工具,就像从未发生过拒绝一样。只有当用户明确以纯文本请求(如「不要再弹出菜单」「直接用文字问我」)时,才允许在整个会话中退化为文本菜单。STOP提示的紧急性不能作为用户请求的证据——请勿让它覆盖本规则。
AskUserQuestionAskQuestiongenerate默认行为:对于所有可枚举选项,必须优先调用(Claude Code)或(Cursor),再显示编号文本菜单或要求用户输入功能名称、模型ID、宽高比或枚举值。纯文本菜单仅作为备选方案。
AskUserQuestionAskQuestion各平台对应的工具名称:
| 平台 | 工具名称 |
|---|---|
| Claude Code | |
| Cursor | |
下文提到的结构化用户询问工具指当前会话中可用的上述工具之一。请勿仅根据功能猜测,请检查你的可用工具列表。
会话检查清单(本次回合第一个菜单前):
0. 发送任何回复前自检:若你即将发送的句子要求用户在固定选项中选择(图像或视频、功能、模型、比例等)——即使嵌套在更友好的句子中,同时还包含开放式问题如「主题是什么?」——请立即停止。这种混合句子是禁止的。请拆分:立即针对可枚举部分调用/;仅保留开放式部分作为文字提问(可在同一回合发送,但请勿合并为一句话)。
AskUserQuestionAskQuestion- 或
AskUserQuestion是否可用?若是,则必须对下表中所有适合单次调用的选项使用该工具。AskQuestion - 若无可用工具(仅CLI平台),则使用对应的编号文本菜单。
reply_language - 若工具可用但候选选项数量超出单次调用限制(模型列表过长、枚举值过多),则仅对该批次使用编号文本表格;之后恢复对下一个小型决策使用/
AskUserQuestion。AskQuestion
工具可用时禁止操作:编号文本菜单()、「回复数字或名称」,或要求用户凭记忆输入功能名称、模型ID或枚举值。
1. … 2. …| 步骤 | 必须使用结构化用户询问工具的场景 |
|---|---|
| 图像 vs 视频 | 输出类型选择 |
| 功能 / 输入模式 | text-to-image、image-to-image、text-to-video等 |
| 模型 | 所有可见模型(在标签中标记默认值)——当候选数量超出工具限制时,参见「模型列表溢出」(规则10,阶段A选项2) |
| 设置入口 | 默认设置 / 更换模型 / 自定义设置(阶段A,单选) |
| 设置——自定义 | 一次结构化用户询问工具调用,针对当前模型实时 schema 的每个维度单独提问(阶段B)——绝不要将多个维度合并为一个单选选项 |
每个枚举 | JSON中的所有 |
| 媒体 | 与 |
仅作为备选方案:仅当/不可用,或选项数量/结构超出工具支持范围时,才使用对应的编号文本菜单。某一次决策使用备选方案,不免除下一次小型决策使用工具的要求——重新检查,当适用时再次使用工具。UX规则10和工作流步骤7的文本示例仅为备选展示形式——并非工具可用时的默认形式。仅当用户选择自定义/URL/路径分支后,才要求用户输入自由文本提示内容或URL/路径。
AskUserQuestionAskQuestionreply_languageUX Rules
UX规则
- Be concise. Default output is the result URL(s). Do not dump raw JSON unless debugging.
- Always pass — jobs are async, CLI blocks and prints the URL when done.
--wait - Always pass for image and video generations. The CLI resolves the platform-appropriate downloads folder automatically (
--downloadon macOS/Linux,~/Downloadson Windows) — do not hardcode a path or download the result yourself. Only skip%USERPROFILE%\Downloadsif the user explicitly says they only want the URL.--download - Reply language:
- Bare skill invoke → English. If the user only runs the skill command with no substantive text (e.g. ,
/cawcut-generate, or the skill name alone), setcawcut-generateto English for menus, summaries, and questions.reply_language - Follow the conversation after that. Once the user adds a real request or follow-up in another language, switch to match that language for the rest of the session (unless they explicitly ask for English).
reply_language - All prose, status summaries, option labels, questions, and recovery guidance use .
reply_language - Keep CLI commands/flags, model IDs, app IDs, JSON keys, URLs, and raw error codes in English.
- Do not paste raw English CLI output as the user-facing answer; summarize it in .
reply_language
- Bare skill invoke → English. If the user only runs the skill command with no substantive text (e.g.
- Do not call CawCut HTTP APIs with curl — the CLI handles auth, media upload, and token refresh.
- Template first — see Step 1 (Check the App catalog first) above; it runs for every request, not just ones that sound template-like. When the user picks the offered App, follow 's disclose app on selection rule — name the App, show metadata + inputs tables, then collect inputs via menus; never say only "this app" without details.
cawcut-app-run - Staged discovery (required) — never fetch all capabilities with full schema in one shot (without
cawcut capabilities list --models --schema --jsondumps ~100KB and may be truncated). Use this sequence instead:--capability- After capability is known → (or
cawcut capabilities list --simple --capability <cap>) to pick a model.--models --json --capability <cap> - After model is chosen → for that model's parameters only. Forbidden: writing Python/shell scripts to parse capabilities JSON; use CLI
cawcut capabilities list --models --schema --json --capability <cap> --model "<model_id>",--capability, or--modelfilters (or a one-line--simpleif the host already has it).jq
- After capability is known →
- Choice-first — if the user did not specify enough information, always call /
AskUserQuestionfirst (numbered text only when the tool is unavailable or overflow applies). Fixed or enumerable parameters must always be clickable menus — the user picks options; never types parameter names, capability names, model IDs, or enum values from memory:AskQuestion- image or video output
- text-only, image input, video input, audio input, or omni input
- model options from live discovery, with the BE default first
- enum/options/ranges from the selected model's parameters
- No unbounded preference questions — never ask only "Any preference on resolution, aspect ratio, quality, or number of images?". Always show concrete options from the live schema via /
AskUserQuestion(per Interactive selection above), plus "use default" and "custom" when customization is possible.AskQuestion - Settings menu before running — once prompt/media/capability/model are known, resolve settings in two phases. Image and video use the same shape. Precedence: always use /
AskUserQuestionfor Phase A (one call: defaults / change model / customize) and Phase B (one batched call, one question per axis) when the tool is present — do not merge into a single numbered text block. Workflow step 7 combined text examples are fallback rendering only (tool unavailable, or overflow per model-list / long enum caps).AskQuestion
- Phase A — gate (one /
AskUserQuestioncall):AskQuestion- Choice 1: run now with schema defaults on the current model (show the default values).
- Choice 2: change model — list every model from (or the lean JSON equivalent); mark
cawcut capabilities list --simple --capability <cap>. Model-list overflow:"default": true/AskUserQuestiontypically caps at ~2–4 options per question; when the model count for this capability exceeds that, present a numbered text table (columns:AskQuestion, name, default marker, key specs) instead of an unnumbered list, and tell the user they can reply with either the number or the model name — this mirrors#'s App-picker overflow (Interactive selection rule 7). Apply the same numbered-table treatment to any other live-schema-driven candidate list (models, capabilities, or a longcawcut-app-runenum) that exceeds the cap. On pick, re-fetch schema for the new model (--param), then re-enter Phase A for the new model.--capability <cap> --model "<id>" --schema --json - Choice 3: customize settings — proceed to Phase B.
- Phase B — customize (one batched /
AskUserQuestioncall, one question per axis): build the axis list from the current model's live schema only (Step 5) — different models expose different axes (e.g. GPT Image 2 hasAskQuestion/ratio/resolution/quality; Kling 3.0 Pro hasnum_images/duration/aspect_ratioinstead, nogenerate_audio). For every cost- or visual-impacting axis present (aspect ratio, resolution/size, quality, duration, image count, audio on/off, …), ask one question with its own options, first option always "use default (show value)".resolution - Never fold two different axes into one single-select pick. The point of Phase B is that the user can independently touch any subset of axes while the rest silently default — forcing one exclusive choice among axes (e.g. "customize duration" vs. "customize ratio" as alternatives) drops the unpicked axes without ever showing them.
- /
AskUserQuestioncaps at 4 questions per call. If the current model exposes more than 4 cost/visual-impacting axes, batch the 4 most impactful first; the rest still fall under Rule 12 (advanced/non-impacting params stay defaulted without asking).AskQuestion - A custom numeric value (e.g. a duration inside ) is an option within that axis's own question, not a separate top-level choice.
duration_range
- For common settings (each is its own Phase B question/axis):
- Aspect ratio: list every value or the selected model's ratio/aspect_ratio parameter
aspect_ratios; mark the default. If the schema has no aspect-ratio field, do not invent aoptions.--param - Resolution/size/quality/style: list from the matching parameter; mark defaults. For min/max ranges, show default, min, max, and "custom within range".
options - Image count: offer ,
1,2,3with4marked default unless the schema says otherwise. If the model has1, usenum_images; otherwise use--param num_images=N.--loop N - Video duration: list ; for
durations, show default, min, max, and custom seconds within range.duration_range - Boolean toggle (e.g. ): offer On (default) / Off as the two options for that axis's question whenever the parameter description flags a cost/time effect (Rule 14).
generate_audio
- Do not ask for advanced params the user did not mention unless they are required or clearly cost/visual-impacting. Use defaults from the live model schema for the rest.
- Session reuse — after the first generation, capture from the JSON result. For every follow-up
workflow_idin the same session, passgenerate— including when capability or model changes (e.g. text-to-image → image-to-image → text-to-video). Each call appends new generation nodes to that workflow (history is preserved). Omit--workflow-id <id>only when the user explicitly wants a new project or the request is clearly unrelated to this session.--workflow-id - Multi-image / multi-candidate () —
--loopis how many parallel generation nodes to add in this request (max 4). It is not how many times the workflow runs overall. If the user wants more than 4 candidates (e.g. "5 candidates"), do not call CLI; reply that the model/platform supports at most 4 parallel candidates. Forloop: if the model schema hasN≤4and the user wants multiple images in one API call, prefernum_images; otherwise use--param num_images=N(works for image and video). Credits and time scale roughly with--loop N(and withloopper node when set).num_images - Never assume models or params from training data — available models depend on the user's plan. Always discover via CLI first.
- Never use illustrative media examples as actual inputs. When ,
--image, or--videois required, any example URL or path in SKILL.md,--audio, model schema, or docs (includingreferences/,cdn.example.complaceholders) is hint only — not a usable resource. Do not pass them to the CLI unless the user explicitly provided that exact file or URL in this conversation.@/path/to/file - Media input — menu, not invented assets — always present the three-way branch via /
AskUserQuestionper Interactive selection (above). The numbered list below is text fallback shape only. Same bar asAskQuestion. For required media, offer: 1) file already in chat 2) HTTPS URL 3) local path. Map the choice tocawcut-app-run/--image/--videoyourself. If required media is missing, show this menu and wait — do not run with fabricated or placeholder examples.--audio - Don't pre-inspect local media before attempting — do not shell out to
generate/ls/file(or similar) to check a local file's size or dimensions before running. Attemptsips -g pixelWidth/pixelHeightdirectly; if upload pre-flight fails, the CLI's error already reports the exact size/dimension and its limit — act on that error (see "Upload limits" above / Errors below), not on a manual inspection you ran first.cawcut generate
- 简洁明了。默认输出为结果URL。除调试场景外,请勿输出原始JSON。
- 始终传递参数——任务为异步执行,CLI会阻塞直至任务完成并打印结果URL。
--wait - 图像和视频生成时始终传递参数。CLI会自动适配平台对应的下载文件夹(macOS/Linux为
--download,Windows为~/Downloads)——请勿硬编码路径或自行下载结果。仅当用户明确表示只需要URL时,才跳过%USERPROFILE%\Downloads参数。--download - 回复语言:
- 裸技能调用→英文。若用户仅运行技能命令而无实质性文本(例如、
/cawcut-generate或仅技能名称),则将cawcut-generate设置为英文,用于菜单、摘要和提问。reply_language - 后续跟随对话语言。一旦用户用其他语言添加了实际请求或后续内容,则将切换为该语言,直至会话结束(除非用户明确要求使用英文)。
reply_language - 所有文字内容、状态摘要、选项标签、提问和恢复指导均使用。
reply_language - CLI命令/参数、模型ID、应用ID、JSON键、URL和原始错误代码保持英文。
- 请勿将原始英文CLI输出直接作为面向用户的回复;请使用进行总结。
reply_language
- 裸技能调用→英文。若用户仅运行技能命令而无实质性文本(例如
- 请勿使用curl调用CawCut HTTP API——CLI会处理认证、媒体上传和令牌刷新。
- 优先匹配模板——参见上方步骤1(优先检查应用目录);该步骤针对所有请求运行,不仅是听起来像模板的请求。当用户选择提供的应用时,请遵循的选择应用时披露信息规则——明确应用名称,展示元数据+输入表格,再通过菜单收集输入;绝不要只说「这个应用」而不提供详细信息。
cawcut-app-run - 分阶段发现(强制要求)——切勿一次性获取所有功能的完整schema(不带参数的
--capability会输出约100KB数据,可能被截断)。请改用以下顺序:cawcut capabilities list --models --schema --json- 确定功能后 → 使用(或
cawcut capabilities list --simple --capability <cap>)选择模型。--models --json --capability <cap> - 选定模型后 → 使用获取该模型的参数。 禁止操作:编写Python/Shell脚本解析功能JSON;请使用CLI的
cawcut capabilities list --models --schema --json --capability <cap> --model "<model_id>"、--capability或--model过滤器(若平台已预装jq,可使用单行jq命令)。--simple
- 确定功能后 → 使用
- 优先选择——若用户未提供足够信息,必须优先调用/
AskUserQuestion工具(仅当工具不可用或超出限制时,才使用编号文本菜单)。固定或可枚举参数必须始终为可点击菜单——用户选择选项;绝不要要求用户凭记忆输入参数名称、功能名称、模型ID或枚举值:AskQuestion- 图像或视频输出类型
- 纯文本输入、图像输入、视频输入、音频输入或全媒输入
- 实时发现的模型选项,默认模型排在首位
- 选定模型参数中的枚举/选项/范围
- 禁止开放式偏好提问——绝不要只问「对分辨率、宽高比、质量或图像数量有偏好吗?」。必须通过/
AskUserQuestion展示实时schema中的具体选项(参见上述「交互式选择」规则),并在支持自定义时提供「使用默认值」和「自定义」选项。AskQuestion - 运行前设置菜单——确定提示语/媒体/功能/模型后,分两个阶段确认设置。图像和视频场景使用相同流程。优先级:工具可用时,必须对阶段A(单次调用:默认设置/更换模型/自定义)和阶段B(单次批量调用,每个维度一个问题)使用/
AskUserQuestion——请勿合并为单个编号文本块。工作流步骤7的组合文本示例仅为备选展示形式(工具不可用,或因模型列表/长枚举超出限制)。AskQuestion- 阶段A — 入口(单次/
AskUserQuestion调用):AskQuestion- 选项1:使用当前模型的schema默认值立即运行(展示默认值)。
- 选项2:更换模型——列出(或等效精简JSON)中的所有模型;标记
cawcut capabilities list --simple --capability <cap>的模型。模型列表溢出:"default": true/AskUserQuestion通常单次调用最多支持约2–4个选项;当该功能的模型数量超出此限制时,请使用编号文本表格(列:AskQuestion、名称、默认标记、关键规格)替代无序列表,并告知用户可回复编号或模型名称——这与#的应用选择器溢出处理一致(交互式选择规则7)。对任何其他实时schema驱动的候选列表(模型、功能或长cawcut-app-run枚举)超出限制的情况,均使用相同的编号表格处理。用户选择后,重新获取新模型的schema(--param),然后针对新模型重新进入阶段A。--capability <cap> --model "<id>" --schema --json - 选项3:自定义设置——进入阶段B。
- 阶段B — 自定义(单次批量/
AskUserQuestion调用,每个维度一个问题):仅从当前模型的实时schema(步骤5)构建维度列表——不同模型暴露的维度不同(例如GPT Image 2包含AskQuestion/ratio/resolution/quality;Kling 3.0 Pro包含num_images/duration/aspect_ratio,无generate_audio)。对于所有存在的成本或视觉影响维度(宽高比、分辨率/尺寸、质量、时长、图像数量、音频开关等),每个维度单独提问,第一个选项始终为「使用默认值(展示值)」。resolution - 绝不要将两个不同维度合并为一个单选选项。阶段B的核心是用户可独立调整任意维度子集,其余维度自动默认——强制用户在维度间选择互斥选项(例如「自定义时长」vs「自定义比例」作为二选一)会导致未选中的维度被隐藏,用户无法知晓。
- /
AskUserQuestion单次调用最多支持4个问题。若当前模型暴露的成本/视觉影响维度超过4个,则优先处理影响最大的4个;其余维度仍遵循规则12(高级/无影响参数保持默认,无需询问)。AskQuestion - 自定义数值(例如内的时长)是该维度问题中的一个选项,而非独立的顶级选项。
duration_range
- 阶段A — 入口(单次
- 常见设置(每个设置对应阶段B的一个问题/维度):
- 宽高比:列出所有值或选定模型的ratio/aspect_ratio参数
aspect_ratios;标记默认值。若schema中无宽高比字段,则请勿自定义options参数。--param - 分辨率/尺寸/质量/风格:列出对应参数的;标记默认值。对于最小/最大范围,展示默认值、最小值、最大值和「范围内自定义」。
options - 图像数量:提供、
1、2、3选项,默认4,除非schema另有规定。若模型支持1参数,则使用num_images;否则使用--param num_images=N。--loop N - 视频时长:列出;对于
durations,展示默认值、最小值、最大值和范围内自定义秒数。duration_range - 布尔开关(例如):当参数描述标注有成本/时间影响时(规则14),该维度问题提供开启(默认)/关闭两个选项。
generate_audio
- 宽高比:列出所有
- 除非用户明确提及,否则请勿询问高级参数,仅当参数为必填或明显影响成本/视觉效果时才需询问。其余参数使用实时模型schema的默认值。
- 会话复用——首次生成后,从JSON结果中捕获。在同一会话中的每一次后续
workflow_id调用中,传递generate——即使功能或模型发生变化(例如text-to-image→image-to-image→text-to-video)。每次调用都会追加新的生成节点到该工作流(保留历史记录)。仅当用户明确要求新项目或请求与当前会话明显无关时,才省略--workflow-id <id>。--workflow-id - 多图像/多候选()——
--loop表示本次请求中添加的并行生成节点数量(最大4个)。它不是工作流的总运行次数。若用户想要超过4个候选(例如「5个候选」),请勿调用CLI;回复用户模型/平台最多支持4个并行候选。当loop时:若模型schema支持N≤4且用户希望单次API调用生成多张图像,则优先使用num_images;否则使用--param num_images=N(适用于图像和视频场景)。Credits和时间大致与--loop N(以及每个节点设置的loop)成正比。num_images - 绝不要从训练数据中假设模型或参数——可用模型取决于用户的套餐。始终通过CLI实时发现。
- 绝不要将示例媒体作为实际输入。当需要、
--image或--video参数时,SKILL.md、--audio、模型schema或文档中的任何示例URL或路径(包括references/、cdn.example.com占位符)仅作为提示——不可用资源。除非用户在本次对话中明确提供了该文件或URL,否则请勿将其传递给CLI。@/path/to/file - 媒体输入——菜单选择,而非虚构资源——必须通过/
AskUserQuestion提供三分支选项(参见上述「交互式选择」规则)。下方编号列表仅为文本备选形式。与AskQuestion要求一致。对于必填媒体,提供:1)聊天中已有的文件 2)HTTPS URL 3)本地路径。自行将选择映射到cawcut-app-run/--image/--video参数。若缺少必填媒体,请展示该菜单并等待——请勿使用虚构或占位符示例媒体运行命令。--audio - 运行前无需预检查本地媒体——请勿执行
generate/ls/file(或类似命令)检查本地文件的大小或尺寸。直接尝试sips -g pixelWidth/pixelHeight;若上传预检失败,CLI错误会准确报告具体大小/尺寸及其限制——根据该错误采取行动(参见上方「上传限制」/下方「错误处理」),而非手动预检查。cawcut generate
Capabilities
功能列表
| What it does | Media input |
|---|---|---|
| Text → image | — |
| Text → video | — |
| Edit / stylize image | |
| Animate a still | |
| Any media → video | at least one of |
| 功能说明 | 媒体输入要求 |
|---|---|---|
| 文本转图像 | — |
| 文本转视频 | — |
| 编辑/风格化图像 | 必须提供 |
| 静态图像动效化 | 必须提供 |
| 任意媒体转视频 | 必须提供至少一个 |
Discover models and parameters (required)
发现模型和参数(强制要求)
Use staged CLI discovery — do not pull full schema for all five capabilities at once.
Step A — pick capability (if not already obvious from the user request):
bash
cawcut capabilities listStep B — list models for that capability only (after capability is known):
bash
cawcut capabilities list --simple --capability text-to-video使用分阶段CLI发现——请勿一次性获取所有五个功能的完整schema。
阶段A — 选择功能(若无法从用户请求中明确推断):
bash
cawcut capabilities list阶段B — 仅列出该功能的模型(确定功能后):
bash
cawcut capabilities list --simple --capability text-to-videoor: cawcut capabilities list --models --json --capability text-to-image
或:cawcut capabilities list --models --json --capability text-to-image
Each `--simple` line is `model_id: name` with `(default)` when applicable. Split on the **first** colon only.
**Step C — load parameters for the chosen model only**:
```bash
cawcut capabilities list --models --schema --json --capability text-to-video --model "Seedance 2.0"This returns a small JSON payload (one capability, one model) with BE-sourced metadata:
- ,
model_id,namedefault - — names, types, defaults, options, min/max, descriptions
parameters - ,
aspect_ratios,durationswhen applicableduration_range - — input limits for image/video/audio capabilities (count, roles, and optional per-model
medias)limit
Never run bare (all capabilities) unless the user explicitly asks to browse every capability's full schema at once.
cawcut capabilities list --models --schema --jsonUpload limits (platform): Before uploading local files, CLI loads and validates size/format/dimensions. CLI does not compress. On failure, do not just print the error and stop, and never suggest CawCut Web as a workaround — always call / first with: (1) compress/resize it for you now via / and retry automatically, (2) they'll fix it and re-upload, or (3) cancel. Numbered text only if the tool is unavailable. If they pick (1), run the fix command yourself, then retry the upload. See for the exact commands per failure type. Run to show current caps.
GET /developer/configAskUserQuestionAskQuestionsipsffmpegreferences/troubleshooting.mdcawcut config limitsRules:
- Only suggest or pass values that appear in the JSON for the chosen capability.
--model - Read keys and allowed values from that model's
--param(and related fields). Do not invent param names.parameters - Treat BE's as the source of truth. Each capability should have exactly one default; if none or more than one is present, ask the user to choose from the listed models.
"default": true - For the default model, omit , or pass its
--modelexplicitly.model_id - Only when live discovery is unavailable and the user still asks to proceed, use fallback defaults: image/image edit = ; video/animate/omni =
gpt-image-2.Seedance 2.0 - Quote values that contain spaces or parentheses.
model_id
Human-readable summary (names only, no parameters):
bash
cawcut capabilities list --modelsHuman-readable summary with parameters (text, not JSON — for a quick look, not for building the table below):
bash
cawcut capabilities list --schemaSee for a short field guide — not a model catalog.
references/models.md
`--simple`输出的每一行格式为`model_id: name`,默认模型会标记`(default)`。仅按**第一个**冒号分割。
**阶段C — 仅加载选定模型的参数**:
```bash
cawcut capabilities list --models --schema --json --capability text-to-video --model "Seedance 2.0"该命令返回一个小型JSON payload(仅包含一个功能、一个模型),包含后端提供的元数据:
- 、
model_id、namedefault - ——名称、类型、默认值、选项、最小/最大值、描述
parameters - 适用时提供、
aspect_ratios、durationsduration_range - ——图像/视频/音频功能的输入限制(数量、角色,以及可选的模型专属
medias)limit
绝不要运行裸命令(获取所有功能),除非用户明确要求一次性浏览所有功能的完整schema。
cawcut capabilities list --models --schema --json平台上传限制:上传本地文件前,CLI会加载并验证大小/格式/尺寸。CLI不会压缩文件。若上传失败,请勿仅打印错误并停止,也不要建议用户使用CawCut Web作为替代方案——必须优先调用/工具,提供以下选项:(1) 立即通过/为你压缩/调整大小并自动重试,(2) 用户自行修复后重新上传,(3) 取消。仅当工具不可用时,才使用编号文本菜单。若用户选择(1),自行运行修复命令,然后重试上传。请参考获取针对不同失败类型的具体命令。运行查看当前限制。
GET /developer/configAskUserQuestionAskQuestionsipsffmpegreferences/troubleshooting.mdcawcut config limits规则:
- 仅建议或传递选定功能JSON中存在的值。
--model - 从该模型的(及相关字段)中读取
parameters键和允许值。请勿自定义参数名称。--param - 将后端的视为唯一可信来源。每个功能应仅有一个默认模型;若没有或有多个默认模型,请让用户从列出的模型中选择。
"default": true - 对于默认模型,可省略参数,或显式传递其
--model。model_id - 仅当无法实时发现模型且用户仍要求继续时,使用备选默认值:图像/图像编辑 = ;视频/动效化/全媒 =
gpt-image-2。Seedance 2.0 - 若包含空格或括号,请添加引号。
model_id
人类可读摘要(仅名称,无参数):
bash
cawcut capabilities list --models带参数的人类可读摘要(文本格式,非JSON——用于快速查看,而非构建下表):
bash
cawcut capabilities list --schema请参考获取简短字段指南——并非模型目录。
references/models.mdPresent parameters to users (required)
向用户展示参数(强制要求)
cawcut capabilities list --modelscawcut capabilities list --schema--models--jsoncawcut capabilities list --models --json --capability <cap>model_idnamecapabilitydefault--schema--model "<id>"parametersaspect_ratiosdurationsduration_rangemediascawcut capabilities list --simple --capability <cap>When the user asks what a model supports or which settings to pick, build a markdown table from live JSON for the selected capability + model:
| Name | Type | Constraints / options | Default | Required | Notes |
|---|
Row mapping from JSON :
parameters[]| JSON field | Table column |
|---|---|
| Name — the |
| Type ( |
| Constraints — comma-join |
| Default — |
| Required — |
| Notes — e.g. |
Also include non- fields when present:
parameters| Source field | Present as |
|---|---|
| Extra row or note for ratio when no |
| Row for video length |
| Separate media inputs table (below) |
Top-level | Row: |
CLI flags table — show once when explaining (not per model):
cawcut generate| Name | Type | Constraints / options | Default | Required | Notes |
|---|---|---|---|---|---|
| string | — | — | yes | positional arg |
| enum | | — | yes | sets input/output mode |
| string | | capability default | no | quote if spaces |
| key=value | from selected model | per-field defaults | no | repeatable; arrays/objects as JSON string |
| file | url | local path or HTTPS | — | yes for image/omni caps | repeatable; local auto-upload |
| file | url | local path or HTTPS | — | omni optional | repeatable |
| file | url | local path or HTTPS | — | omni optional | repeatable |
| number | 1–4 | 1 | no | parallel candidates; not workflow run count |
| string | existing workflow UUID | — | no | reuse same project for all session follow-ups |
| flag | — | off | recommended | block until task completes |
| flag | path | omit = system Downloads | off | recommended | auto-save image/video |
| flag | — | off | recommended | structured output; preserves signed URLs |
Example — GPT Image 2 / (shape reference; values must match live JSON):
text-to-image| Name | Type | Constraints / options | Default | Required | Notes |
|---|---|---|---|---|---|
| string | — | — | yes | text description |
| string | | | no | |
| string | | | no | |
| string | | | no | |
| number | 1–4 | | no | multiple images per API call; or use |
Example — GPT Image 2 / — same params plus:
image-to-image| Name | Type | Constraints / options | Default | Required | Notes |
|---|---|---|---|---|---|
| file | url | up to 16 reference images | — | yes | |
Always re-fetch JSON before presenting — plans and BE config change.
cawcut capabilities list --modelscawcut capabilities list --schema--models--jsoncawcut capabilities list --models --json --capability <cap>model_idnamecapabilitydefaultparametersaspect_ratiosdurationsduration_rangemedias--schema--model "<id>"cawcut capabilities list --simple --capability <cap>当用户询问模型支持的功能或应选择哪些设置时,从实时JSON中为选定功能+模型构建markdown表格:
| 名称 | 类型 | 约束/选项 | 默认值 | 必填 | 说明 |
|---|
JSON 到表格行的映射:
parameters[]| JSON字段 | 表格列 |
|---|---|
| 名称—— |
| 类型( |
| 约束——逗号分隔 |
| 默认值——无默认值时填 |
| 必填——仅当 |
| 说明——例如 |
当存在非字段时,也需包含:
parameters| 来源字段 | 展示形式 |
|---|---|
| 无 |
| 视频时长行 |
| 单独的媒体输入表格(位于下方) |
顶层 | 行: |
CLI参数表格——解释时展示一次(无需每个模型都展示):
cawcut generate| 名称 | 类型 | 约束/选项 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|---|
| string | — | — | yes | 位置参数 |
| enum | | — | yes | 设置输入/输出模式 |
| string | 仅使用JSON中的 | 功能默认模型 | no | 含空格时需加引号 |
| key=value | 来自选定模型的 | 各字段默认值 | no | 可重复使用;数组/对象使用JSON字符串 |
| file | url | 本地路径或HTTPS地址 | — | 图像/全媒功能必填 | 可重复使用;本地文件自动上传 |
| file | url | 本地路径或HTTPS地址 | — | 全媒功能可选 | 可重复使用 |
| file | url | 本地路径或HTTPS地址 | — | 全媒功能可选 | 可重复使用 |
| number | 1–4 | 1 | no | 并行候选数;非工作流运行次数 |
| string | 现有工作流UUID | — | no | 会话后续请求复用同一项目 |
| flag | — | off | 推荐 | 阻塞直至任务完成 |
| flag | path | 省略则使用系统默认下载文件夹 | off | 推荐 | 自动保存图像/视频 |
| flag | — | off | 推荐 | 结构化输出;保留签名URL |
示例 — GPT Image 2 / (格式参考;值必须与实时JSON匹配):
text-to-image| 名称 | 类型 | 约束/选项 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|---|
| string | — | — | yes | 文本描述 |
| string | | | no | |
| string | | | no | |
| string | | | no | |
| number | 1–4 | | no | 单次API调用生成多张图像;或使用 |
示例 — GPT Image 2 / ——除上述参数外,额外添加:
image-to-image| 名称 | 类型 | 约束/选项 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|---|
| file | url | 最多16张参考图像 | — | yes | |
展示前请重新获取JSON——套餐和后端配置可能发生变化。
Workflow
工作流
- Check the App catalog — see Step 1 above (runs for every request, with the decide-once guard and the bare-invoke exception). Continue below only after the user chooses official generation or no App matches.
- Discover capability — infer from the user request or offer image vs video + input mode choices.
- List models — (or lean
cawcut capabilities list --simple --capability <cap>). Put the default model first in menus.--models --json --capability <cap> - Pick output and input mode with choices (when not obvious):
- Image output: or
text-to-imageimage-to-image - Video output: ,
text-to-video, orimage-to-videoIf the user's prompt/media makes the answer obvious, state the inferred choice and continue. If not, always callomni-to-video/AskUserQuestionfirst (per Interactive selection above); numbered menu inAskQuestiononly when the tool is unavailable. Bare invoke, zero signal: callreply_language/AskUserQuestionfor Image vs Video in this same turn — do not defer it while waiting to also collect the subject in plain text. The subject/idea ask (free text, unbounded) runs alongside it, never merged into one sentence with the image/video choice.AskQuestion
- Image output:
- Choose model — from Step 2 output only. Put the /
"default": truemodel first and mark it recommended; offer change model again in the settings menu (UX rule 10) for both image and video.(default) - Load schema — before building param tables or the settings menu.
cawcut capabilities list --models --schema --json --capability <cap> --model "<model_id>" - Collect prompt/media — ask for the generation prompt and any required ,
--image, or--videoinput. If required media is missing, show the three-way menu (UX rules 16–17) and wait for the user's real file or URL — never substitute example or placeholder media from docs or schema.--audio - Present the settings menu before generating, per Rule 10's two phases. Must include change model in Phase A (same for image and video). Do not ask an open-ended preference question.
Fallback example (English) — when / is unavailable or overflow applies (shape reference only — every value shown, including which one is "(default)", must come from that model's live schema, not from this example):
AskUserQuestionAskQuestionPhase A — single-select gate (text fallback):
Run with defaults, change model, or customize settings:
1. Use defaults (recommended) on GPT Image 2: ratio 16:9, resolution 1K, quality low, count 1
2. Change model: GPT Image 2 (default) / GPT Image 1 / …
3. Customize settingsIf the user picks 3, Phase B (text fallback shape for one axis — repeat per axis, or batch via / ):
AskUserQuestionAskQuestion- Aspect ratio: 16:9 (default) / 1:1 / 9:16 / 4:3 / 3:4 / custom
- Resolution: 1K (default) / 2K / 4K
- Quality: low (default) / medium / high
- Count: 1 (default) / 2 / 3 / 4When / is available (required path) — same GPT Image 2 / scenario, decomposed (labels in ):
AskUserQuestionAskQuestiontext-to-imagereply_language- Phase A gate — one /
AskUserQuestioncall:AskQuestion- — Run with schema defaults on current model (show default values)
Use defaults - — Open model picker (overflow → numbered text table per Rule 10 if model count exceeds cap)
Change model - — Proceed to Phase B
Customize settings
- Phase B customize — one batched /
AskUserQuestioncall, one question per axis (never one pick across axes):AskQuestion- Aspect ratio — options from live schema; first option = use default (show value)
- Resolution — same pattern
- Quality — same pattern
- Count — same pattern
Video example — Phase B axes come from that model's own schema, not GPT Image 2's (tool-available: same batched one-question-per-axis pattern; text fallback shape):
- Duration: 5s (default) / 10s / 15s / custom (4–15s)
- Aspect ratio: adaptive (default) / 16:9 / 9:16 / 1:1 / 21:9 / 4:3 / 3:4
- Resolution: 720p (default) / 480p / 1080p / 4k
- Audio: On (default) / OffA model like Kling 3.0 Pro exposes no axis but does have — build Phase B strictly from that model's live //; never reuse another model's axis list or default marker.
resolutiongenerate_audioparametersaspect_ratiosduration_rangeIf the user later writes in another language, present the same menu in .
reply_languageOnly include options that exist in the selected model's schema. If a schema uses different values (for example , , , , or numeric seconds), display those exact values instead.
8. Build flags from the chosen model's / / . Use selected values, or schema defaults when the user chooses the default option.
9. Run with :
squareportraitlandscape1024x1024--paramparametersdurationsaspect_ratios--wait --jsonPre-flight check (do this immediately before building the command): Has been run for this user message before routing for the current subject/capability/style? If no → stop and go back to Step 1 now. Do not call first. A prior user message's catalog check or "no match" does not count.
cawcut app list --jsoncawcut generatebash
cawcut generate "<prompt>" \
--capability <capability> \
[--model "<model_id from JSON>"] \
[--param key=value ...] \
[--loop <1-4>] \
[--image|--video|--audio <file|url>] \
--wait --download --jsonArray/object params use JSON in the value:
bash
--param 'colors=[]'
--param 'colors=["#004035","#008C65","#025940","#008C3E","#072621"]'- Capture for every session follow-up (any capability or model):
workflow_id
bash
cawcut generate "<revised prompt>" \
--capability <cap> \
--workflow-id <id from prior JSON> \
--wait --download --jsonWhen switching to a media capability (e.g. image-to-image after text-to-image), pass / / with the prior entry or user-provided file — nodes are appended side-by-side; BE does not auto-wire prior outputs.
--image--video--audioresult_urlsOmit only for a clearly unrelated request or when the user asks for a new project.
--workflow-id- Deliver — parse JSON; share every /
result_urls. Use exact signed URLs (do not strip query parameters). Always also reportlocal_paths(orcredits_usedifcredits_estimateis absent) andcredits_used(orcredits_balance) from the same JSON — every single completed generation, even back-to-back ones in the same session. Never omit this because it was already shown for a prior task.credits_balance_error
- 检查应用目录——参见上方步骤1(针对所有请求运行,包含一次决策防护和裸调用例外)。仅当用户选择官方生成或无匹配应用时,才继续下方流程。
- 发现功能——从用户请求中推断,或提供图像/视频+输入模式选项供选择。
- 列出模型——使用(或精简版
cawcut capabilities list --simple --capability <cap>)。菜单中默认模型排在首位。--models --json --capability <cap> - 选择输出和输入模式(不明确时):
- 图像输出:或
text-to-imageimage-to-image - 视频输出:、
text-to-video或image-to-video若用户的提示语/媒体明确指向某一选项,则说明推断结果并继续。否则,必须优先调用omni-to-video/AskUserQuestion工具(参见上述「交互式选择」规则);仅当工具不可用时,才使用AskQuestion对应的编号菜单。 裸调用、无任何信号:在同一回合调用reply_language/AskUserQuestion让用户选择图像或视频——请勿推迟该选择,同时等待用户以纯文本提供主题。主题/创意询问(自由文本、无限制)可与该选择并行进行,绝不要合并为一句话。AskQuestion
- 图像输出:
- 选择模型——仅从步骤2的输出中选择。将/
"default": true模型排在首位并标记为推荐;在设置菜单中(UX规则10)再次提供更换模型选项,图像和视频场景均适用。(default) - 加载schema——在构建参数表格或设置菜单前,运行。
cawcut capabilities list --models --schema --json --capability <cap> --model "<model_id>" - 收集提示语/媒体——询问生成提示语及任何必填的、
--image或--video输入。若缺少必填媒体,展示三分支菜单(UX规则16–17)并等待用户提供实际文件或URL——绝不要使用文档或schema中的示例或占位符媒体替代。--audio - 生成前展示设置菜单——遵循规则10的两个阶段。阶段A必须包含更换模型选项(图像和视频场景相同)。请勿询问开放式偏好问题。
备选示例(英文)——当/不可用或超出限制时(仅为格式参考——所有展示值,包括标记为「(default)」的选项,必须来自该模型的实时schema,而非本示例):
AskUserQuestionAskQuestion阶段A — 单选入口(文本备选):
选择使用默认设置、更换模型或自定义设置:
1. 使用GPT Image 2的默认设置(推荐):比例16:9、分辨率1K、质量低、数量1
2. 更换模型:GPT Image 2(默认)/ GPT Image 1 / …
3. 自定义设置若用户选择3,阶段B(单个维度的文本备选格式——每个维度重复此格式,或通过/批量处理):
AskUserQuestionAskQuestion- 宽高比:16:9(默认)/ 1:1 / 9:16 / 4:3 / 3:4 / 自定义
- 分辨率:1K(默认)/ 2K / 4K
- 质量:低(默认)/ 中 / 高
- 数量:1(默认)/ 2 / 3 / 4工具可用时(强制流程)——同一GPT Image 2 / 场景,拆解为以下步骤(标签使用):
text-to-imagereply_language- 阶段A入口——单次/
AskUserQuestion调用:AskQuestion- — 使用当前模型的schema默认值运行(展示默认值)
使用默认设置 - — 打开模型选择器(超出限制时,遵循规则10使用编号文本表格)
更换模型 - — 进入阶段B
自定义设置
- 阶段B自定义——单次批量/
AskUserQuestion调用,每个维度一个问题(绝不要跨维度合并为一个选项):AskQuestion- 宽高比 — 选项来自实时schema;第一个选项为「使用默认值(展示值)」
- 分辨率 — 相同格式
- 质量 — 相同格式
- 数量 — 相同格式
视频示例 — 阶段B维度来自该模型自身的schema,而非GPT Image 2的schema(工具可用时:相同的批量单维度问题格式;文本备选格式):
- 时长:5秒(默认)/ 10秒 / 15秒 / 自定义(4–15秒)
- 宽高比:自适应(默认)/ 16:9 / 9:16 / 1:1 / 21:9 / 4:3 / 3:4
- 分辨率:720p(默认)/ 480p / 1080p / 4k
- 音频:开启(默认)/ 关闭类似Kling 3.0 Pro的模型不暴露维度,但包含——严格根据该模型的实时//构建阶段B;绝不要复用其他模型的维度列表或默认标记。
resolutiongenerate_audioparametersaspect_ratiosduration_range若用户后续使用其他语言,使用展示相同菜单。
reply_language仅包含选定模型schema中存在的选项。若schema使用不同值(例如、、、或数字秒数),则展示这些精确值。
8. 构建参数——从选定模型的//中构建。使用用户选择的值,或当用户选择默认选项时使用schema默认值。
9. 使用运行命令:
squareportraitlandscape1024x1024--paramparametersdurationsaspect_ratios--wait --json预检(运行命令前立即执行):针对本次用户消息的当前主题/功能/风格,是否已运行?若否 → 立即停止,返回步骤1。请勿先调用。之前用户消息回合的目录检查或「无匹配」结论无效。
cawcut app list --jsoncawcut generatebash
cawcut generate "<prompt>" \
--capability <capability> \
[--model "<model_id from JSON>"] \
[--param key=value ...] \
[--loop <1-4>] \
[--image|--video|--audio <file|url>] \
--wait --download --json数组/对象参数的值使用JSON格式:
bash
--param 'colors=[]'
--param 'colors=["#004035","#008C65","#025940","#008C3E","#072621"]'- **捕获**用于会话后续所有请求(任何功能或模型):
workflow_id
bash
cawcut generate "<revised prompt>" \
--capability <cap> \
--workflow-id <id from prior JSON> \
--wait --download --json切换到媒体功能时(例如text-to-image之后的image-to-image),传递//参数,值为之前的条目或用户提供的文件——节点会并排追加;后端不会自动连接之前的输出。
--image--video--audioresult_urls仅当请求与当前会话明显无关或用户要求新项目时,才省略。
--workflow-id- 交付结果——解析JSON;分享所有/
result_urls。使用完整签名URL(请勿剥离查询参数)。必须同时报告同一JSON中的local_paths(若credits_used缺失则报告credits_used)和credits_estimate(或credits_balance)——每一次完成的生成,即使是同一会话中的连续生成,都必须报告。绝不要因之前任务已展示过而省略。credits_balance_error
Async tasks
异步任务
The CLI prints before polling. Capture it as a recovery handle.
Task: <task_id>- With : CLI blocks, then prints result URLs on success.
--wait - Without :
--waitcawcut task status <task_id> --wait - On timeout: resume with
cawcut task status <task_id> --wait
CLI在轮询前会打印。将其作为恢复句柄。
Task: <task_id>- 使用:CLI会阻塞,成功后打印结果URL。
--wait - 不使用:
--waitcawcut task status <task_id> --wait - 超时:使用恢复
cawcut task status <task_id> --wait
Errors
错误处理
| Symptom | Action |
|---|---|
| Run |
| |
Invalid | Re-run |
| CLI not found | |
See and (discovery guide only).
references/troubleshooting.mdreferences/models.md| 症状 | 操作 |
|---|---|
| 通过Bash运行 |
| 运行 |
无效 | 为用户重新运行 |
| CLI未找到 | 运行 |
请参考和(仅为发现指南)。
references/troubleshooting.mdreferences/models.md