fix: use relative symlinks for vendored/local installs#955
Open
hyldmo wants to merge 1 commit intogarrytan:mainfrom
Open
fix: use relative symlinks for vendored/local installs#955hyldmo wants to merge 1 commit intogarrytan:mainfrom
hyldmo wants to merge 1 commit intogarrytan:mainfrom
Conversation
link_claude_skill_dirs() was creating absolute symlinks for SKILL.md files regardless of install type. For vendored installs where gstack lives inside the project's .claude/skills/, this bakes in the machine- specific absolute path, breaking portability — other developers cloning the repo get dangling symlinks and git shows churn on every upgrade. Now detects when gstack is a direct child of skills_dir and uses relative paths (e.g., ../gstack/qa/SKILL.md) instead. Absolute paths are still used for global installs where the gstack directory lives outside the skills directory. Fixes garrytan#954 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
link_claude_skill_dirs()creates absolute symlinks for SKILL.md files regardless of install type. For vendored installs where gstack lives inside the project's.claude/skills/, this bakes in the machine-specific absolute path (e.g.,/Users/alice/myproject/.claude/skills/gstack/qa/SKILL.md), which:git diffon every upgrade (relative → absolute conversion)Fix
Detect when
gstack_diris a direct child ofskills_dirand use relative paths (../gstack/qa/SKILL.md) instead. Absolute paths are still used for global installs where gstack lives outside the skills directory.The detection uses
pwd -Pto resolve both paths and comparesgstack_dir/..againstskills_dir— same approach already used elsewhere in the setup script.Testing
Verified on a vendored install:
readlink .claude/skills/qa/SKILL.md→/Users/hyldmo/.../gstack/qa/SKILL.mdreadlink .claude/skills/qa/SKILL.md→../gstack/qa/SKILL.mdGlobal install behavior is unchanged (absolute paths preserved).
Fixes #954