Skip to content

Support standard YAML skill frontmatter#1053

Open
richuV wants to merge 1 commit intoagentscope-ai:mainfrom
richuV:codex/markdown-skill-parser-yaml-frontmatter
Open

Support standard YAML skill frontmatter#1053
richuV wants to merge 1 commit intoagentscope-ai:mainfrom
richuV:codex/markdown-skill-parser-yaml-frontmatter

Conversation

@richuV
Copy link
Copy Markdown

@richuV richuV commented Mar 27, 2026

Summary

  • replace the ad-hoc flat frontmatter parser with SnakeYAML-based parsing
  • keep exposing only top-level scalar metadata values so the existing skill API stays compatible
  • add regression tests for nested YAML fields and multiline scalar frontmatter

Why

MarkdownSkillParser currently rejects common YAML frontmatter constructs such as lists and block scalars. That makes otherwise valid SKILL.md files fail to load even when the framework only needs scalar fields like name and description.

This change makes the parser more tolerant of standard YAML frontmatter while preserving the current Map<String, String> metadata contract.

Testing

  • mvn -pl agentscope-core "-Dtest=MarkdownSkillParserTest,SkillFileSystemHelperTest" test
  • mvn -pl agentscope-core spotless:check

@richuV richuV requested a review from a team March 27, 2026 09:36
@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Mar 27, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...gentscope/core/skill/util/MarkdownSkillParser.java 71.42% 1 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@jujn
Copy link
Copy Markdown
Contributor

jujn commented Mar 27, 2026

hi, you can take a look at this PR: #1034

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.

2 participants