disable-model-invocation: true makes a skill unreachable, not manual-only (Skill not found on explicit invocation)
还没有人认领这个 Issue。
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
Summary
A project skill whose SKILL.md frontmatter carries disable-model-invocation: true is not reachable from the CLI at all. copilot skill list shows it under Project skills, but the model's skill() tool returns Skill not found: <name>, so an explicit user request for the skill fails too.
In Claude Code (where the field originated) and in Cursor, disable-model-invocation: true means "the model may not select this skill on its own; the user can still invoke it by name". The CLI appears to treat it as "do not expose this skill at all", which leaves no way to run the skill.
Version / environment
GitHub Copilot CLI 1.0.79- Linux (Fedora, kernel 7.0.13)
- Skill directory:
<repo>/.github/skills/socratic-method/, inside a git repository
Reproduction
Using a published skill that ships the field (socratic-method):
pipx install socratic-method
cd "$(mktemp -d)" && git init -q .
socratic-method setup copilot --copy # writes .github/skills/socratic-method/
- The CLI discovers it:
$ copilot skill list
Project skills:
socratic-method - Interrogates the user's idea with disciplined Socratic questioning until hidden assumptions, ...
- The model cannot reach it, even when named explicitly:
$ copilot -p 'Use the /socratic-method skill. Before asking me anything, reply with exactly
one line of JSON: {"loaded": true|false, "path": "<SKILL.md path>"}' --allow-all-tools --no-color
✗ skill(socratic-method) Skill not found: socratic-method
{"loaded": false, "path": ""}
- Delete the
disable-model-invocation: trueline from.github/skills/socratic-method/SKILL.mdand re-run the same prompt — the skill loads normally:
● skill(socratic-method)
{"loaded": true, "path": "/tmp/tmp.XXXX/.github/skills/socratic-method/SKILL.md"}
Isolation
Same sandbox, same prompt, only the frontmatter differs:
| Frontmatter | Result |
|---|---|
disable-model-invocation: true + user-invocable: true |
Skill not found |
disable-model-invocation: true only |
Skill not found |
| neither key | loads normally |
disable-model-invocation alone reproduces it; user-invocable is not involved. YAML comments elsewhere in the frontmatter are present in all three cases and are not a factor.
Expected
disable-model-invocation: true should keep the skill out of automatic selection while leaving it invocable when the user names it — matching the semantics of the agent that introduced the field, and matching what the field is for: skills with side effects, or long interactive workflows, that should only run on request.
If the CLI intends different semantics, that is worth documenting. Adding agent skills for GitHub Copilot CLI documents only name, description, license and allowed-tools, so today the behavior is silent: the skill installs fine, lists fine, and only fails at the moment of use.
Impact
Portable skills written against the shared SKILL.md format and published for several agents carry this field to get manual-only behavior wherever it is supported. On the CLI those skills are silently dead — nothing in skill list, in install tooling, or in the docs signals a problem until a user tries to run one.
Related but distinct: #3095 (adding capability declaration fields to frontmatter).
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 CLI skill 发现和模型的 skill() 工具开始,使用包含 disable-model-invocation: true 的 SKILL.md 重现该行为。将该字段的处理方式与省略该字段的 skill 进行比较,然后验证显式调用能够成功,同时自动选择仍处于禁用状态。使用列出的复现步骤和 skill 列表输出确认该行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell, yaml
- 领域
- cli, tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 56/100