export interface MigrationResult {
    migratedCount: number;
    removedCount: number;
    errors: string[];
}
export interface NamingResult {
    renamedCount: number;
    errors: string[];
}
/**
 * Scan a skill directory for stale flat .md files and restructure them.
 *
 * For each `{name}.md` file found at the root level of skillsDir:
 *   1. If `{name}/SKILL.md` already exists -- delete the flat file (dedup)
 *   2. If `{name}/SKILL.md` does NOT exist -- create the subdirectory,
 *      move the content to `{name}/SKILL.md`, run ensureFrontmatter(), delete the flat file
 *
 * Also recurses one level into subdirectories (e.g., sw/) to handle
 * nested stale files like `sw/pm.md` -> `sw/pm/SKILL.md`.
 *
 * Skips: symlinks, directories, files not matching *.md, SKILL.md itself.
 */
export declare function migrateStaleSkillFiles(skillsDir: string): MigrationResult;
/**
 * Post-install enforcement: ensure every skill subdirectory has a SKILL.md file.
 *
 * For each subdirectory in skillsDir:
 *   - If SKILL.md already exists → skip (idempotent)
 *   - Collect .md files, excluding skip-list (README, CHANGELOG, etc.)
 *   - If candidates exist, sort alphabetically, take first → rename to SKILL.md with frontmatter
 *
 * Also recurses one level into namespace directories (e.g., sw/).
 */
export declare function ensureSkillMdNaming(skillsDir: string): NamingResult;
/**
 * Remove stale double-nested skill directories left by pre-fix installations.
 *
 * Before the double-nesting fix (ec19dde, 2026-03-18), installing a plugin
 * whose single skill shared its name would create:
 *   {skillsDir}/{name}/{name}/SKILL.md   (incorrect)
 * instead of:
 *   {skillsDir}/{name}/SKILL.md           (correct)
 *
 * When called AFTER writing the correct SKILL.md, this function detects and
 * removes the stale nested directory.
 *
 * @param skillDir  The directory that should contain SKILL.md directly,
 *                  e.g. `~/.claude/skills/nanobanana/`
 */
export declare function cleanStaleNesting(skillDir: string): void;
