> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Parse Frontmatter • AI Agent SDK

> parse_frontmatter: Parse YAML frontmatter from SKILL.md content.

# parse\_frontmatter

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**parser**](../modules/parser) module.

Parse YAML frontmatter from SKILL.md content.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def parse_frontmatter(content: str) -> Tuple[dict, str]
```

## Parameters

<ParamField query="content" type="str" required={true}>
  Raw content of SKILL.md file
</ParamField>

### Returns

<ResponseField name="Returns" type="Tuple[dict, str]">
  Tuple of (metadata dict, markdown body)
</ResponseField>

### Exceptions

<AccordionGroup>
  <Accordion title="ParseError">
    If frontmatter is missing or invalid
  </Accordion>
</AccordionGroup>

## Uses

* `ParseError`

## Used By

* [`SkillLoader.activate`](../functions/SkillLoader-activate)
* [`read_properties`](../functions/read_properties)
* [`validate`](../functions/validate)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/parser.py#L27">
  `praisonaiagents/skills/parser.py` at line 27
</Card>
