Skip to content

fix: use yaml.safe_load to parse SKILL.md frontmatter#96

Open
terrifyzhao wants to merge 1 commit intoshareAI-lab:mainfrom
terrifyzhao:fix/yaml-frontmatter-parsing
Open

fix: use yaml.safe_load to parse SKILL.md frontmatter#96
terrifyzhao wants to merge 1 commit intoshareAI-lab:mainfrom
terrifyzhao:fix/yaml-frontmatter-parsing

Conversation

@terrifyzhao
Copy link

_parse_frontmatter 使用逐行 : 分割解析 YAML,无法正确处理 | / > 块标量语法(如 agent-builder/SKILL.md 的多行 description)。

改用 yaml.safe_load() 替代手写解析,正确支持所有 YAML 语法。

Changes:
agents/s05_skill_loading.py: 替换 _parse_frontmatter 实现
requirements.txt: 添加 pyyaml>=6.0 依赖

Replace hand-rolled line-by-line parser with yaml.safe_load() to
correctly handle YAML block scalars (| and >) in frontmatter fields
like multi-line descriptions.
@vercel
Copy link

vercel bot commented Mar 18, 2026

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

A member of the Team first needs to authorize it.

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