Commit Graph

1 Commits

Author SHA1 Message Date
Sina 33b3913800 fix(setup): plant gstack compat alias when install dir isn't named "gstack"
Every generated SKILL.md preamble hard-references the absolute self-path
~/.claude/skills/gstack/bin/... (config, telemetry, update-check, and all
other bin/asset calls). When gstack is installed at ~/.claude/skills/<name>
with <name> != gstack, setup's per-skill symlinks resolve correctly but those
in-file references point at a non-existent ~/.claude/skills/gstack/ and fail
SILENTLY at skill-invocation time (the preamble swallows the 127 via
`|| echo default`), so every config read falls back to defaults and telemetry
no-ops. Nothing surfaces at install; skills break later in a way that looks
like the skill itself is broken.

Fix: after linking the Claude host skills, plant a sibling compatibility alias
<skills_dir>/gstack -> <install_dir> whenever the install dir basename isn't
"gstack". Zero file edits; the hardcoded paths resolve through the alias.
Claude Code already skips the repo-shaped gstack directory when building the
slash-command list, so the alias is a path-resolution target only, not a
duplicate skill. It no-ops when the install is already named gstack and never
clobbers a real (non-symlink) gstack directory already present.

Adds test/setup-gstack-compat-alias.test.ts covering the static wiring and the
behavioral matrix (non-gstack install plants the alias, gstack install is a
no-op, real dir not clobbered, stale symlink refreshed).

Fixes #1882.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 12:34:43 -07:00