Add skillserver CLI tool with unified release pipeline#56
Merged
Aaronontheweb merged 6 commits intodevfrom May 5, 2026
Merged
Conversation
Introduce Netclaw.SkillServer.Cli, a .NET global tool for managing skills on a SkillServer instance. Supports publish, batch publish, delete, list, search, verify, config, and API key management. Key capabilities: - Publish skill directories (SKILL.md + resource files) with idempotent skip-on-conflict behavior and --force for re-publishing - Batch publish all skills in a directory via publish-all - Auth resolution: CLI flags > env vars > config file - AOT-compatible with hand-rolled YAML frontmatter parser - Distributable as dotnet global tool (PackAsTool) Also extends Netclaw.SkillClient with resource upload support (UploadSkillWithResourcesAsync) and API key management methods.
…ishOptions - Consolidate UploadSkillWithResourcesAsync to delegate to the Try variant instead of duplicating multipart form construction - Extract PublishOptions record to replace boolean parameter sprawl - Unify dry-run handling in PublishOrchestrator with shared formatting - Deduplicate command dispatch into single DispatchAsync method - Change all CLI types to internal (InternalsVisibleTo covers tests) - Fix HttpResponseMessage leak in PublishOrchestrator - Use stream.Length instead of redundant FileInfo allocations - Remove explanatory WHAT comments per project conventions
…tsAsync - Remove TryUploadSkillWithResourcesAsync (exposed raw HttpResponseMessage) - Add UploadSkillIfNotExistsAsync returning SkillUploadResponse? (null = 409) - Extract PostSkillAsync as private helper to eliminate form-building duplication - Seal SkillServerClientJsonContext - Convert ScannedResource, PublishOptions, ResolvedConfig to readonly record structs
Exercise full CLI workflows against a real in-process SkillServer: publish, list, versions, verify, delete, idempotent upload, force republish, resource uploads, multi-version tracking, search, digest verification, and API key management. Add AuthenticatedClient to SkillServerFixture to separate read operations (no auth) from write operations (auth required).
Extract HandleHttpError helper to ConsoleOutput, replacing 5 identical catch blocks across ApiKeyCommand, DeleteCommand, and VerifyCommand. Parallelize resource verification in VerifyCommand using Task.WhenAll. Change IsTty to static readonly field. Remove explanatory comments.
Consolidate publish_nuget.yml and publish_container.yml into a single release.yml that builds NuGet packages, CLI binaries (linux-x64, linux-arm64, osx-arm64, win-x64), and container images in parallel, then publishes everything in a coordinated final stage. Add install scripts for Linux/macOS (bash) and Windows (PowerShell) that download platform binaries from GitHub Releases. Enable trimming for self-contained CLI publishes (38MB -> 14MB). Add VerboseLoggingHandler for --verbose HTTP request/response logging. Update pr_validation.yml with trim warning checks, smoke tests, and shellcheck/PowerShell linting. Add CLI README for NuGet package page and update root README with component overview.
90b7578 to
a3a254f
Compare
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
skillserverCLI tool for publishing and managing skills on a SkillServer instance, distributed as both a .NET global tool and standalone trimmed binaries (linux-x64, linux-arm64, osx-arm64, win-x64)publish_nuget.ymlandpublish_container.ymlinto a single coordinatedrelease.ymlthat builds NuGet packages, CLI binaries, and container images in parallel, then publishes everything in a gated final stageNetclaw.SkillClientwithUploadSkillIfNotExistsAsyncfor idempotent publishes andUploadSkillWithResourcesAsyncfor resource file supportCLI Commands
publish,publish-all,delete,list,versions,verify,config,api-keyCI/CD
release.ymlreplaces three separate tag-triggered workflowspr_validation.ymlgains CLI trimmed publish dry-run with trim warning checks, smoke tests, shellcheck, and PowerShell syntax lintinginstall-skillserver.sh) and Windows (install-skillserver.ps1)Code Quality
ScannedResource,PublishOptions,ResolvedConfig) arereadonly record structJsonSerializerContextsealedHandleHttpErrorhelper eliminates duplicate catch blocksVerboseLoggingHandlerfor--verboseHTTP loggingTask.WhenAllTest plan
SkillServerClientagainstWebApplicationFactory)--version,--help)shellcheckpasses on install script