reduce-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Reduce setup

Reduce 配置

Ask the user how the reduce skill picks its subagent models, and write
~/.config/reduce/config.json
. The keys and their meanings are in reduce's model table. Read that section first. Do not keep a second copy of it. This skill changes only that file. It does not change the parent model, provider settings, or authentication.
Set
reduce_skill
to the
reduce
folder next to this skill's folder. The driver owns the contract:
"$reduce_skill/scripts/reduce-step" config
validates a file and prints what each step uses. For a question about the current configuration only, run that command, report its output, and stop.
询问用户 reduce skill 如何选择其 subagent 模型,并编写
~/.config/reduce/config.json
。 reduce 的模型表中列出了各个键及其含义。请先阅读该部分。不要保留第二份副本。 此 skill 仅修改该文件,不会更改父级模型、provider 设置或认证信息。
将
reduce_skill
设置为与此 skill 文件夹相邻的
reduce
文件夹。 驱动程序负责维护该约定:
"$reduce_skill/scripts/reduce-step" config
会验证文件并打印每个步骤使用的模型。 如果问题仅涉及当前配置,请运行该命令,报告其输出,然后停止。

1. Read the current state

1. 读取当前状态

  1. Run
    "$reduce_skill/scripts/reduce-step" config
    . It prints the file path,
    exists
    , each step's class, and each harness's models. When it fails, keep its error message: the new file must fix that problem.
  2. Find the current harness from your tools:
    delegate_task
    means
    t3
    , the Agent tool means
    claude-code
    , and
    spawn_agent
    means
    codex
    .
  3. List the models that the current harness can start:
    • t3
      : call
      orchestrator_capabilities
      . Use its provider instance IDs and model IDs exactly.
    • claude-code
      : read the values of the Agent tool's
      model
      parameter.
    • codex
      : read the model choices of
      spawn_agent
      . When it shows no choices, offer only
      null
      .
  4. Follow the current model-routing instructions when they exist. They can forbid models or providers.
You can validate models only for the current harness. For another harness, keep its current entries, or use model names that the user gives you. Report those as not validated.
  1. 运行
    "$reduce_skill/scripts/reduce-step" config
    。它会打印文件路径、
    exists
    、每个步骤的类别,以及每个 harness 的模型。 如果运行失败,请保留其错误消息:新文件必须修复该问题。
  2. 从你的工具中确定当前 harness:
    delegate_task
    表示
    t3
    ,Agent 工具表示
    claude-code
    ,
    spawn_agent
    表示
    codex
    。
  3. 列出当前 harness 可以启动的模型:
    • t3
      :调用
      orchestrator_capabilities
      。请准确使用其 provider instance ID 和 model ID。
    • claude-code
      :读取 Agent 工具
      model
      参数的值。
    • codex
      :读取
      spawn_agent
      的模型选项。如果未显示任何选项,则仅提供
      null
      。
  4. 如果存在当前模型路由说明,请遵循这些说明。它们可能会禁止某些模型或 provider。
你只能针对当前 harness 验证模型。对于其他 harness,请保留其现有条目,或使用用户提供的模型名称。将其报告为未验证。

2. Ask the user

2. 询问用户

Ask only what the user did not already say. Ask at most five questions in one message. Give your recommendation first in each question. Use the question tool when it exists. Otherwise ask in one message, and wait for the answers.
  1. Which harnesses to configure. Recommend the current harness. Keep the entries of the other harnesses unchanged.
  2. For each harness that you configure, the model of each class:
    cheap
    ,
    standard
    , and
    powerful
    .
    • Offer only the models from step 1.3, and
      null
      for the parent's own model.
    • Recommend the smallest capable model for
      cheap
      , a mid-size model for
      standard
      , and the strongest model for
      powerful
      .
    • A class can have a list of models. The subagents then use them in turn, and fall back to the next one when one cannot start. Offer a list for
      cheap
      , because a run has many check subagents.
  3. The class of the
    map
    ,
    design
    , and
    checks
    steps. Recommend the defaults:
    standard
    ,
    standard
    , and
    cheap
    .
  4. map_subagents
    . Recommend
    feature
    . Offer
    one
    to lower the cost of small targets.
When the current file is valid, show its values as the current choices. When the user accepts all of them, change nothing and report that.
仅询问用户尚未说明的信息。每条消息最多提出五个问题。每个问题都应先给出建议。 如果存在 question 工具,请使用该工具;否则在一条消息中提出问题,然后等待用户回答。
  1. 要配置哪些 harness。建议使用当前 harness。其他 harness 的条目保持不变。
  2. 对于要配置的每个 harness,各类别使用的模型:
    cheap
    、
    standard
    和
    powerful
    。
    • 仅提供步骤 1.3 中的模型,并为父级模型自身提供
      null
      。
    • 建议为
      cheap
      选择能够胜任任务的最小模型,为
      standard
      选择中等规模的模型,为
      powerful
      选择最强模型。
    • 一个类别可以包含一个模型列表。随后 subagent 会依次使用这些模型,当某个模型无法启动时回退到下一个模型。建议为
      cheap
      提供模型列表,因为一次运行包含许多 check subagent。
  3. map
    、
    design
    和
    checks
    步骤的类别。建议使用默认值:
    standard
    、
    standard
    和
    cheap
    。
  4. map_subagents
    。建议使用
    feature
    。也可以提供
    one
    ,以降低小型目标的成本。
当当前文件有效时,将其值显示为当前选项。如果用户接受全部选项,则不进行任何更改并予以报告。

3. Write and validate

3. 编写并验证

  1. Make the complete JSON object: the answers, plus every current key and harness entry that the user did not change. Write only the keys from reduce's model table. A T3 model is
    {"provider": "<instance ID>", "model": "<model ID>"}
    .
  2. Write it to
    ~/.config/reduce/config.json.draft
    . Create the folder when it does not exist.
  3. Run
    "$reduce_skill/scripts/reduce-step" config --file ~/.config/reduce/config.json.draft
    . When it fails, correct the draft and validate again. Ask the user only when the correction changes one of their answers. When you stop without a valid draft, delete the draft and keep the current file.
  4. Move the draft to
    ~/.config/reduce/config.json
    with
    mv
    . Then run
    "$reduce_skill/scripts/reduce-step" config
    again.
  1. 构建完整的 JSON 对象:包含用户的回答,以及用户未更改的所有现有键和 harness 条目。 仅写入 reduce 模型表中列出的键。T3 模型格式为
    {"provider": "<instance ID>", "model": "<model ID>"}
    。
  2. 将其写入
    ~/.config/reduce/config.json.draft
    。如果文件夹不存在,请创建。
  3. 运行
    "$reduce_skill/scripts/reduce-step" config --file ~/.config/reduce/config.json.draft
    。 如果验证失败,请修正草稿并再次验证。仅当修正内容会改变用户的某项回答时才询问用户。 如果停止时草稿仍未通过验证,请删除草稿并保留当前文件。
  4. 使用
    mv
    将草稿移动到
    ~/.config/reduce/config.json
    。然后再次运行
    "$reduce_skill/scripts/reduce-step" config
    。

Report

报告

  • The file path, and the class and the models of each step from the last
    config
    output.
  • The harnesses that you validated against a live model list, and the entries that you did not validate.
  • A run that uses a model which cannot start falls back to the next model of the list, or to the parent's model. A run does not show this until a subagent starts.
  • 文件路径,以及最后一次
    config
    输出中每个步骤的类别和模型。
  • 已针对实时模型列表验证的 harness,以及未验证的条目。
  • 如果运行使用的模型无法启动,则会回退到列表中的下一个模型,或回退到父级模型。运行过程在 subagent 启动之前不会显示此回退情况。