-
Notifications
You must be signed in to change notification settings - Fork 464
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
MarkdownSkillParser uses a simple YAML parser to parse frontmatter of SKILL.md. This doesn't work for many skills with lists and multiline texts in the frontmatter, especially those used by OpenClaw.
For example, the Agent Browser skill has the following frontmatter. Using this skill will result in parsing error.
---
name: Agent Browser
description: A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and snapshot pages via structured commands.
read_when:
- Automating web interactions
- Extracting structured data from pages
- Filling forms programmatically
- Testing web UIs
metadata: {"clawdbot":{"emoji":"🌐","requires":{"bins":["node","npm"]}}}
allowed-tools: Bash(agent-browser:*)
---
To Reproduce
Steps to reproduce the behavior:
- Download the zip file of Agent Browser skill
- Extract it into a directory
- Use
FileSystemSkillRepositoryto load this skill
Expected behavior
There should be no parsing error and skill can be loaded.
Error messages
java.lang.IllegalArgumentException: Invalid YAML line (expected 'key: value' format): - Automating web interactions
at io.agentscope.core.skill.util.MarkdownSkillParser$SimpleYamlParser.parse(MarkdownSkillParser.java:187)
at io.agentscope.core.skill.util.MarkdownSkillParser.parse(MarkdownSkillParser.java:106)
at io.agentscope.core.skill.util.SkillUtil.createFrom(SkillUtil.java:89)
at io.agentscope.core.skill.util.SkillFileSystemHelper.loadSkillFromDirectory(SkillFileSystemHelper.java:98)
at io.agentscope.core.skill.util.SkillFileSystemHelper.lambda$getAllSkills$4(SkillFileSystemHelper.java:145)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:632)
at io.agentscope.core.skill.util.SkillFileSystemHelper.getAllSkills(SkillFileSystemHelper.java:141)
at io.agentscope.core.skill.repository.FileSystemSkillRepository.getAllSkills(FileSystemSkillRepository.java:119)
Environment (please complete the following information):
- AgentScope-Java Version: 1.0.9
- Java Version: 21
- OS: macos
Additional context
When the YAML parser encountered invalid keys, it should log out the error and continue, instead of throwing an exception, see the code. This makes the parser more tolerant to markdown errors in SKILL.md.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
In progress