Skip to content

[SSR Agent] Issue Fix (25693): Robust skill frontmatter parsing with simple fallback string coercion - #7

Closed
joneba-google wants to merge 1 commit into
mainfrom
ssr-agent-25693
Closed

joneba-google wants to merge 1 commit into
mainfrom
ssr-agent-25693

Conversation

@joneba-google

Copy link
Copy Markdown
Owner

Context & Problem

The Gemini CLI skill discovery mechanism failed to recognize local skills when skill metadata in the SKILL.md frontmatter had variations like UTF-8 BOM, trailing spaces, spaces around colons, case-insensitive keys, or non-string YAML values like numbers/booleans.

Detailed Changes

  • Updated FRONTMATTER_REGEX in skillLoader.ts to match optional UTF-8 BOM (\uFEFF?) and allow trailing horizontal whitespace after the triple-dash markers.
  • Enhanced parseFrontmatter to fall back to the simple key-value parser when frontmatter is parsed as non-string YAML values (like numbers or booleans), ensuring they are parsed as strings instead of failing.
  • Modified parseSimpleFrontmatter to perform case-insensitive key matches and accept optional spacing around the colon.
  • Improved multi-line description parsing logic to prevent swallowing indented lines that look like root keys (e.g. name).
  • Added extensive test coverage for all of these cases in skillLoader.test.ts.

Verification

Passed existing and newly added Vitest unit tests covering UTF-8 BOM, trailing spaces, case insensitivity, escaped keys, simple fallback coercion for numbers/booleans, and multi-line descriptions.

@joneba-google
joneba-google force-pushed the ssr-agent-25693 branch 4 times, most recently from d6dbe90 to 5ad0841 Compare July 15, 2026 20:38
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