SuperAPI AI 工具集

kata-set-profile

智能体与模型

查看项目

更新于 10-16 03:59

技能介绍

用途

kata-set-profile 用于切换 kata 智能体(agents)所使用的模型配置档(model profile)。可选的配置档有三个:quality、balanced、budget。触发方式包括 "set profile"、"set profile"。

主要能力

该技能会校验传入的 profile 参数是否合法,检查当前目录下是否存在 Kata 项目,读取并更新项目配置文件中的 model_profile 字段,最后输出确认信息以及所选配置档对应的智能体与模型对照表。

使用方式

  1. 校验参数:如果 $ARGUMENTS.profile 不在 ["quality", "balanced", "budget"] 中,则报错并停止:
Error: Invalid profile "$ARGUMENTS.profile"
Valid profiles: quality, balanced, budget
STOP
  1. 检查项目:执行 ls .planning/config.json 2>/dev/null。如果没有 .planning/ 目录,则报错:
Error: No Kata project found.
Run /kata-new-project first to initialize a project.
  1. 更新 config.json:读取当前配置 cat .planning/config.json,更新 model_profile 字段(若缺失则添加):
{
  "model_profile": "$ARGUMENTS.profile"
}

将更新后的配置写回 .planning/config.json。

  1. 确认:输出 ✓ Model profile set to: $ARGUMENTS.profile,并展示所选配置档对应的模型对照表(来自 model-profiles.md)。后续生成的智能体将使用新的配置档。

示例:切换到 budget 模式:

/kata-set-profile budget

✓ Model profile set to: budget

Agents will now use:
| Agent         | Model  |
| ------------- | ------ |
| kata-planner  | sonnet |
| kata-executor | sonnet |
| kata-verifier | haiku  |
| ...           | ...    |

示例:切换到 quality 模式:

/kata-set-profile quality

✓ Model profile set to: quality

Agents will now use:
| Agent         | Model  |
| ------------- | ------ |
| kata-planner  | opus   |
| kata-executor | opus   |
| kata-verifier | sonnet |
| ...           | ...    |

适用场景

适用于已初始化的 Kata 项目,需要在不同模型配置档之间切换,以在质量与成本之间做出取舍时使用。

限制

必须在存在 .planning/ 目录的 Kata 项目中使用,否则会提示先运行 /kata-new-project 初始化项目。profile 参数仅接受 quality、balanced、budget 三个值。关于各配置档的完整模型对照表,资料中仅给出部分示例,其余以省略号表示,暂未提供完整内容。