Small issue... this script in README.md is broken:
# 2. Remove per-skill symlinks pointing into gstack/
find ~/.claude/skills -maxdepth 1 -type l 2>/dev/null | while read -r link; do
case "$(readlink "$link" 2>/dev/null)" in gstack/*|*/gstack/*) rm -f "$link" ;; esac
done
It assumes per-skill entries in ~/.claude/skills are themselves symlinks. But in an actual install, the top-level skill directories are real directories, and only SKILL.md inside each skill directory is symlinked into ~/.claude/skills/gstack/... .
Example:
~/.claude/skills/context-restore/SKILL.md -> ~/.claude/skills/gstack/context-restore/SKILL.md
Because the script uses:
find ~/.claude/skills -maxdepth 1 -type l
it only searches for symlinks directly under ~/.claude/skills and does not find nested SKILL.md symlinks. As a result, it removes nothing.
Fix:
find ~/.claude/skills -mindepth 1 -maxdepth 1 -type d ! -name gstack 2>/dev/null |
while IFS= read -r dir; do
link="$dir/SKILL.md"
[ -L "$link" ] || continue
target=$(readlink "$link" 2>/dev/null) || continue
case "$target" in
gstack/*|*/gstack/*)
rm -rf -- "$dir"
;;
esac
done
and a dry-run version for testing:
remove_file=$(mktemp)
keep_file=$(mktemp)
find ~/.claude/skills -mindepth 1 -maxdepth 1 -type d ! -name gstack 2>/dev/null |
while IFS= read -r dir; do
link="$dir/SKILL.md"
if [ -L "$link" ]; then
target=$(readlink "$link" 2>/dev/null) || target=""
case "$target" in
gstack/*|*/gstack/*)
printf '%s\n' "$dir" >> "$remove_file"
;;
*)
printf '%s (SKILL.md symlink target: %s)\n' "$dir" "$target" >> "$keep_file"
;;
esac
else
printf '%s (no symlinked SKILL.md)\n' "$dir" >> "$keep_file"
fi
done
echo 'Would be removed:'
sort "$remove_file"
echo
echo 'Would NOT be removed:'
sort "$keep_file"
rm -f "$remove_file" "$keep_file"
Small issue... this script in README.md is broken:
It assumes per-skill entries in ~/.claude/skills are themselves symlinks. But in an actual install, the top-level skill directories are real directories, and only SKILL.md inside each skill directory is symlinked into ~/.claude/skills/gstack/... .
Example:
~/.claude/skills/context-restore/SKILL.md -> ~/.claude/skills/gstack/context-restore/SKILL.md
Because the script uses:
find ~/.claude/skills -maxdepth 1 -type l
it only searches for symlinks directly under ~/.claude/skills and does not find nested SKILL.md symlinks. As a result, it removes nothing.
Fix:
and a dry-run version for testing: