import type { ISkillManifest, SkillTier } from './ISkillManifest.ts'; export interface ParsedSkill { name: string; description: string; body: string; } export interface ParsedRaw { frontmatter: Record | null; body: string; } export declare const MAX_SKILL_FILE_BYTES: number; export declare const SPEC_NAME_RE: RegExp; export interface SkillSpecError { rule: string; message: string; fix: string; } export declare class SkillParser { parse(filePath: string): ParsedSkill | null; /** * Extract raw frontmatter key-value pairs and body from a string. * Shared with verify.ts to avoid duplicated parsing logic. */ parseRaw(content: string): ParsedRaw; parseManifest(filePath: string, directory: string, body: string, name?: string, description?: string, tier?: SkillTier): ISkillManifest; private collectResources; /** * Parse and validate the `tier` field from frontmatter. * Returns 'community' if missing or invalid (safe default). */ parseTier(frontmatter: Record | null): SkillTier; /** * Validate a skill against the agentskills.io naming/description spec. * Returns one error per violated rule (each with a concrete fix), or an * empty array when the skill is spec-compliant. `dirName` is the parent * directory the SKILL.md lives in; `fileName` the file's basename. */ validateSpec(name: string, description: string, dirName: string, fileName?: string): SkillSpecError[]; /** * Minimal frontmatter parser — flat key:value pairs only. * * **Limitations** (by design — SKILL.md frontmatter is intentionally simple): * - No YAML lists, nested objects, or multiline values * - No quoted-string handling (colons inside quoted values work; unquoted * colons are treated as the key/value separator) * - No type coercion beyond true/false → boolean and digit strings → number */ private parseYaml; } //# sourceMappingURL=SkillParser.d.ts.map