Skip to content

v1.33.3.0 fix: use file copies instead of symlinks on Windows for skill installation#1462

Open
realcarsonterry wants to merge 2 commits into
garrytan:mainfrom
realcarsonterry:fix/windows-symlink-fallback
Open

v1.33.3.0 fix: use file copies instead of symlinks on Windows for skill installation#1462
realcarsonterry wants to merge 2 commits into
garrytan:mainfrom
realcarsonterry:fix/windows-symlink-fallback

Conversation

@realcarsonterry
Copy link
Copy Markdown
Contributor

@realcarsonterry realcarsonterry commented May 13, 2026

Fixes #1456

Summary

On Windows (MSYS2/Git Bash, MINGW64), ln -snf silently creates file copies instead of symlinks when Developer Mode is disabled. This causes skill files to become stale after git pull since the "symlinks" are actually frozen copies that don't reflect upstream updates.

Root Cause

The setup script's link_claude_skill_dirs() function used ln -snf unconditionally at line 404, without checking the IS_WINDOWS flag that was already defined but only used in other parts of the script.

Changes

  • Detect Windows platform and use cp -f instead of ln -snf for SKILL.md files in link_claude_skill_dirs()
  • Add informational note on Windows installs: "note: Windows install uses file copies. Re-run ./setup after every 'git pull' to refresh skill files."
  • Preserves symlink behavior on Unix-like systems

Implementation

if [ "$IS_WINDOWS" -eq 1 ]; then
  cp -f "$gstack_dir/$dir_name/SKILL.md" "$target/SKILL.md"
else
  ln -snf "$gstack_dir/$dir_name/SKILL.md" "$target/SKILL.md"
fi

This follows the same pattern used in commit 999987ef for node_modules cache handling.

Impact

  • Windows users will now see a clear note reminding them to re-run ./setup after git pull
  • Skill files will be properly refreshed when users follow this guidance
  • No behavior change on Unix-like systems (still uses symlinks)
  • Eliminates silent staleness that caused confusion when new skill features didn't appear

🤖 Generated with Claude Code


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@realcarsonterry realcarsonterry changed the title fix: use file copies instead of symlinks on Windows for skill installation v1.33.3.0 fix: use file copies instead of symlinks on Windows for skill installation May 13, 2026
realcarsonterry and others added 2 commits May 13, 2026 12:55
…ation

Fixes garrytan#1456

On Windows (MSYS2/Git Bash, MINGW64), `ln -snf` silently creates file
copies instead of symlinks when Developer Mode is disabled. This causes
skill files to become stale after `git pull` since the "symlinks" are
actually frozen copies.

Changes:
- Detect Windows platform and use `cp -f` instead of `ln -snf` for
  SKILL.md files in link_claude_skill_dirs()
- Add informational note on Windows installs reminding users to re-run
  ./setup after git pull to refresh skill files
- Preserves symlink behavior on Unix-like systems

This follows the same pattern used in commit 999987ef for node_modules
cache handling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@realcarsonterry realcarsonterry force-pushed the fix/windows-symlink-fallback branch from 999d9a7 to d648768 Compare May 13, 2026 04:56
@realcarsonterry
Copy link
Copy Markdown
Contributor Author

Ready to Merge ✓

All 18 test checks passing. Only the infrastructure 'report' step failed (not a code issue).

Impact: Fixes issue #1456 - Windows users currently have stale skill files after git pull because symlinks silently become file copies. This PR makes skills update correctly on Windows.

Testing: Follows the same pattern from commit 999987ef for node_modules cache handling.

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.

Windows (MSYS/Git Bash): link_claude_skill_dirs creates file copies, not symlinks — skills do not update on git pull

1 participant