Fix skills-publish-dry-run acceptance test error message mismatch#13187
Merged
williammartin merged 1 commit intosm/add-skills-commandfrom Apr 16, 2026
Merged
Conversation
The skills-publish-dry-run acceptance test expected 'no skills/ directory found' on stderr, but the actual error message from discovery is 'no skills found in <dir>'. Update the stderr matcher accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new gh skill command group (search/preview/update) and supporting internal skills infrastructure (discovery, metadata parsing, lockfile + file locking), along with acceptance tests for the new skills flows. It also updates the skills-publish-dry-run acceptance test to match the current stderr wording (no skills found in …).
Changes:
- Introduce
gh skillroot command wiring plussearch,preview, andupdatesubcommands. - Add internal skills plumbing: discovery helpers, frontmatter metadata injection, install lockfile + cross-platform file locking, and registry of agent hosts.
- Add/expand unit and acceptance tests for skills commands, plus adjust
skills-publish-dry-runstderr matching.
Show a summary per file
| File | Description |
|---|---|
| pkg/cmd/skills/update/update.go | New gh skill update implementation (scan installed skills, resolve refs, reinstall updates). |
| pkg/cmd/skills/skills.go | New top-level gh skill command group wiring. |
| pkg/cmd/skills/search/search.go | New gh skill search implementation (GitHub Code Search, ranking, enrichment, interactive install). |
| pkg/cmd/skills/search/search_test.go | Unit tests for search behavior, ranking, JSON output, and error handling. |
| pkg/cmd/skills/preview/preview.go | New gh skill preview implementation (resolve version, discover skills, render file tree + pager). |
| pkg/cmd/skills/preview/preview_test.go | Unit tests for preview behavior (interactive/non-interactive, file browsing, limits). |
| pkg/cmd/root/root.go | Registers the new gh skill command under the root CLI. |
| internal/skills/source/source.go | Helpers for supported host validation + parsing/storing repo metadata URLs. |
| internal/skills/source/source_test.go | Unit tests for repo URL parsing + host validation. |
| internal/skills/registry/registry.go | Registry of agent hosts and install directory resolution logic. |
| internal/skills/registry/registry_test.go | Unit tests for agent lookup, install dir resolution, labels, and parsing remotes. |
| internal/skills/lockfile/lockfile.go | New .skill-lock.json writer with process-wide file locking. |
| internal/skills/lockfile/lockfile_test.go | Unit tests for lockfile creation/update and lock acquisition failures. |
| internal/skills/installer/installer.go | Skill installer (remote + local), metadata injection, concurrency, and lockfile recording. |
| internal/skills/installer/installer_test.go | Unit tests for install behaviors, safety checks, and lockfile output. |
| internal/skills/frontmatter/frontmatter.go | Frontmatter parsing + metadata injection/serialization. |
| internal/skills/frontmatter/frontmatter_test.go | Unit tests for frontmatter parsing and metadata injection. |
| internal/skills/discovery/discovery.go | Skill discovery in repos/local dirs; ref resolution; blob/tree helpers. |
| internal/skills/discovery/collisions.go | Name collision detection/formatting helpers. |
| internal/skills/discovery/collisions_test.go | Unit tests for collision detection/formatting. |
| internal/flock/flock.go | OS-agnostic sentinel error for file lock contention. |
| internal/flock/flock_unix.go | Unix implementation of non-blocking file locks. |
| internal/flock/flock_windows.go | Windows implementation of non-blocking file locks. |
| internal/flock/flock_test.go | Unit tests for file locking behavior. |
| git/client.go | Adds helper methods for reading remote URL + checking gitignore, plus ShortSHA. |
| git/client_test.go | Unit tests for the new git client helpers. |
| go.mod | Promotes golang.org/x/sys to a direct dependency (used by Windows file locking). |
| acceptance/acceptance_test.go | Adds a new acceptance test runner for the skills testscript directory. |
| acceptance/testdata/skills/skills-update.txtar | Acceptance coverage for update (dry-run, force update, rewritten SKILL.md). |
| acceptance/testdata/skills/skills-update-noinstalled.txtar | Acceptance coverage for update with no installed skills. |
| acceptance/testdata/skills/skills-search*.txtar | Acceptance coverage for search (basic, pagination, no results). |
| acceptance/testdata/skills/skills-preview*.txtar | Acceptance coverage for preview (interactive + non-interactive failure). |
| acceptance/testdata/skills/skills-install*.txtar | Acceptance coverage for install flows (dir/scope/pin/namespaced/local/force). |
| acceptance/testdata/skills/skills-publish-*.txtar | Acceptance coverage for publish flows; includes updated stderr matcher for dry-run. |
| .gitignore | Ignores the gh binary artifact. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
williammartin
approved these changes
Apr 16, 2026
BagToad
approved these changes
Apr 16, 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.
Fixes the broken acceptance test flagged in https://github.com/cli/cli/pull/13165/changes#r3093956593
The
skills-publish-dry-runtxtar test expectedno skills/ directory foundon stderr, but the actual error fromdiscovery.DiscoverSkillsisno skills found in <dir>. Updated the stderr matcher to match the current error message.Change:
stderr 'no skills/ directory found'→stderr 'no skills found in'