fix(setup): patch SKILL.md name: field when --prefix is used#630
Open
HMAKT99 wants to merge 1 commit intogarrytan:mainfrom
Open
fix(setup): patch SKILL.md name: field when --prefix is used#630HMAKT99 wants to merge 1 commit intogarrytan:mainfrom
HMAKT99 wants to merge 1 commit intogarrytan:mainfrom
Conversation
./setup --prefix creates symlinks (gstack-qa -> gstack/qa/) but the name: field inside SKILL.md still says "qa". Claude Code uses the name: field from frontmatter for skill registration, not the directory name. Result: prefixed skills don't register correctly. Fix: when prefix changes the link name, create a real directory instead of a symlink. Write a patched SKILL.md with the prefixed name: field, and symlink all other contents (templates/, references/) back to the original skill dir so relative paths still resolve. Unprefixed skills (link_name == skill_name) still use plain symlinks. Fixes garrytan#620. 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.
Summary
--prefixcreatesgstack-qa, patch thename:field in SKILL.md to matchProblem
./setup --prefixcreates symlinks correctly:But the
name:field insideqa/SKILL.mdstill saysname: qa. Claude Code uses the frontmattername:for skill registration, not the directory name.Result:
gstack-upgradeworks (its SKILL.md saysname: gstack-upgrade). Every other prefixed skill doesn't register becausename: qadoesn't match thegstack-qadirectory.Fix
When
link_name != skill_name(prefix applied):templates/,references/) back to the original so relative paths resolvesed "s/^name: $skill_name$/name: $link_name/"so thename:field matchesWhen
link_name == skill_name(no prefix): plain symlink, unchanged.+17/-1 in
setup.Verification
Fixes #620.