"use strict";
/**
 * 🎯 Skills Command - Claude Code Skills Integration
 * List skills from .faf file
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.skillsCommand = skillsCommand;
const file_utils_1 = require("../utils/file-utils");
const fs_1 = require("fs");
const yaml_1 = require("../fix-once/yaml");
const colors_1 = require("../fix-once/colors");
async function skillsCommand(options = {}) {
    try {
        const fafPath = await (0, file_utils_1.findFafFile)(options.path);
        if (!fafPath) {
            console.log(colors_1.chalk.yellow('⚠️  No .faf file found'));
            console.log(colors_1.chalk.dim('Run `faf init` to create one'));
            return;
        }
        const content = (0, fs_1.readFileSync)(fafPath, 'utf-8');
        const data = (0, yaml_1.parse)(content);
        if (!data.skills || data.skills.length === 0) {
            console.log(colors_1.chalk.dim('No skills configured in .faf'));
            console.log(colors_1.chalk.dim('Add skills to your .faf file:'));
            console.log(colors_1.chalk.dim('  skills:'));
            console.log(colors_1.chalk.dim('    - faf'));
            console.log(colors_1.chalk.dim('    - wjttc-tester'));
            return;
        }
        console.log(colors_1.chalk.cyan.bold('\n🎸 Claude Code Skills\n'));
        console.log(colors_1.chalk.dim(`From: ${fafPath}\n`));
        data.skills.forEach((skill, index) => {
            console.log(`  ${index + 1}. ${colors_1.chalk.bold(skill)}`);
        });
        console.log(colors_1.chalk.dim(`\n${data.skills.length} skill(s) configured`));
        console.log(colors_1.chalk.dim('Skills loaded from ~/.claude/skills/'));
    }
    catch (error) {
        console.error(colors_1.chalk.red('Error reading skills:'), error);
        throw error;
    }
}
//# sourceMappingURL=skills.js.map