Skip to content

[SSR Agent] Issue Fix (25693): Make local skill loader parsing resilient and case-insensitive - #6

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 skill discovery mechanism within the Gemini CLI fails when matching keys or parse markers in certain SKILL.md frontmatter formats. Specifically, the parser fails to recognize local skills when files contain a UTF-8 BOM, trailing whitespaces in frontmatter dividers (---), case-sensitive keys (e.g. Name:), spaces before colons (e.g. name :), or single-line descriptions that are consumed incorrectly.

Detailed Changes

  • Modified FRONTMATTER_REGEX in packages/core/src/skills/skillLoader.ts to match a UTF-8 BOM and ignore trailing white spaces on the triple-dash markers.
  • Updated parseSimpleFrontmatter to support case-insensitive key matches and optional spaces before the colon (for name and description keys).
  • Improved multi-line description parsing logic to prevent swallowing nested lines that look like known keys (such as name: or description:).
  • Added Vitest test assertions in packages/core/src/skills/skillLoader.test.ts covering all spec requirements.

Verification

A Python-emulated JS parser simulation of the changes was built and executed to successfully verify all logical matching and parsing scenarios defined in the issue's requirements.

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