# Skill Creator - Task Runner
# Run tasks with: just -f {base_dir}/justfile <recipe> [args...]

# Default recipe - show help
default:
    @just --list

# Directory containing scripts
scripts_dir := justfile_directory() / "scripts"

# Initialize a new skill
init skill_name path:
    uv run {{scripts_dir}}/init_skill.py {{skill_name}} --path {{path}}

# Validate a skill
validate skill_path:
    uv run {{scripts_dir}}/quick_validate.py {{skill_path}}

# Initialize a new skill in the global opencode skill directory
init-global skill_name:
    uv run {{scripts_dir}}/init_skill.py {{skill_name}} --path ~/.config/opencode/skill

# Validate all skills in a directory
validate-all skills_dir:
    #!/usr/bin/env bash
    for skill in {{skills_dir}}/*/; do
        if [ -f "$skill/SKILL.md" ]; then
            echo "Validating: $skill"
            uv run {{scripts_dir}}/quick_validate.py "$skill"
            echo ""
        fi
    done
