Skip to content

fix: quote argument-hint in the 4 skills missed by #69, and pair the quotes inside description - #75

Closed
EndlessBlueWJL wants to merge 1 commit into
XBuilderLAB:mainfrom
EndlessBlueWJL:fix/frontmatter-quotes
Closed

EndlessBlueWJL wants to merge 1 commit into
XBuilderLAB:mainfrom
EndlessBlueWJL:fix/frontmatter-quotes

Conversation

@EndlessBlueWJL

Copy link
Copy Markdown

PR #69 quoted argument-hint for SKILL.md and skills/cheat-init/SKILL.md only. Four skill files
still carry invalid YAML frontmatter, so strict frontmatter parsers reject the file and the host drops
the skill silently — it never appears in the catalog and there is no per-skill diagnostic, only a
host-log warning.

File Fault
skills/cheat-learn-from/SKILL.md raw ASCII " in description + unquoted argument-hint
skills/cheat-predict/SKILL.md same
skills/cheat-publish/SKILL.md same
skills/cheat-retro/SKILL.md same

Why each one fails

Both faults are "a value YAML cannot read as a plain scalar":

  1. description interleaves raw ASCII double quotes with plain text:

    description: ...触发词:"复盘 [path]"/"retro this"/"T+3d 数据来了"。

    The plain scalar ends early; the parser then reports Unexpected flow-seq-start at node end.

  2. argument-hint is unquoted and contains key: value inside a flow sequence:

    argument-hint: <prediction-file> [— window: 3|5|7] [— source: manual|adapter]

    → Nested mappings are not allowed in compact mappings.

Because both live in the frontmatter, the skill body never gets a chance to load.

Fix

Same approach as #69 — only the two header values change, the body is untouched:

Verification

Reproduced with the yaml package parser that hosts ship:

  • before: all four fail with Nested mappings are not allowed in compact mappings at line 3, column 16
  • after: all four parse cleanly, name / description present, Chinese quotes balanced
    (no orphan “ or ”)
  • an audit of all 16 upstream skill files shows these four are the only remaining invalid ones;
    the other 12 parse fine

Affected hosts

Any host that validates frontmatter strictly rather than tolerantly. Confirmed on Copilot CLI ≥1.0.65
(the surface #69 targeted) and on DeepSeek Harness. Tolerant readers (some Claude Code versions) load
these files anyway, which is why the bug stayed hidden.

Files changed

skills/cheat-learn-from/SKILL.md
skills/cheat-predict/SKILL.md
skills/cheat-publish/SKILL.md
skills/cheat-retro/SKILL.md

8 changed lines total (2 per file).

Correction to my earlier description: I originally claimed these four files
carry TWO invalid frontmatter values. That was wrong, and I verified it:

  - argument-hint unquoted with "key: value" inside a flow sequence
    -> the actual and only cause of the parse failure
  - description containing raw ASCII double quotes
    -> VALID YAML, not a fault

Evidence (yaml package parser, upstream main):
  original                          -> fails
  fix description only              -> still fails
  fix argument-hint only            -> parses, all fields present
  fix both                          -> parses

So �rgument-hint alone is sufficient; the description's ASCII quotes parse
fine (checked with the quotes left in place: description length 127, 10 ASCII
double quotes, no error).

This PR therefore changes only the four argument-hint values, and additionally
pairs the ASCII quotes in description as a cosmetic consistency pass. The
cosmetic part is optional and can be dropped without affecting the fix.

Upstream main still has the unquoted argument-hint in:
  skills/cheat-learn-from/SKILL.md
  skills/cheat-predict/SKILL.md
  skills/cheat-publish/SKILL.md
  skills/cheat-retro/SKILL.md
@EndlessBlueWJL

Copy link
Copy Markdown
Author

Closing this in favour of the smaller existing PRs — #73 and #74 already make this exact fix, and they are more minimal than mine.

I also want to correct my own description above. I originally claimed these four files carry two invalid frontmatter values. That was wrong, and I verified it before closing:

Testing with the yaml package parser against upstream main:

variant result
upstream as-is fails
fix description only still fails
fix argument-hint only parses, all fields present
fix both parses

So argument-hint is the only cause. The raw ASCII double quotes inside description are valid YAML — double quotes are allowed inside a plain scalar. I confirmed this by leaving them in place and parsing successfully (description length 127, containing 10 ASCII double quotes, no error).

That means this PR's extra change (pairing those quotes into “…”) is cosmetic only and does not fix anything. My earlier one-line-at-a-time fault localisation misled me: parsing description in isolation does error, but that error comes from the line lacking its surrounding block context, not from the quotes.

#73 and #74 each change only the four argument-hint values (4 files, +4 −4) and are sufficient. Mine was +8 −8 with a redundant cosmetic half — the smaller one deserves to land.

Sorry for the duplicate; the correct fix was already in the queue and I should have checked open PRs before opening my own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant