From 7ec59819ab6adacca16418057ea2edc394bdc354 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Tue, 26 May 2026 06:05:26 +0200 Subject: [PATCH] fix(link): expose gstack shared infra (bin/ + browse/dist/) via symlinks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per-skill SKILL.md symlinks don't expose gstack's shared infrastructure. Multiple skills hardcode ~/.claude/skills/gstack/bin/ (gstack-config, gstack-update-check, gstack-paths) and gstack/browse/dist/ (browse binary). Create targeted symlinks in link.sh: - ~/.claude/skills/gstack/bin/ → skills-external/gstack/bin/ - ~/.claude/skills/gstack/browse/dist/ → skills-external/gstack/browse/dist/ Fixes: browse binary not found, gstack-config failures, freeze gstack-paths resolution. Safe with profile toggles (profiles move per-skill dirs, not the gstack/ infra dir). Safe with stale link cleanup (only removes -L symlinks, not real dirs created by mkdir -p). Co-Authored-By: Claude Opus 4.6 (1M context) --- link.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/link.sh b/link.sh index 51bf084..882d362 100644 --- a/link.sh +++ b/link.sh @@ -50,6 +50,27 @@ if [ ! -d "$REPO/skills-external/gstack" ]; then echo "⚠️ GStack submodule not found — run: git submodule update --init" fi +# GStack shared infrastructure: bin/ (CLI tools, config, analytics) and +# browse/dist/ (compiled browse binary). Per-skill SKILL.md symlinks don't +# expose these, but multiple skills hardcode ~/.claude/skills/gstack/bin/ +# and ~/.claude/skills/gstack/browse/dist/. Create targeted symlinks. +GSTACK_SRC="$REPO/skills-external/gstack" +GSTACK_DST="$CLAUDE/skills/gstack" +if [ -d "$GSTACK_SRC/bin" ]; then + mkdir -p "$GSTACK_DST" + if [ ! -L "$GSTACK_DST/bin" ]; then + ln -sf "$GSTACK_SRC/bin" "$GSTACK_DST/bin" + CHANGED=$((CHANGED + 1)) + fi +fi +if [ -d "$GSTACK_SRC/browse/dist" ]; then + mkdir -p "$GSTACK_DST/browse" + if [ ! -L "$GSTACK_DST/browse/dist" ]; then + ln -sf "$GSTACK_SRC/browse/dist" "$GSTACK_DST/browse/dist" + CHANGED=$((CHANGED + 1)) + fi +fi + EXTERNAL_SKILLS=(emil-design-eng frontend-design design-motion-principles) for _ext_skill in "${EXTERNAL_SKILLS[@]}"; do if [ -d "$REPO/skills-external/$_ext_skill" ]; then