/**
 * Detect whether the SpecVerse Claude skill is installed in a location
 * that Claude Code will auto-load.
 *
 * Claude Code discovers skills from:
 *   - ~/.claude/skills/<name>/   (global — shipped by `spv skill install --global`)
 *   - <cwd>/.claude/skills/<name>/   (project-local — `spv skill install --project`)
 *
 * If either is present with a SKILL.md, we assume Claude-CLI-backed behavior
 * generation will benefit from the skill's auto-loaded context — meaning we
 * can send a leaner system prompt (skip the fullContext block).
 */
import { existsSync } from 'fs';
import { homedir } from 'os';
import { join } from 'path';
export function detectInstalledSkill(skillName = 'specverse') {
    const candidates = [
        join(process.cwd(), '.claude', 'skills', skillName, 'SKILL.md'),
        join(homedir(), '.claude', 'skills', skillName, 'SKILL.md'),
    ];
    for (const path of candidates) {
        if (existsSync(path))
            return { found: true, location: path };
    }
    return { found: false, location: null };
}
//# sourceMappingURL=skill-detection.js.map