/** * YAML frontmatter parsing for SKILL.md files. * * Python parity with praisonaiagents/skills/parser.py. */ /** * Raised when SKILL.md parsing fails. * * Python: praisonaiagents/skills/models.py:9 `ParseError`. */ export declare class ParseError extends Error { constructor(message: string); } /** * Find the SKILL.md file in a skill directory. * Prefers SKILL.md (uppercase) but accepts skill.md (lowercase). * * Python: praisonaiagents/skills/parser.py:15 `find_skill_md(skill_dir)`. * * @param skillDir Path to the skill directory * @returns Path to the SKILL.md file, or undefined if not found */ export declare function findSkillMd(skillDir: string): string | undefined; /** * Minimal YAML frontmatter parser (flat `key: value` pairs plus a one-level * nested `metadata:` mapping). Values are kept as strings; surrounding quotes * are stripped. */ export declare function parseYamlFrontmatter(yaml: string): Record; /** * Parse YAML frontmatter from SKILL.md content. * * Python: praisonaiagents/skills/parser.py:33 `parse_frontmatter(content)`. * * @param content Raw content of the SKILL.md file * @returns `{ metadata, body }` — the parsed frontmatter mapping and the * trimmed markdown body * @throws {ParseError} If frontmatter is missing or not properly closed */ export declare function parseFrontmatter(content: string): { metadata: Record; body: string; };