export interface RemoteSkill { /** Skill slug — the directory name under .claude/skills/. */ name: string; /** One-line description (goes into SKILL.md frontmatter). */ description: string; /** Instructions markdown WITHOUT frontmatter. */ body: string; } export type SafeSkill = RemoteSkill; export interface RejectedSkill { name: string; reason: string; } /** True for providers that natively load `.claude/skills//SKILL.md` (Claude only). */ export declare function providerConsumesSkills(provider: string | undefined): boolean; /** * Validate an untrusted `skills` array (from a `skill_update` frame) down to the * subset that is safe to write. Enforces slug shape, string types, per-file and * aggregate size caps, a total count cap, and workspace path containment. * Returns the accepted list (in order) plus the rejected entries with reasons. * Callers must still gate the whole path behind an opt-in (skillUpdateEnabled). */ export declare function sanitizeRemoteSkills(root: string, skills: unknown): { safe: SafeSkill[]; rejected: RejectedSkill[]; }; /** * Write the supplied (already-sanitized) skills to `/.claude/skills//SKILL.md` * as a FULL REPLACE: every previously-synced skill (tracked in the manifest) that * is NOT in the new set is removed, and its now-empty dir pruned. Skills we did * not write (CLI-bundled via applyAllSkills, or user hand-made) are never touched. * Returns the slugs written and removed. */ export declare function saveProjectSkills(root: string, safeSkills: SafeSkill[]): { written: string[]; removed: string[]; }; /** * Fold the given skills into a managed "## Skills" block in `/AGENTS.md` * (best-effort, idempotent). Non-Claude agents read AGENTS.md but cannot load * `.claude/skills`, so this is how they gain the skill instructions. An empty * list strips the block. */ export declare function foldSkillsIntoProfile(root: string, safeSkills: SafeSkill[]): void;