fix(skills): match skills by install name in preview command#13249
Merged
SamMorrowDrums merged 2 commits intotrunkfrom Apr 21, 2026
Merged
fix(skills): match skills by install name in preview command#13249SamMorrowDrums merged 2 commits intotrunkfrom
SamMorrowDrums merged 2 commits intotrunkfrom
Conversation
The preview command's selectSkill function only matched skills by DisplayName() and Name. For plugins-convention skills, the install hint outputs InstallName() (namespace/name), which matched neither - DisplayName() includes a [plugins] prefix and Name is just the base name. This caused 'skill not found' errors when users ran the suggested preview command after install. Add InstallName() as an additional match criterion so that namespaced skill identifiers produced by the install hint are accepted. Closes #13248 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes gh skill preview failing when users paste the post-install hint for plugins-convention skills by allowing selection by InstallName() (e.g., aws-common/aws-mcp-setup).
Changes:
- Update
selectSkillingh skill previewto also match skills byInstallName(). - Add a regression test ensuring plugins-convention skills can be previewed via their install name.
Show a summary per file
| File | Description |
|---|---|
| pkg/cmd/skills/preview/preview.go | Extends skill selection to accept install-name identifiers. |
| pkg/cmd/skills/preview/preview_test.go | Adds a test case covering plugins-convention install-name matching. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
Use a two-pass search so exact DisplayName and Name matches are preferred over InstallName. This avoids incorrectly selecting a plugins-convention skill via InstallName when a standard namespaced skill with a matching DisplayName exists later in the sorted slice. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tommaso-moro
approved these changes
Apr 21, 2026
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
Fixes #13248
After
gh skill install, the output suggests agh skill previewcommand using the skill'sInstallName()(e.g.,aws-common/aws-mcp-setupfor plugins-convention skills). However, the preview command'sselectSkillfunction only matched againstDisplayName()andName, neither of which matched:DisplayName()for plugins convention =[plugins] aws-common/aws-mcp-setupName=aws-mcp-setupInstallName()=aws-common/aws-mcp-setup(what the install hint outputs)Changes
pkg/cmd/skills/preview/preview.go: Addeds.InstallName()as an additional match criterion inselectSkill, so namespaced skill identifiers from the install hint are accepted.pkg/cmd/skills/preview/preview_test.go: Added test case for plugins-convention skills matched by install name.End-to-end verification
Before fix:
After fix: