#6885
code-modernization: commands/modernize.md 的 argument-hint 不是合法 YAML,严格解析器会丢掉整条命令
问题
plugins/code-modernization/commands/modernize.md 的 frontmatter 不是合法 YAML:
---
description: Start here — say what you want done with your code and get the plan and the first step
argument-hint: [system] [--source <path>]
arguments: system
---argument-hint 的值以 [ 开头(flow sequence),后面又跟了一个 [--source <path>],YAML 解析直接失败:
Unexpected flow-seq-start at node end at line 2, column 25用 yaml(npm)对整段 frontmatter 做 parse 即可复现。同目录另外 12 个命令的 argument-hint 都以 <system> 之类普通标量开头,全部正常。
影响
Claude Code 自己的解析器容错,所以作者侧看不出来;但任何严格解析 frontmatter 的宿主都会把整条命令丢掉——包括把官方市场作为插件源的第三方 harness(我们这边实测:13 个命令只挂上了 12 个,缺的正是入口 /modernize)。
建议修复
argument-hint: "[system] [--source <path>]"相关
- #326 YAML frontmatter parsing errors in multiple agent files
- #4726 Invalid YAML frontmatter in pr-review-toolkit/agents/silent-failure-hunter.md (and the validator does not catch it)
建议同时给 marketplace 的校验器加一条 frontmatter YAML 合法性检查,避免同类问题继续进入。
Activity
0No activity yet.