#!/bin/bash
set -e
PKG_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILLS_DIR="$HOME/.claude/skills"
mkdir -p "$SKILLS_DIR/adom-desktop-hello-rust-bridge"
if [ -f "$PKG_DIR/SKILL.md" ]; then
  cp "$PKG_DIR/SKILL.md" "$SKILLS_DIR/adom-desktop-hello-rust-bridge/SKILL.md"
fi
for skill_dir in "$PKG_DIR/skills"/*/; do
  [ -d "$skill_dir" ] || continue
  skill_name=$(basename "$skill_dir")
  mkdir -p "$SKILLS_DIR/$skill_name"
  cp -r "$skill_dir"* "$SKILLS_DIR/$skill_name/"
done
echo "Installed adom-desktop-hello-rust-bridge"
