Skip to content

fix: skill description not fully loaded from SKILL.md frontmatter#140

Open
1thanMoon wants to merge 1 commit intoshareAI-lab:mainfrom
1thanMoon:fix/s05-frontmatter-multiline-yaml
Open

fix: skill description not fully loaded from SKILL.md frontmatter#140
1thanMoon wants to merge 1 commit intoshareAI-lab:mainfrom
1thanMoon:fix/s05-frontmatter-multiline-yaml

Conversation

@1thanMoon
Copy link
Copy Markdown

Problem

_parse_frontmatter splits lines manually and only reads key: value pairs.
When a skill's SKILL.md uses YAML block scalars (|), the description
is parsed as "|" — all indented continuation lines are silently dropped.

Root Cause

# Before: only handles simple key: value
for line in match.group(1).strip().splitlines():
    if ":" in line:
        key, val = line.split(":", 1)

Fix

Replace manual parsing with yaml.safe_load(), which correctly handles
all standard YAML syntax including multi-line block scalars.

Test

Skills with description: | now load their full description correctly.
For example, agent-builder's full description is now visible in the system prompt
instead of a single | character.

_parse_frontmatter used manual line splitting which only handled
simple key: value pairs. Multi-line block scalars (|) returned
only '|' as the value, dropping all subsequent indented lines.

Replace with yaml.safe_load() to correctly parse all YAML syntax.
Add pyyaml>=6.0 to requirements.txt.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

@1thanMoon is attempting to deploy a commit to the crazyboym's projects Team on Vercel.

A member of the Team first needs to authorize it.

@1thanMoon 1thanMoon changed the title fix: parse multi-line YAML block scalars in frontmatter fix: skill description not fully loaded from SKILL.md frontmatter Mar 28, 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