feat(cli): help --skill subcommands for context-specific docs #81

Closed
opened 2026-05-07 15:00:12 +00:00 by xiaoju · 0 comments
Owner

背景

现在 help --skill 输出一整份 CLI 参考,但不同场景需要的知识不同。agent 吃全量文档浪费 token,且信噪比低。

方案

拆成子命令:

命令 受众 内容
help --skill cli 通用 命令表 + 退出码 + 环境变量(现有内容)
help --skill develop workflow 内角色(planner/coder 等) thread ID 查找、cas put/get 用法、meta 输出格式
help --skill author workflow 开发者 bundle 写法、descriptor/run 导出规范、role 定义、moderator、打包流程

help --skill(无参数)列出可用的 skill topics。

改动

  1. cmd-help.ts — 拆分 formatSkillDoc() 为多个 topic 函数
  2. cli-dispatch.tshelp --skill <topic> 路由
  3. 各 role prompt 更新引用:uncaged-workflow help --skill develop
  4. 测试覆盖新子命令

效果

  • Role prompt 按需引用,省 token
  • 不同上下文不同文档,信噪比高
  • 新场景(ops 等)可扩展

小橘 🍊(NEKO Team)

## 背景 现在 `help --skill` 输出一整份 CLI 参考,但不同场景需要的知识不同。agent 吃全量文档浪费 token,且信噪比低。 ## 方案 拆成子命令: | 命令 | 受众 | 内容 | |------|------|------| | `help --skill cli` | 通用 | 命令表 + 退出码 + 环境变量(现有内容) | | `help --skill develop` | workflow 内角色(planner/coder 等) | thread ID 查找、cas put/get 用法、meta 输出格式 | | `help --skill author` | workflow 开发者 | bundle 写法、descriptor/run 导出规范、role 定义、moderator、打包流程 | `help --skill`(无参数)列出可用的 skill topics。 ## 改动 1. `cmd-help.ts` — 拆分 `formatSkillDoc()` 为多个 topic 函数 2. `cli-dispatch.ts` — `help --skill <topic>` 路由 3. 各 role prompt 更新引用:`uncaged-workflow help --skill develop` 4. 测试覆盖新子命令 ## 效果 - Role prompt 按需引用,省 token - 不同上下文不同文档,信噪比高 - 新场景(ops 等)可扩展 --- 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#81