From a4558ee8051c9be0c6a69bb452fe80b1d5827fce Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Thu, 21 May 2026 05:04:54 +0200 Subject: [PATCH] fix(profile): resolve REPO via physical path (cd -P) so cmd_current finds the right skills-disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `lib/profile.sh:43` set `REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"`. Default `cd` preserves symlinks (logical pathname), so when the script is invoked via the `~/.claude/lib/profile.sh` symlink, `$REPO` resolves to `/home/bchanot-ubuntu/.claude` instead of the real repo path. `$SKILLS_DIR` still works because `~/.claude/skills` is itself a symlink to the repo's `skills/`. But `$DISABLED_DIR` ends up at `~/.claude/skills-disabled` (a real sibling directory containing only stale npx-skill symlinks) while the actual disabled gstack skills sit at `/skills-disabled`. Symptom: `bash "$HOME/.claude/lib/profile.sh" current` returns `none (all gstack skills enabled — no profile set)` even when a profile is applied — because `find $DISABLED_DIR -name 'gstack__*'` returns 0. Adding `-P` to `cd` forces physical-path resolution so `$REPO` always points to the real repo regardless of how the script was invoked. `cmd_current` now correctly reports `full (100% match, 14 gstack skills disabled)`. Co-Authored-By: Claude --- lib/profile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/profile.sh b/lib/profile.sh index 27beed0..0163758 100755 --- a/lib/profile.sh +++ b/lib/profile.sh @@ -40,7 +40,7 @@ # ============================================================ set -euo pipefail -REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +REPO="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" SKILLS_DIR="$REPO/skills" DISABLED_DIR="$REPO/skills-disabled" PROFILES_DIR="$REPO/lib/profiles"