From 530987efb85200db16c20f124052c03f6e75a195 Mon Sep 17 00:00:00 2001 From: Stefan Neamtu Date: Wed, 6 May 2026 12:02:58 +0200 Subject: [PATCH] fix(docs): correct per-skill symlink removal snippet in README uninstall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #1130. The manual-uninstall fallback in `## Uninstall` → `### Option 2` used `find ~/.claude/skills -maxdepth 1 -type l`, which finds nothing on real installs. Each `~/.claude/skills//` is a real directory, and only `/SKILL.md` inside it is a symlink into `gstack/`. The find never matched, so the snippet silently removed nothing. Replace with a directory walk that inspects each `/SKILL.md`: find ~/.claude/skills -mindepth 1 -maxdepth 1 -type d ! -name gstack → check $dir/SKILL.md is a symlink → readlink it → if target is gstack/* or */gstack/*: rm -f the link, rmdir the dir (only if empty — preserves any user-added files) Excludes the top-level `gstack/` dir from the walk; that's removed by step 3 of the same uninstall block. `bin/gstack-uninstall` (the script-mode path) already handles the layout correctly via its own walk; only this manual fallback needed updating. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dcab7cf21..87f2d5ddd 100644 --- a/README.md +++ b/README.md @@ -327,9 +327,18 @@ If you don't have the repo cloned (e.g. you installed via a Claude Code paste an # 1. Stop browse daemons pkill -f "gstack.*browse" 2>/dev/null || true -# 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 +# 2. Remove per-skill directories whose SKILL.md points into gstack/ +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 -f "$link" + rmdir "$dir" 2>/dev/null || true + ;; + esac done # 3. Remove gstack