pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/cli/cli/pull/13894

://github.githubassets.com/assets/pull-requests-be6017ec12798e73.css" /> Support nested skill discovery without skills directories by tommaso-moro · Pull Request #13894 · cli/cli · GitHub
Skip to content

Support nested skill discovery without skills directories - #13894

Open
tommaso-moro wants to merge 3 commits into
trunkfrom
tommaso-moro-skill-install-nested-discovery
Open

Support nested skill discovery without skills directories#13894
tommaso-moro wants to merge 3 commits into
trunkfrom
tommaso-moro-skill-install-nested-discovery

Conversation

@tommaso-moro

@tommaso-moro tommaso-moro commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #13876

Summary

  • Discover skills from SKILL.md files whose parent directories appear at arbitrary non-hidden repository depths, without requiring a skills/ directory.
  • Preserve existing precedence and behavior for standard, namespaced, plugin, root, and hidden-directory conventions.
  • Keep install, preview, update, search, and publish behavior consistent through the shared discovery matcher.
  • Preserve exact repository paths in search and installation so duplicate leaf names remain distinguishable and cannot install the wrong skill.
  • Update command help and discovery errors to describe the supported layouts.

API request impact

  • Repository discovery still uses one recursive tree request, regardless of how many layouts match.
  • GitHub Code Search request counts are unchanged.
  • Broader matching can retain more search candidates, which may increase ordinary REST requests for SKILL.md descriptions and repository metadata. Enrichment remains capped at page * limit * 3 candidates (45 with the default first page).

Testing

  • go test ./...
  • make
  • golangci-lint run --new-from-rev=origen/trunk ./...
  • gh skill install android/skills r8-analyzer --dir <temp-dir>

@tommaso-moro
tommaso-moro marked this pull request as ready for review July 17, 2026 09:59
@tommaso-moro
tommaso-moro requested review from a team as code owners July 17, 2026 09:59
@tommaso-moro
tommaso-moro requested review from babakks and Copilot July 17, 2026 09:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md layouts 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

Comment thread pkg/cmd/skills/install/install.go Outdated
Comment thread pkg/cmd/skills/publish/publish.go Outdated
@rickgonzalez

This comment has been minimized.

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.

gh skill install can't find skills when there's no skills/ directory but the SKILL.md files are nested

3 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy