#!/usr/bin/env bash # Uninstall the skills plugin from ~/.claude/. # # Removes only the symlinks that point into this repo. Other # entries under ~/.claude/skills/ and ~/.claude/agents/ are left # alone. set -euo pipefail REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" unlink_pointing_here() { local dir="$1" [ -d "$dir" ] || return 0 for entry in "$dir"/*; do [ -L "$entry" ] || continue target="$(readlink "$entry")" case "$target" in "$REPO_DIR"/*) rm "$entry" echo "removed $entry" ;; *) ;; esac done } unlink_pointing_here "$HOME/.claude/skills" unlink_pointing_here "$HOME/.claude/agents" unlink_pointing_here "$HOME/.claude/workflows" echo "Uninstall complete."