Duplicate skills load from repository and installed plugin
未关闭
还没有人认领这个 Issue。
triage
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
Problem
Copilot CLI loads the same skill twice when a repository contains a project skill and an enabled user plugin contributes the identical skill. This doubles the skill description surface in repositories that develop their own plugin.
Observed with Copilot CLI 1.0.79-9 in rjmurillo/ai-agents, where .claude/skills is the canonical source for the installed project-toolkit plugin.
Reproduction
cd <repo-that-contains-the-plugin-source>
copilot plugins list --json | jq -r '\n[.plugins[] | select(.kind=="skill") | {name,scope,source,description:(.description // "")}]\n| group_by(.name)[]\n| select((map(.scope)|index("repository")) and (map(.scope)|index("plugin")))\n| [. [0].name, (length|tostring), ([.[].scope+":"+.[].source]|join(","))]\n| @tsv'\n```\n\nMeasured result:\n\n```text\nduplicate_names=97\nidentical_descriptions=97\nduplicate_description_bytes=40624\n```\n\nExample name:\n\n```text\ncontext-optimizer plugin plugin\ncontext-optimizer repository project\n```\n\nThe installed plugin is enabled at user scope. No repository-scoped setting was found to disable that one plugin only in its source repository.\n\n## Expected\n\nWhen a repository skill and plugin skill have the same canonical name and identical content, load one entry. Project scope could take precedence, or the CLI could deduplicate by name plus content hash. A repository-scoped plugin-disable override would also provide a workaround.\n\n## Control\n\nThis is specific to skills. A canary placed in `plugin/instructions/*.instructions.md` did not load through `--plugin-dir`, while a repository `.github/instructions` canary did load.\n
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在包含 .claude/skills 和一个已启用 plugin 的 repository 中使用 copilot plugins list --json 复现问题,然后追踪 repository 和 plugin skill 的发现过程。比较 repository 和 plugin 条目的规范名称和内容,并验证相同的 skill 会生成一个已加载条目,且不会影响文档中记录的 instruction canary。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell
- 领域
- cli, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100