fix: reject invalid SKILL.md YAML frontmatter#202
Merged
Conversation
nikomatsakis
requested changes
May 8, 2026
| bail!("SKILL.md frontmatter keys must be strings"); | ||
| }; | ||
|
|
||
| if key == "applies-when" { |
Member
There was a problem hiding this comment.
we should just remove this if, I thikn it .. serves no purpose?
| &["invalid-skill0", "workspace0"], | ||
| async |mut ctx| { | ||
| ctx.symposium(&["init", "--add-agent", "codex"]).await?; | ||
| ctx.symposium(&["sync"]).await?; |
Member
There was a problem hiding this comment.
I'd like a test that plugin validate will reject a plugin repo with a standalone skill that is illformed
nikomatsakis
approved these changes
May 8, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Problem
Symposium parsed
SKILL.mdfrontmatter with a loose line-based parser, so malformed YAML likedescription: [Critical] ...could pass validation and be installed by hook-managed sync. Agents then rejected the copied skill at startup because they parse the same frontmatter as YAML.We are also serving some broken frontmatter in
symposium/recommendations. That package's CI will now fail due to our tighter validation, and I'll fix it over there (symposium-dev/recommendations#9)Solution
Parse skill frontmatter as YAML before matching or installing skills, require metadata fields to be strings, and add a sync regression test proving invalid skill frontmatter is skipped instead of copied into
.agents/skills.symposium will warn when it skips loading due to misformatted files. That might not be the right ux choice long-term, but whilst most of our users are people also developing symposium, it's probably good :)
I didn't add a snapshot test since the sync output is not designed to have i/o injected and it would have exploded the diff. Happy to follow up with that if desired.
Here's a manual test though:
AI disclosure.
Confidence level.