Parse Frontmatter • AI Agent SDK

parse_frontmatter: Parse YAML frontmatter from SKILL.md content.

parse_frontmatter

Function

</div>

This function is defined in the parser module.

Parse YAML frontmatter from SKILL.md content.

Signature

python
def parse_frontmatter(content: str) -> Tuple[dict, str]

Parameters

ParamField str

Raw content of SKILL.md file

Returns

ResponseField Tuple[dict, str]

Tuple of (metadata dict, markdown body)

Exceptions

ParseError

If frontmatter is missing or invalid

Uses

  • ParseError

Used By

Source

View on GitHub

praisonaiagents/skills/parser.py at line 33