Implement skill validate, build, and push CLI commands#3989
Merged
JAORMX merged 1 commit intoskill-cli-lifecycle-commandsfrom Mar 4, 2026
Merged
Implement skill validate, build, and push CLI commands#3989JAORMX merged 1 commit intoskill-cli-lifecycle-commandsfrom
JAORMX merged 1 commit intoskill-cli-lifecycle-commandsfrom
Conversation
Replace empty skill validate/build/push stubs with real implementations that call the Skills HTTP client. Validate supports --format flag, resolves paths to absolute, prints errors/warnings in text mode, and returns non-zero exit on invalid. Build supports --tag/-t flag, resolves paths to absolute, and prints the built OCI reference on success. Push takes a positional OCI reference argument and follows silent-success convention. All three commands include directory-based shell completion for path arguments. Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## skill-cli-lifecycle-commands #3989 +/- ##
================================================================
- Coverage 68.55% 68.51% -0.04%
================================================================
Files 437 437
Lines 44662 44662
================================================================
- Hits 30617 30601 -16
- Misses 11663 11677 +14
- Partials 2382 2384 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rdimitrov
approved these changes
Mar 4, 2026
aponcedeleonch
pushed a commit
that referenced
this pull request
Mar 4, 2026
Replace empty skill validate/build/push stubs with real implementations that call the Skills HTTP client. Validate supports --format flag, resolves paths to absolute, prints errors/warnings in text mode, and returns non-zero exit on invalid. Build supports --tag/-t flag, resolves paths to absolute, and prints the built OCI reference on success. Push takes a positional OCI reference argument and follows silent-success convention. All three commands include directory-based shell completion for path arguments. Closes #3653 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JAORMX
added a commit
that referenced
this pull request
Mar 4, 2026
Review feedback from #3988: - Move validateProjectRootForScope to skill_helpers.go for reuse - Default uninstall --scope to "user" for consistency with install - Add validateProjectRootForScope to uninstall PreRunE - Document build reference output in Long description - Remove chatty "Valid" print from validate (silent success) Also implements validate, build, and push commands on this branch (previously in #3989 which targeted the old stacked branch). Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7 tasks
JAORMX
added a commit
that referenced
this pull request
Mar 4, 2026
* Implement skill install and uninstall CLI commands Replace empty skill install/uninstall stubs with real implementations that call the Skills HTTP client. Install supports --client, --scope (default "user"), --force, and --project-root flags with validation that --project-root is required when --scope is "project". Uninstall supports --scope and --project-root flags with shell completion for installed skill names. Both commands follow silent-success convention. Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review feedback and implement all skill CLI commands Review feedback from #3988: - Move validateProjectRootForScope to skill_helpers.go for reuse - Default uninstall --scope to "user" for consistency with install - Add validateProjectRootForScope to uninstall PreRunE - Document build reference output in Long description - Remove chatty "Valid" print from validate (silent success) Also implements validate, build, and push commands on this branch (previously in #3989 which targeted the old stacked branch). Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
reyortiz3
pushed a commit
that referenced
this pull request
Mar 4, 2026
* Implement skill install and uninstall CLI commands Replace empty skill install/uninstall stubs with real implementations that call the Skills HTTP client. Install supports --client, --scope (default "user"), --force, and --project-root flags with validation that --project-root is required when --scope is "project". Uninstall supports --scope and --project-root flags with shell completion for installed skill names. Both commands follow silent-success convention. Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review feedback and implement all skill CLI commands Review feedback from #3988: - Move validateProjectRootForScope to skill_helpers.go for reuse - Default uninstall --scope to "user" for consistency with install - Add validateProjectRootForScope to uninstall PreRunE - Document build reference output in Long description - Remove chatty "Valid" print from validate (silent success) Also implements validate, build, and push commands on this branch (previously in #3989 which targeted the old stacked branch). Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
reyortiz3
pushed a commit
that referenced
this pull request
Mar 4, 2026
* Implement skill install and uninstall CLI commands Replace empty skill install/uninstall stubs with real implementations that call the Skills HTTP client. Install supports --client, --scope (default "user"), --force, and --project-root flags with validation that --project-root is required when --scope is "project". Uninstall supports --scope and --project-root flags with shell completion for installed skill names. Both commands follow silent-success convention. Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review feedback and implement all skill CLI commands Review feedback from #3988: - Move validateProjectRootForScope to skill_helpers.go for reuse - Default uninstall --scope to "user" for consistency with install - Add validateProjectRootForScope to uninstall PreRunE - Document build reference output in Long description - Remove chatty "Valid" print from validate (silent success) Also implements validate, build, and push commands on this branch (previously in #3989 which targeted the old stacked branch). Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
reyortiz3
added a commit
that referenced
this pull request
Mar 4, 2026
* Integrate skills with groups system Extend the groups system to track skill membership alongside registered clients. Skills can now be assigned to groups at install time and are automatically removed from all groups on uninstall. Changes: - Add `Skills []string` field to `Group` struct (backward-compatible, omitempty) - Add `Update(ctx, *Group) error` to the `Manager` interface with implementations in both `cliManager` and `crdManager` - Add package-level helpers `AddSkillToGroups` and `RemoveSkillFromAllGroups` in `pkg/groups/skills.go` - Extend `InstallOptions` with `Groups []string` and `ListOptions` with `Group string`; add `Group` field to `SkillIndexEntry` - Wire a `groups.Manager` into `skillsvc`: install registers the skill in the specified groups, uninstall removes it from all groups, and list can filter by group membership - Implement `skill install --group`, `skill list --group`, and `skill uninstall` CLI subcommands - Wire `WithGroupManager` into the API skill service Closes #3654 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Implement skill install and uninstall CLI commands (#3988) * Implement skill install and uninstall CLI commands Replace empty skill install/uninstall stubs with real implementations that call the Skills HTTP client. Install supports --client, --scope (default "user"), --force, and --project-root flags with validation that --project-root is required when --scope is "project". Uninstall supports --scope and --project-root flags with shell completion for installed skill names. Both commands follow silent-success convention. Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address review feedback and implement all skill CLI commands Review feedback from #3988: - Move validateProjectRootForScope to skill_helpers.go for reuse - Default uninstall --scope to "user" for consistency with install - Add validateProjectRootForScope to uninstall PreRunE - Document build reference output in Long description - Remove chatty "Valid" print from validate (silent success) Also implements validate, build, and push commands on this branch (previously in #3989 which targeted the old stacked branch). Closes #3653 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Integrate skills with groups system Extend the groups system to track skill membership alongside registered clients. Skills can now be assigned to groups at install time and are automatically removed from all groups on uninstall. Changes: - Add `Skills []string` field to `Group` struct (backward-compatible, omitempty) - Add `Update(ctx, *Group) error` to the `Manager` interface with implementations in both `cliManager` and `crdManager` - Add package-level helpers `AddSkillToGroups` and `RemoveSkillFromAllGroups` in `pkg/groups/skills.go` - Extend `InstallOptions` with `Groups []string` and `ListOptions` with `Group string`; add `Group` field to `SkillIndexEntry` - Wire a `groups.Manager` into `skillsvc`: install registers the skill in the specified groups, uninstall removes it from all groups, and list can filter by group membership - Implement `skill install --group`, `skill list --group`, and `skill uninstall` CLI subcommands - Wire `WithGroupManager` into the API skill service Closes #3654 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Remove duplicate validators in skill commands skill install and skill list had duplicate PreRunE validators called twice in their chains. Remove the redundant calls. * Move newSkillService out of skill.go The helper function and its imports are no longer needed directly in the skill command file. * Simplify skill group registration to single group Change AddSkillToGroups/registerSkillInGroups to accept a single group name string instead of a slice, matching the actual usage where skills are installed into at most one group at a time. Also fix macOS test failures caused by t.TempDir() returning symlinked paths (e.g. /var/folders/...) that fail the "no symlinks" validation in ValidateProjectRoot by resolving symlinks via filepath.EvalSymlinks. Remove duplicate --group flag registration in skill list command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Move skills client DTOs to dedicated file Extract request/response types from client.go into a separate dto.go file to improve code organization and separation of concerns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add SPDX license header to skills client dto Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Run unit tests on both Linux and macOS runners Add matrix strategy to the test workflow to run unit tests on both ubuntu-latest and macos-latest, ensuring cross-platform compatibility. Coverage uploads are gated to Linux only to avoid duplicate reports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Regenerate Swagger docs to include skills field in groups.Group Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Reynier Ortiz Vega <reyniero@Reyniers-MacBook-Pro.local> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Juan Antonio Osorio <ozz@stacklok.com>
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
skill validatestub with real implementation supporting--formatflag, absolute path resolution, error/warning output in text mode, and non-zero exit on invalidskill buildstub with real implementation supporting--tag/-tflag, printing the built OCI reference on successskill pushstub with real implementation following silent-success conventionPart 3 of 3 for #3653 (CLI Skills Commands). Stacked on #3988.
Test plan
task lintpasses with no new warningstask testpasses (existing unit tests)task license-checkpasses (SPDX headers correct)thv skill validate --helpshows correct flags (--format)thv skill build --helpshows correct flags (--tag/-t)thv skill push --helpshows correct usage🤖 Generated with Claude Code