#!/bin/bash
# Install the Adom Desktop Fusion 360 Bridge's Claude skills from THIS repo (the
# single source of truth) into the user's skills dir. App-specific skills live
# ONLY here, in the app's repo.
set -e
PKG_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILLS_DIR="$HOME/.claude/skills"
mkdir -p "$SKILLS_DIR/adom-desktop-fusion-bridge"
[ -f "$PKG_DIR/SKILL.md" ] && cp "$PKG_DIR/SKILL.md" "$SKILLS_DIR/adom-desktop-fusion-bridge/SKILL.md"
for skill_dir in "$PKG_DIR/skills"/*/; do
  [ -d "$skill_dir" ] || continue
  name=$(basename "$skill_dir")
  mkdir -p "$SKILLS_DIR/$name"
  cp -r "$skill_dir"* "$SKILLS_DIR/$name/"
done
echo "Installed adom-desktop-fusion-bridge skills: $(ls "$PKG_DIR/skills" 2>/dev/null | tr '\n' ' ')"
