import type { SkillMetadata, SkillResources } from '../common/metadata/skill.metadata'; /** * Result of parsing SKILL.md frontmatter. */ export interface SkillMdParseResult { /** Parsed YAML frontmatter key-value pairs */ frontmatter: Record; /** Markdown body after the frontmatter */ body: string; } /** * Parse YAML frontmatter from a SKILL.md content string. * * Frontmatter is delimited by `---` at the start of the file: * ``` * --- * name: my-skill * description: A skill * --- * # Instructions here * ``` * * @param content - Raw SKILL.md file content * @returns Parsed frontmatter and body */ export declare function parseSkillMdFrontmatter(content: string): SkillMdParseResult; /** * Map SKILL.md frontmatter fields to SkillMetadata. * * Handles spec field name differences: * - `metadata` -> `specMetadata` * - `allowed-tools` -> `allowedTools` * * The markdown body becomes the `instructions` field. * * @param frontmatter - Parsed frontmatter key-value pairs * @param body - Markdown body (becomes instructions) * @returns Partial SkillMetadata populated from frontmatter */ export declare function skillMdFrontmatterToMetadata(frontmatter: Record, body: string): Partial; /** * Load and parse a SKILL.md file into SkillMetadata. * * Reads the file, parses YAML frontmatter, and maps fields to SkillMetadata. * Optionally auto-detects resource directories relative to the file path. * * @param filePath - Absolute or relative path to the SKILL.md file * @param resources - Optional pre-scanned resource directories * @returns Partial SkillMetadata populated from the file */ export declare function loadSkillMdFile(filePath: string, resources?: SkillResources): Promise>; /** * Strip YAML frontmatter from a markdown string. * Returns only the body content after the frontmatter. * * @param content - Raw markdown content potentially with frontmatter * @returns Content with frontmatter stripped */ export declare function stripFrontmatter(content: string): string; //# sourceMappingURL=skill-md-parser.d.ts.map