Skip to content

fix(skill): one frontmatter parser for skills and agents - #498

Merged
mrnasil merged 2 commits into
mainfrom
fix/skill-frontmatter
Nov 25, 2026
Merged

mrnasil merged 2 commits into
mainfrom
fix/skill-frontmatter

Conversation

@mrnasil

@mrnasil mrnasil commented Nov 25, 2026

Copy link
Copy Markdown
Member

Skill files had their own frontmatter parser. It was an older copy of the one agent files use, and it never got that parser's fixes:

  • name: "my-skill" kept its quotes, so /my-skill did not find the skill.
  • description: > was stored as the description >, and its indented lines (for bugs: carefully) became stray keys.
  • Quoted list items such as "*.rs" kept their quotes, and an inline [a, b] list was read as one item.

The agent parser moves to whycodes_skill::frontmatter (agent already depends on skill), and both now use it. The skill copy is removed.

One existing assertion encoded the bug, expecting "\"*.rs\"" as a file pattern; it now expects *.rs.

Tests: the parser module covers quoted values, > and | blocks, inline and - lists, and stray lines. A skill test reads a quoted name, a folded description and an inline list. All 18 agent custom_agents tests still pass. On Linux (WSL), all 42 skill tests pass, and frontmatter.rs and skill.rs have 100% line coverage.

🤖 Generated with Claude Code

Skill files had their own line parser, an older copy of the one agent
files use, and it never got that one's fixes:

- `name: "my-skill"` kept its quotes, so `/my-skill` did not find it;
- `description: >` became the description `>`, and its indented lines
  (`for bugs: carefully`) became stray keys;
- `file_patterns: ["*.rs"]` items kept their quotes and inline
  `[a, b]` lists were one item.

Move the agent parser to whycodes_skill::frontmatter and use it in both
places; the skill copy is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mrnasil
mrnasil enabled auto-merge (squash) November 25, 2026 15:38
@mrnasil
mrnasil merged commit 247b575 into main Nov 25, 2026
7 checks passed
@mrnasil
mrnasil deleted the fix/skill-frontmatter branch November 25, 2026 23:05
@mrnasil mrnasil mentioned this pull request Nov 26, 2026
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