Clarify skill publish error for nested skill directories - #14259
Open
tommaso-moro wants to merge 2 commits into
Open
Clarify skill publish error for nested skill directories#14259tommaso-moro wants to merge 2 commits into
tommaso-moro wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d7cfd21b-8317-42d4-aba0-2b0ac2d7bb87
Contributor
There was a problem hiding this comment.
Pull request overview
Requires gh skill publish to target a repository root, preventing partial skill validation before tagging and releasing.
Changes:
- Adds repository-root validation.
- Documents the restriction and adds regression coverage for nested directories.
Show a summary per file
| File | Description |
|---|---|
pkg/cmd/skills/publish/publish.go |
Adds root validation and help text. |
pkg/cmd/skills/publish/publish_test.go |
Tests nested-directory rejection and updates Git stubs. |
Review details
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d7cfd21b-8317-42d4-aba0-2b0ac2d7bb87
tommaso-moro
marked this pull request as ready for review
August 25, 2026 15:04
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.
Closes #14134
Description
When
gh skill publishis given a skill directory containingSKILL.mddirectly, shared discovery represents that skill's path as.. Publish then compares the skill name with.and reports the misleading errorname "reskill" does not match directory name ".".This change recognizes only that already-failing case when the selected skill directory is inside a Git repository and replaces the name-mismatch error with an explanation that
gh skill publishmust target the repository root. It does not add general repository-root enforcement or change successful publishing behavior.How did you test this change?
Given this checkout contains
skills/gh-skill, when I rango run ./cmd/gh skill publish skills/gh-skill --dry-run, then the command still exited unsuccessfully but explained that the selected path is a skill directory within a repository and that publishing must target the repository root.Key points
..Notes for reviewers
Start with the targeted check in
publishRun, followed byTestPublishRun_ExplainsSkillDirectoryWithinRepository. #14134 contains the original misleading diagnostic.Authorship and follow-up
Who wrote this:
Who answers review comments: