Skip to content

fix: top-level skill dirs so Claude discovers unprefixed names#761

Merged
garrytan merged 7 commits intomainfrom
garrytan/fix-no-prefix-skills
Apr 3, 2026
Merged

fix: top-level skill dirs so Claude discovers unprefixed names#761
garrytan merged 7 commits intomainfrom
garrytan/fix-no-prefix-skills

Conversation

@garrytan
Copy link
Copy Markdown
Owner

@garrytan garrytan commented Apr 1, 2026

Summary

  • Replaces directory symlinks with real directories + SKILL.md symlinks in both setup and bin/gstack-relink. Claude Code auto-prefixes skills nested under a parent dir symlink, causing /plan-ceo-review to fail as "Unknown skill" even with skill_prefix=false. Real top-level dirs fix this.
  • Updates cleanup helpers to handle both old symlinks AND new real-directory-with-symlinked-SKILL.md entries when switching between prefix modes.
  • Syncs package.json version to 0.15.1.0 to match VERSION file.
  • Updates test assertions to match the new mkdir -p + ln -snf approach.

Test plan

  • bun test passes (test-2 FAIL is pre-existing eval-store fixture)
  • Run ./setup --no-prefix and verify skills appear as flat names (/plan-ceo-review, /qa, etc.)
  • Run ./setup --prefix and verify skills appear as gstack-* names
  • Verify gstack-relink correctly switches between modes

Documentation

  • CLAUDE.md: Updated "Vendored symlink awareness" section to describe the new real-directory pattern instead of old qa -> gstack/qa symlinks
  • CONTRIBUTING.md: Updated ASCII diagram, contributor workflow, and testing instructions to reflect real directories with SKILL.md symlinks inside
  • CHANGELOG.md: Added "Fixed" subsection to 0.15.1.0 documenting the top-level skill discovery fix

🤖 Generated with Claude Code

Replace directory symlinks (gstack/qa → qa) with real directories
containing a SKILL.md symlink. Claude Code auto-prefixes skills nested
under a parent dir symlink, so /plan-ceo-review became "Unknown skill"
even with skill_prefix=false. Real dirs fix this.

Also syncs package.json version to match VERSION file and updates
test assertions to match the new mkdir + ln approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

E2E Evals: ✅ PASS

3/3 tests passed | $.16 total cost | 12 parallel runners

Suite Result Status Cost
e2e-workflow 1/1 $0.12
llm-judge 1/1 $0.02
llm-judge 1/1 $0.02

12x ubicloud-standard-2 (Docker: pre-baked toolchain + deps) | wall clock ≈ slowest suite

garrytan and others added 6 commits April 2, 2026 18:16
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verifies the invariant that setup/relink creates real directories (not
symlinks) at the top level, with SKILL.md symlinks inside. This prevents
Claude Code from auto-prefixing skills with gstack- when using --no-prefix.

Tests added:
- unprefixed skills must be real dirs with SKILL.md symlinks
- prefixed skills must also be real dirs with SKILL.md symlinks
- old directory symlinks get upgraded to real directories
- cleanup functions handle both old symlinks and new dir pattern
- link function removes old directory symlinks before mkdir

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verifies the core invariant: when you pick a prefix mode, ONLY that
mode's entries exist. Zero pollution from the other mode.

- first install --no-prefix: only flat names, zero gstack-* leaks
- first install --prefix: only gstack-* names, zero flat leaks
- non-TTY defaults to flat names
- switching prefix→no-prefix removes ALL gstack-* entries
- switching no-prefix→prefix removes ALL flat entries

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds gstack-upgrade/migrations/ directory with version-keyed bash scripts
that run automatically during /gstack-upgrade (Step 4.75, after ./setup).
Each script is idempotent and handles state fixes that setup alone can't
cover. First migration: v0.15.2.0.sh runs gstack-relink to fix stale
directory symlinks from pre-v0.15.2.0 installs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests that migration scripts are executable, parse without syntax errors,
follow the v{VERSION}.sh naming convention, and that v0.15.2.0 actually
fixes stale directory symlinks by converting them to real directories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CONTRIBUTING.md: new "Upgrade migrations" section documenting when and
how to add migration scripts for broken on-disk state.

CLAUDE.md: added note under vendored symlink awareness pointing to
CONTRIBUTING.md's migration section when worried about broken installs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@garrytan garrytan merged commit 4fc64f7 into main Apr 3, 2026
18 checks passed
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.

1 participant