/** * `agentsmarket skill validate ` — check a skill file without * publishing it. * * WHY THIS EXISTS * * The CLI's `validate` command only understands `pipeline.yaml`. It does not * read SKILL.md at all, so "8 of my skills fail validate" was never a finding * about those eight skills — it was a finding that nothing was checking them. * A malformed frontmatter block therefore published cleanly and failed * downstream, after it was already in the marketplace. * * A validator with its own copy of the parsing and field rules would be a * validator that agrees with `publish` right up until the two drift, which is * the exact failure it is supposed to catch. So it does not have its own rules: * it calls `parseSkillFile` and `resolveSkillFrontmatter` — the same two * functions `publishCommand` calls — and adds only the checks publish does not * perform. * * WHAT IT CHECKS THAT PUBLISH DOES NOT * * Unknown top-level keys. This is the one that mattered. Our resolver silently * ignores frontmatter it does not recognise, so a SKILL.md carrying, say, * `price: 500` instead of the namespaced `metadata: io.agentsmarket/price_usdc` * publishes without complaint — and is then rejected by every consumer that * validates against the Agent Skills standard, which allows exactly six * top-level keys. The file looks fine here and is broken everywhere else, which * is the worst way for a file to be broken. * * Exit codes: * 0 = valid (warnings may still be printed) * 1 = invalid * 2 = file not found */ import { type ResolvedSkillFrontmatter } from '../../lib/skill-frontmatter.js'; export interface SkillIssue { /** Stable machine-readable code, for --json consumers and CI. */ code: string; message: string; } export interface SkillValidationResult { ok: boolean; errors: SkillIssue[]; warnings: SkillIssue[]; /** Present only when the file parsed and resolved. */ resolved?: ResolvedSkillFrontmatter; } /** * Pure: validate SKILL.md content. * * Collects every problem it can rather than stopping at the first, because the * point is to fix the file in one pass. `resolveSkillFrontmatter` throws on the * first bad field, so only that one is reported through it — the remaining * checks still run. */ export declare function validateSkillContent(content: string): SkillValidationResult; export declare function skillValidateCommand(filePath: string, flags?: { json?: boolean; }): Promise;