Support nested skill discovery without skills directories - #13894
Open
tommaso-moro wants to merge 3 commits into
Open
Support nested skill discovery without skills directories#13894tommaso-moro wants to merge 3 commits into
tommaso-moro wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates gh skills discovery and related command flows to support repositories where SKILL.md files live in arbitrarily nested, non-hidden directories (without requiring a skills/ directory), while preserving existing conventions (namespaced, plugins, root, hidden dirs) and ensuring installations/search results remain unambiguous when duplicate leaf names exist.
Changes:
- Expand skill discovery to match nested
<category>/<skill>/SKILL.mdlayouts and update “no skills found” messaging accordingly. - Preserve exact repository paths through search result deduplication and installation, and disambiguate duplicates in interactive prompts/errors.
- Add/adjust tests for nested discovery, ambiguity handling, and installation argument behavior.
Show a summary per file
| File | Description |
|---|---|
| pkg/cmd/skills/search/search.go | Pass exact SKILL.md paths through install-from-search and improve interactive disambiguation for duplicate names. |
| pkg/cmd/skills/search/search_test.go | Add coverage for path-preserving deduplication, prompt disambiguation, and install subprocess argument formation. |
| pkg/cmd/skills/publish/publish.go | Update help text to reflect expanded discovery layouts. |
| pkg/cmd/skills/install/install.go | Improve ambiguity handling and path-based selection/redirect behavior for nested skills. |
| pkg/cmd/skills/install/install_test.go | Add coverage for nested installs, ambiguity errors, exact-path selection, and upstream redirects using stored metadata paths. |
| internal/skills/discovery/discovery.go | Expand matcher to treat non-hidden nested SKILL.md as skills and update discovery error messages; improve convention detection for exact-path lookups. |
| internal/skills/discovery/discovery_test.go | Add coverage for nested matching, hidden exclusions, and nested discovery in remote/local scenarios. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/7 changed files
- Comments generated: 2
- Review effort level: Low
Co-authored-by: Copilot App <[email protected]>
This comment has been minimized.
This comment has been minimized.
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.
Fixes #13876
Summary
SKILL.mdfiles whose parent directories appear at arbitrary non-hidden repository depths, without requiring askills/directory.API request impact
SKILL.mddescriptions and repository metadata. Enrichment remains capped atpage * limit * 3candidates (45 with the default first page).Testing
go test ./...makegolangci-lint run --new-from-rev=origen/trunk ./...gh skill install android/skills r8-analyzer --dir <temp-dir>