Skip to content

fix: use relative symlinks for vendored/local installs#955

Open
hyldmo wants to merge 1 commit intogarrytan:mainfrom
hyldmo:fix/relative-symlinks-vendored
Open

fix: use relative symlinks for vendored/local installs#955
hyldmo wants to merge 1 commit intogarrytan:mainfrom
hyldmo:fix/relative-symlinks-vendored

Conversation

@hyldmo
Copy link
Copy Markdown

@hyldmo hyldmo commented Apr 10, 2026

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:

  1. Breaks for other developers cloning the repo (dangling symlinks)
  2. Shows churn in git diff on every upgrade (relative → absolute conversion)

Fix

Detect when gstack_dir is a direct child of skills_dir and 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 -P to resolve both paths and compares gstack_dir/.. against skills_dir — same approach already used elsewhere in the setup script.

Testing

Verified on a vendored install:

  • Before: readlink .claude/skills/qa/SKILL.md/Users/hyldmo/.../gstack/qa/SKILL.md
  • After: readlink .claude/skills/qa/SKILL.md../gstack/qa/SKILL.md

Global install behavior is unchanged (absolute paths preserved).

Fixes #954

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup creates absolute symlinks for vendored installs, breaks portability

1 participant