[Bug] skill frontmatter 含「冒号+空格」的 description 未加引号时被静默忽略,catalog 完全无感知 / Skills with colon-containing unquoted description are silently dropped from the catalog #1401
Replies: 4 comments 1 reply
|
frontmatter 里 description 含「冒号+空格」未加引号被静默忽略——YAML 解析陷阱,插件开发常见坑。规避:YAML 值里含冒号/特殊字符必加引号。 插件/技能开发规范见第 4 章:https://github.com/Electricitysheep/dsh-handbook/blob/main/docs/04-plugin-dev.md |
|
不客气,能帮上忙就好。手册欢迎随时来提意见或补充(frontmatter 这类 YAML 坑我们也会陆续收进第 4 章)。 |
补充:同类问题的第二个触发形态 + 一个可复现的 modlens 联动缺陷1. 已解决:切换到
|
|
Very reproducible - and the silent part is the worst part: no catalog entry, no user-facing error, just a logger.warn. I added an offline scan for exactly this to https://github.com/boyin111-1/dsh-doctor (check 15): it walks ~/.dsh/skills and every preset's skills/ directory, and flags any SKILL.md whose unquoted description contains an ASCII ': ' (the YAML compact-mapping trigger) with the exact file path and a suggested quoted form. It also covers #1450's variant (the ': ' inside longer descriptions) and relates to #936's rejected-count idea - the scanner is the 'tell me which skills are being dropped and why' half. The real fix should make parseFrontmatter failures visible (count rejected skills, surface them in the startup summary or a --dump-skills debug command) - the scan is just the offline tripwire until then. |
Uh oh!
There was an error while loading. Please reload this page.
[Bug] skill frontmatter 含「冒号+空格」的 description 未加引号时被静默忽略,catalog 完全无感知 / Skills with colon-containing unquoted description are silently dropped from the catalog
现象 / Symptom
~/.dsh/skills/<name>/SKILL.md的 frontmatter 中,description值如果包含「冒号+空格」(如Priority order: check the curated list first)且未用引号包裹,YAML 解析会在parseFrontmatter抛Nested mappings are not allowed in compact mappings,skill 被静默移除:<available_skills>)中完全不出现该 skill;logger.warn(skill file ... ignored: invalid YAML frontmatter);This is a concrete trigger of the same defect class described in #936 (malformed frontmatter entries are dropped with only a logger.warn, and the catalog cannot distinguish an absent skill from an invalid one). Here the trigger is a YAML parse error rather than a name/description validation failure — same silent removal, same undiagnosable shape.
复现 / Reproduce
修复方式:
description: "Use when ... Priority order: check ..."(双引号包裹)后立即生效。环境 / Environment
@deepseek-ai/dsh0.1.0-rc.6(CLI),deepseek-harness-desktop 0.3.4@deepseek-ai/dsh-skill-filesystem(parseSkillFile→parseFrontmatter抛错路径,仅ctx.logger.warn后 return)建议 / Suggestion
与 #936 的修复建议一致(rejected 计数 / failOnInvalidSkill / 启动摘要均适用),此处补充一个真实触发形态供确认修复优先级。
/cc #936
All reactions