Repository navigation
Make the SKILL.md description valid YAML so installers accept it - #1
Conversation
The description contained ": " in an unquoted value, which strict YAML parsers reject, so `npx skills add` skipped the skill. Reword it and add a test that keeps the frontmatter to simple key and value lines. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
🟡 Changes recommendedThe change extends the frontmatter test to reject implicit booleans, nulls, and common numeric scalars. The added check still accepts YAML integer scalars such as `0b10` and `-0x1`. 🔒 Security review: no findings. 1 open finding · Still open from earlier reviewsWhat changedExpanded the frontmatter regression test's scalar check to reject boolean, null, and numeric-looking unquoted values.
Fix with an agentReply to a finding with a question, or comment |
Also reject values that start with "-", "?" or ":", which strict YAML parsers refuse, and import node:assert/strict before node:test as the other test files do. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
A value such as true, null or 42 is decoded as a boolean, null or number, not as the description text the format requires. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
On the finding "The test accepts boolean descriptions as strings": fixed in the latest commit on this branch. |
|
On the finding "The test still accepts binary and signed radix integers": not changing this. The test exists to stop the failure that actually happened, a prose description that a strict YAML parser rejects, and it now also covers the plausible slips (leading indicators, booleans, null, ordinary numbers). A |
Problem
npx skills add https://github.com/Factory-AI/migrate-post-quantum --skill migrate-post-quantum, the install command inREADME.md, does not install the skill. The installer skipsskills/migrate-post-quantum/SKILL.md:The
descriptionin the frontmatter is an unquoted YAML value that contains:twice ("a fixed work list: one lead ..." and "Works autonomously: one ..."). Strict YAML parsers reject that.Fix
skills/migrate-post-quantum/SKILL.md: reword the description so it has no:. The content is the same and it stays under the 1024-character limit of the Agent Skills format (1017 characters).skills/migrate-post-quantum/skill-frontmatter.test.cjs(new): checks that the frontmatter is simplekey: valuelines, thatnamematches the directory, that the description is at most 1024 characters, and that no value contains:or#or starts with a character that has a YAML meaning. It fails on the oldSKILL.mdand passes on the new one.Verification
npm test: 67 of 67 pass (66 before, plus the new test).SKILL.md: fails, as intended.npx skills add <local clone> --skill migrate-post-quantum -yin an empty project: before, "No valid skills found"; after, "Installed 1 skill ✓ migrate-post-quantum" into.agents/skills/migrate-post-quantum.