Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

sleep: plugin skills never resolve, because Claude Code records them as `plugin:skill`

未关闭
#316 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
tooling

调研方向

Start in harvest._skill_names_from_content and resolve_skill, then follow skill_search_roots to see how plugin roots are keyed. Staging and adoption also need reading: staging._safe_skill_name, skill_proposal_rows, and _adopt_live_target_ok. The naming choice is still open, so ask the maintainers which option to take before writing code. Done means a plugin:skill name resolves only in its own plugin root, and test_sleep_skill_harvest.py and the resolver tests pass.

由索引模型根据 Issue 内容生成。

描述

Summary

Claude Code records a plugin skill's Skill call with the plugin-qualified name, for example {"skill": "toolbox:doc-truth"}. harvest._skill_names_from_content keeps the name as written (test_sleep_skill_harvest.py pins Example-Skill:v2), so the fan-out looks for a skill called toolbox:doc-truth.

resolve_skill then looks for a directory with that literal name in every root. The plugin roots that skill_search_roots discovers (<cache>/<marketplace>/<plugin>/<version>/skills, from #185 and 109bafb) contain doc-truth/, so a plugin skill from a real transcript always comes back missing. The resolver tests use bare names in plugin roots (chrome-devtools under chrome-devtools-mcp/<version>/skills), which is not what Claude Code writes.

Repro

On main at 343db22, with a claude_home holding plugins/cache/jay-skills/toolbox/0.6.4/skills/doc-truth/SKILL.md:

roots = skill_search_roots(cfg)                  # includes .../toolbox/0.6.4/skills
resolve_skill("toolbox:doc-truth", roots).status  # 'missing'
resolve_skill("doc-truth", roots).status          # 'found'
_skill_names_from_content([{"type": "tool_use", "name": "Skill",
                            "input": {"skill": "toolbox:doc-truth"}}])  # ['toolbox:doc-truth']

End to end on 79124b3 (skill_resolver.py is unchanged since), a dry-run --source claude with multi_skill_fanout on a real session reported the group as skipped, "no SKILL.md for this skill in the configured skill roots". --skill-root can't work around it, because no directory has a colon in its name.

On one machine's Claude Code history: 264 Skill calls, 138 of them plugin-qualified, and 129 of those have <skill>/SKILL.md in the root the resolver picks for that plugin. None of the 138 resolve today.

Why it needs more than a resolver change

If the name did resolve, staging would still refuse it. staging._safe_skill_name rejects : because the name becomes proposed_SKILL.<name>.md and Windows can't store it. skill_proposal_rows and _adopt_live_target_ok also require the live file's parent directory to equal the skill name. So the fix depends on what name a plugin skill is staged and adopted under, and I'd rather you pick that.

Options

  1. Resolve plugin:skill in that plugin's root only, and stage under the directory name. Return the plugin roots keyed by plugin, send a qualified name only to its plugin's root, and send a bare name to every root as today. Reports keep toolbox:doc-truth; the proposal is staged and adopted as doc-truth (adopt --skill doc-truth). If two plugins' doc-truth show up in one night, skill_proposal_rows already refuses the duplicate. The resolver still never guesses between roots.
  2. Same resolution, staged under an encoded name such as toolbox--doc-truth, so adopt --skill names stay unique across plugins. skill_proposal_rows and _adopt_live_target_ok would need a new rule, since today they tie the staged name to the directory name.
  3. Strip the prefix at harvest and resolve the bare name everywhere. This is the smallest change, but a bare name can then match an unrelated skill. If a plugin's copy isn't in the cache, engineering:code-review would resolve to ~/.claude/skills/code-review and the proposal would be staged against that file. I wouldn't do this one.

I lean to option 1. Happy to send a PR with tests once you've picked the naming: a qualified name resolves only in its plugin's root, a same-named skill elsewhere is ignored, staging and adopt --skill work under the bare name, and duplicate bare names across plugins are still refused.

主要语言
Python
星标
18.2k
派生
1.7k
平均合并
4 天 1 小时
30 天内合并 PR
10

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/SkillOpt 的其他 Issue

查看 microsoft/SkillOpt 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。