Skip to content

[BUG] v2.1.136 regression breaks /plugin install kami@kami; Claude Desktop ZIP path unaffected #19

@qishaoyumu

Description

@qishaoyumu

[BUG] v2.1.136 regression breaks /plugin install kami@kami; Claude Desktop ZIP path unaffected

现象

v2.1.136 起(v2.1.137 / v2.1.138 同样),/plugin marketplace add tw93/kami + /plugin install kami@kami 安装 Kami 失败,/reload-plugins 报告 1 error during load/doctor 详情:

kami (user)
  skills path escapes plugin directory: ./
  Paths in plugin.json must not use ".." to reference files outside the plugin directory

Kami 是单 plugin 仓库,没有 bundle 备用路径,Claude Code marketplace 安装路径目前完全 broken

不受影响:

  • Claude Desktop ZIP 安装路径(dist/kami.zip 上传到 Claude Desktop),不走 plugin 路径校验
  • 其他终端用户在 v2.1.136 之前装好的 Kami,plugin cache 不受新版本校验影响(除非 update / reinstall)

不是仓库配置问题

PR #16 引入的 marketplace 注册方式,在 v2.1.135 之前的 Claude Code 版本上工作(v2.1.136 是 regression 引入版本,详见下方版本表)。marketplace.json 现状(source: "./" + skills: ["./"] + strict: false)属于官方 plugins-reference#path-behavior-rules 文档化的写法:

When a skill path points to a directory that contains a SKILL.md directly, for example "skills": ["./"] pointing to the plugin root, the frontmatter name field in SKILL.md determines the skill's invocation name. This gives a stable name regardless of the install directory.

v2.1.94 changelog 引入了 "skills": ["./"] 支持。文档至今未修改。

受影响版本

版本 发布日期 /plugin install kami@kami
2.1.128 2026-05-04 works
2.1.131 / 132 / 133 2026-05-06 ~ 2026-05-07 works
2.1.136 2026-05-08 fails(regression 引入)
2.1.137 / 138 2026-05-09 fails

Upstream

已向 anthropics/claude-code 提交 #57570,含二分结果、binary 反编译证据、触发条件分析(path.relative(pluginRoot, path.resolve(pluginRoot, "./")) === "" 被新版 path validation 误判为 traversal)。

临时建议

对终端用户(任选一种,都不受 regression 影响):

  1. 固定到 regression 引入前的 Claude Code 版本:

    npm install -g @anthropic-ai/claude-code@2.1.132

    v2.1.132 是已知稳定工作的版本(v2.1.133 已开始部分重构相关代码路径,v2.1.136 完整引入 regression)。属于临时回退,会失去 v2.1.136+ 的其他改进,仅作短期 workaround。

  2. 改走 README 已有的 npx skills 路径:

    npx skills add tw93/kami -a claude-code -g -y

    npx skills 不读 marketplace.json,不走 regression 路径。

  3. 改走 Claude Desktop ZIP 路径(README 已有):从 GitHub releases 下载 kami.zip 上传到 Claude Desktop,跟 /plugin install 路径不重合。

对仓库本身marketplace.json 不需要改动。当前写法在 v2.1.135 之前工作,改 marketplace.json 等于迁就 regression。一种"重构"路径是把 SKILL.md 从仓库根移到 skills/kami/SKILL.md 子目录、删掉 marketplace.json 里的 skills: ["./"] 字段,让默认自动发现接管,但这是结构性改动,会牵动 dist/kami.zip 打包脚本和模板路径假设,代价不小。等 #57570 处理结果或 Anthropic 后续方案再定。

如果想给 Claude Code 终端用户明确预期,可以在 README 顶部 / Quick Start 旁边加一行说明,提示 v2.1.136 至修复前推荐 npx skills 路径或 Claude Desktop ZIP 路径。不紧急。

复现

/plugin marketplace add tw93/kami
/plugin install kami@kami
/reload-plugins

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions