/** * Minimal reader and validator for `SKILL.md` frontmatter (Agent Skills spec, * https://agentskills.io/specification). It understands exactly the YAML subset * skills use: scalar `key: value` pairs (plain or quoted) and one level of * nested string maps (`metadata:`). * @module skills/frontmatter */ /** Frontmatter keys accepted by claude.ai uploads and the Skills API. */ export declare const PORTABLE_KEYS: readonly string[]; /** * Longest `description` every documented consumer accepts. The Agent Skills * spec allows 1024 characters, but Anthropic's help center for claude.ai * documents 200; staying below the stricter limit keeps one file portable. */ export declare const MAX_DESCRIPTION = 200; export type Frontmatter = { /** * Parsed fields. */ data: Record>; /** * Markdown after the closing delimiter. */ body: string; }; /** * Split `SKILL.md` text into frontmatter fields and body. * @param {string} text * @returns {Frontmatter} * @throws {Error} When the frontmatter block is missing or malformed. */ export declare function parseFrontmatter(text: string): Frontmatter; /** * Check a `SKILL.md` against the Agent Skills spec plus the stricter rules of * claude.ai uploads (six frontmatter keys, no XML tags, no reserved words). * @param {string} text Full `SKILL.md` text. * @param {string} dirName Name of the folder that contains it. * @returns {string[]} Problems; empty when the skill is valid. */ export declare function validateSkill(text: string, dirName: string): string[];