fix(cli): Rank skills last in root slash completion - #9943
fix(cli): Rank skills last in root slash completion#9943ChivuAndrei2003 wants to merge 4 commits into
Conversation
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Thanks for the PR — and for pairing it with before/after screenshots and tests. The template is complete, and the underlying problem is real: the / menu gets crowded when many skills are installed, and #9942 documents it well.
This is a product-direction block, not a code-quality one — the diff is small and focused (completion filtering in the TUI and Web Shell, plus docs):
- #9942 carries the
need-discussionlabel, and your own issue text says "I would like maintainer feedback before opening a pull request." The PR arrived ~11 minutes after the issue, and no maintainer has replied in that thread yet. - The triage on #9942 already suggested two smaller alternatives — an opt-out setting consistent with the existing
skills.disabledsurface, or grouping/pinning skills after built-in commands in the TUI browse list — and asked to hold for maintainer input on "default-hide vs opt-in setting" before opening the PR. - Web Shell recently moved in the opposite direction: #4792 (merged June 2026) organized top-level completion into
custom/skill/systemcategory sections with configurable ordering. Hiding skills by default would partly undo that design. - Hiding also removes fuzzy completion and recently-used ranking for skill names — typing
/revwould no longer surface areviewskill, forcing full names to be typed unaided. - Direction signal: the reference product keeps skills in the slash-command namespace (claude-code 2.1.233 fixed bundled skill aliases like
/checkupand/reviewreporting "Unknown command").
@ChivuAndrei2003 please hold this until a maintainer weighs in on #9942: default-hide vs opt-in setting. If the decision is default-hide, this PR is well placed to proceed to code review; if it's the setting route, the completion-layer filtering here is still a useful starting point.
@yiliang114 needs a maintainer call on #9942 before this can proceed to merge review: hide skills from top-level / completion by default, opt-in setting, or group them below built-in commands?
中文说明
感谢提交 PR——也感谢你同时提供了前后截图与测试。模板完整,问题本身真实存在:安装大量 skills 时 / 菜单会变得拥挤,#9942 已充分说明。
这是产品方向上的阻断,不是代码质量问题——diff 小而聚焦(TUI 与 Web Shell 的补全层过滤,外加文档):
- #9942 带有
need-discussion标签,且你在 issue 中写明"希望先得到维护者反馈再开 PR"。PR 在 issue 提出约 11 分钟后就提交了,而该 issue 下尚无维护者回复。 - #9942 的 triage 已给出两个更小的替代方案——与现有
skills.disabled一致的配置项开关,或在 TUI 浏览列表中把技能分组/排在内置命令之后——并请你在开 PR 前等待维护者对"默认隐藏还是配置项"的意见。 - Web Shell 最近走的是相反方向:#4792(2026 年 6 月合入)把顶层补全整理为可配置顺序的
custom/skill/system分类。默认隐藏技能会部分推翻该设计。 - 隐藏还会让技能名失去模糊补全和最近使用排序——输入
/rev将不再提示review技能,用户需完整输入名称。 - 方向参考:参考产品将技能保留在斜杠命令命名空间中(claude-code 2.1.233 修复了
/checkup、/review等内置技能别名被报 "Unknown command" 的问题)。
@ChivuAndrei2003 请先等待维护者在 #9942 中对"默认隐藏还是配置项"给出结论。若结论是默认隐藏,本 PR 可直接进入代码审查;若选择配置项路线,这里的补全层过滤仍是可用的起点。
@yiliang114 此 PR 进入合并审查前,需要维护者先在 #9942 上定方向:默认从顶层 / 补全隐藏技能、做成配置项、还是排在内置命令之后分组展示?
— Qwen Code · qwen3.8-max
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
1 Suggestion-level finding(s) this review confirmed are already reported on this PR and are not repeated:
- R1-3 default-hide adopted without the maintainer decision #9942 requires — already reported (review 5009301936 by @qwen-code-ci-bot)
Not reviewed: build-and-test — tmux-testing was skipped in CI and its suite did not run locally.
Not reviewed: reverse audit — stopped before round 1 by the review time budget.
Test Plan (not a blocker): tests: 73 passed — this review observed 23737, 4228, 601 passed; tests: 24 passed — this review observed 23737, 4228, 601 passed.
中文说明
仅完成部分审查,审查缺口已披露。
本轮确认的 1 条建议级发现已在 PR 上报告过,不再重复发布(列表见上方英文部分)。
未审查:build-and-test — tmux-testing was skipped in CI and its suite did not run locally。
未审查:反向审计——评审时间预算不足,未能开始第 1 轮。
Test Plan(非阻断):tests: 73 passed — this review observed 23737, 4228, 601 passed; tests: 24 passed — this review observed 23737, 4228, 601 passed。
— qwen3.8-max via Qwen Code /review (v0.22.0)
What this PR does
This change keeps Skill commands in slash completion while making the terminal UI's empty
/browse list easier to scan. Built-in and custom commands are shown before Skills in that root list. Once the user types a query such as/rev, Skills participate in fuzzy matching and recent-command ranking as before. Mid-input completion, stacked-Skill completion, direct/<skill-name>invocation, model invocation, and the Web Shell's existing categorized completion remain unchanged.Why it's needed
Workspaces with many installed Skills can make the empty
/menu difficult to scan because Skills compete with regular commands for the first visible rows. Ranking Skills after other commands only while browsing the empty root list reduces that clutter without removing discovery or fast fuzzy access to frequently used Skills.Reviewer Test Plan
How to verify
Start the terminal UI and type
/. Confirm that built-in and custom commands appear first and that Skills remain available later in the list. Type/revand confirm that a matchingreviewSkill appears. Confirm that a second Skill is suggested after a stacked Skill such as/review /sto, and that a model-invocable Skill is suggested in text such asplease /sto. In Web Shell, confirm that the existing categorized/list and fuzzy Skill search still work.Automated verification completed locally on Node.js 22.16.0:
git diff --checkpassed.npm run preflightrun on this PR completed formatting, lint, build, typecheck, and all workspace test runs. Core passed 21,325 tests and Web Shell passed 4,228 tests. The CLI run had 2 failures out of 23,768 tests in unrelatedAuthDialog.test.tsxinteraction tests; one reproduced on the merge base. The final fast-path bundle check was not reached because that test phase exited non-zero.Evidence (Before & After)
Before, Skills participated in the same root browse ranking as all other commands, so a recently used Skill could compete for the first visible rows. The original behavior also provided fuzzy Skill search:
After, Skills remain in the empty
/list but are placed after regular commandsFuzzy Skill search remains available after the change:
The dedicated
/skillspanel also remains available:Tested on
Environment (optional)
macOS, Node.js 22.16.0, focused Vitest suites for the CLI and Web Shell, package lint and typechecks, and a full repository build.
Risk & Scope
/list to see individual Skills, while typed fuzzy search remains unchanged.Linked Issues
Fixes #9942
中文说明
此 PR 的作用
此更改保留斜杠补全中的 Skill 命令,同时让终端 UI 中空的
/浏览列表更易查看。在根列表中,内置命令和自定义命令会显示在 Skills 之前。当用户输入/rev等查询时,Skills 仍会像以前一样参与模糊匹配和最近使用排序。输入中间补全、堆叠 Skill 补全、直接/<skill-name>调用、模型调用以及 Web Shell 现有的分类补全行为均保持不变。为什么需要此更改
安装大量 Skills 后,空的
/菜单会因 Skills 与普通命令争夺首屏位置而难以浏览。仅在浏览空根列表时把 Skills 排在其他命令之后,可以减少拥挤,同时保留发现能力和常用 Skill 的快速模糊搜索。Reviewer Test Plan
验证方法
启动终端 UI 并输入
/,确认内置命令和自定义命令先显示,而 Skills 仍可在列表后部找到。输入/rev,确认匹配的reviewSkill 会出现。确认在/review /sto等堆叠 Skill 后仍会建议第二个 Skill,并且在please /sto等文本中仍会建议可由模型调用的 Skill。在 Web Shell 中确认现有的分类/列表和 Skill 模糊搜索仍然有效。已在 Node.js 22.16.0 上完成以下本地验证:
git diff --check通过。npm run preflight已执行格式化、lint、构建、类型检查和所有 workspace 测试。Core 的 21,325 个测试全部通过,Web Shell 的 4,228 个测试全部通过。CLI 的 23,768 个测试中有 2 个失败,均位于与本更改无关的AuthDialog.test.tsx交互测试中;其中一个也能在 merge base 上复现。由于该测试阶段以非零状态退出,最终的 fast-path bundle 检查没有运行。证据(更改前后)
更改前,Skills 与所有其他命令共享根浏览排序,因此最近使用的 Skill 可能占据首屏位置。原有的 Skill 模糊搜索行为如第一张图所示。
更改后,Skills 仍位于空的
/列表中,但排在普通命令之后;第二张图显示 Skills 在 105 项列表的后部开始出现。第三张图确认输入/rev后仍会建议reviewSkill。专用的/skills面板也继续可用。测试平台
环境(可选)
macOS、Node.js 22.16.0、CLI 和 Web Shell 的针对性 Vitest 测试、package lint 和类型检查,以及完整仓库构建。
风险与范围
/列表中向下移动更远才能看到单个 Skill,但输入后的模糊搜索保持不变。关联 Issue
Fixes #9942