#!/usr/bin/env bash
# Remove the pup skill from the container. (Also cleans the maintainer sub-skills if an older
# pkg installed them, so an upgrade from the pre-1.8.21 layout leaves nothing behind.)
set -e
remove_from() {
  local BASE="$1"
  rm -rf "$BASE/pup" \
         "$BASE/adom-desktop-puppeteer-bridge" \
         "$BASE/pup-windows-sessions-tabs" "$BASE/pup-screenshots-recording" "$BASE/pup-browsers-and-chrome" "$BASE/pup-adom-wiki" \
  rm -rf "$BASE/pup-vendor-login"
         "$BASE/pup-bridge-dev" "$BASE/pup-bridge-publish"
  echo "  <- $BASE"
}
echo "Removing adom-desktop-puppeteer-bridge skills:"
remove_from "$HOME/.claude/skills"
[ -d "$HOME/.codex" ] && remove_from "$HOME/.codex/skills"
echo "Done."
