Repository navigation
feat(opencode): port codevhub skill commands as codev skill - #330
Merged
Merged
Conversation
Adds a `codev skill` command group (search, pull, push, office) ported from the hub CLI so a standalone codev install can manage SkillHub skills without codevhub. - New tier-2 workspace package `packages/codev-skillhub` with the registry client, install policy (.claude/skills + .agents/skills, one store + links, zip-slip and traversal defenses), publish pipeline, resumable office-bundle downloader, and corp-proxy TLS retry — hub argv parsing, Ink UIs, and NDJSON logging not ported. - SSO reuses @codev/gateway (shared ~/.codev-hub/auth.json); gateway gains loadSkillhubCookie(); upload.ts's inline login prompt moved to the shared fork-only cli/cmd/sso-prompt.ts. - Interactive flows rebuilt with @clack/prompts: pull prompts for scope + agents (CoDev Code always included); push previews the archive, confirms (default No), and signs in only after confirming. - 180 package tests ported from the hub's vitest suite, 12 new CLI subprocess tests, help snapshots regenerated; DIVERGENCES.md row for index.ts updated and a CHANGELOG entry added. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
quickbeard
force-pushed
the
feat/skill-commands
branch
from
August 26, 2026 06:38
faec241 to
5dadbb3
Compare
The agent checklist now shows CoDev Code as a real row that is always selected and cannot be unchecked (matching the hub's locked picker row), instead of omitting it with a note in the prompt message. Other agents start unselected. Built on @clack/core's MultiSelectPrompt with clack's default render plus a key subscriber that re-adds codev before each frame, so the row can never be seen unchecked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.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
Ports the
codevhub skillcommand group into the standalone CLI ascodev skill search | pull | push | office, so managing SkillHub skills no longer requires installing the hub CLI. Behavior mirrors the hub exactly — same flags, same error strings, same install layout — with the interactive flows rebuilt in@clack/prompts(the hub used Ink).What's here
packages/codev-skillhub(@codev/skillhub, fork-only, plain async TS like@codev/upload):skillhub.ts— registry client (search/detail/download/upload/metadata/submit/admin-review; cookie-or-Bearer auth, 401 → actionable auth error)skill-dirs.ts/skill-install.ts— the hub's install policy verbatim: one real extraction in the directory covering the most selected agents (.claude/skills/.agents/skills, project or global), the other linked (relative symlink → Windows junction → copy, mechanism reported truthfully), Claude < 2.1.203 forced-copy probe, path-traversal/zip-slip defenses checked before anyrmskill-publish.ts— dir/zip → archive (secret/junk exclusion, 100 MB / 15 000-entry caps) → upload → metadata → submit → optional admin approveoffice.ts+download.ts— resumable ETag/If-Range bundle downloader, Rosetta-aware arch detection, Windows elevated-PowerShell manual handoff, shared~/.codev-hub/officestagingtls.ts/http.ts— corp-proxy fix: on a cert failure, merge the OS trust store once and retrydefaultAgents()re-derived from what's on the machine (PATH binary or config dir) instead of the hub's configure markers~/.codev-hub/auth.jsonvia@codev/gateway(acodevhub loginsigns this CLI in too). Gateway gains one export,loadSkillhubCookie(). The upload command's inline login prompt moved to a shared fork-onlycli/cmd/sso-prompt.tsused by bothcodev uploadandcodev skill push.cli/cmd/skill.ts, fork-only, exported asSkillHubCommand—SkillCommandbelongs tocodev debug skill): yargs owns parsing; hub cross-flag messages preserved verbatim; deliberately no-falias for--force; office maintenance flags stay hidden. Non-TTY without a location flag fails with the hub's "Not a terminal — pass --here, --global, or --dir" guidance. Push confirms (default No) before ever checking auth — cancelling never triggers a login.Tests
packages/codev-skillhub— ported from the hub's vitest suites ontobun:testusing injectable seams (httpApi/execApi/linkApi/detectApi/skillhubApi) instead of module mocks; auth tests use realauth.jsonfixtures underCODEV_TEST_HOMEpackages/opencode/test/cli/skill.test.ts(all offline: flag validation + TTY gating)skill+ 4 subcommands); gateway suite extended forloadSkillhubCookiesearch --json(single clean JSON line),pull --here(store + relative symlink layout, force semantics),office --uninstall --download-only(ETag-tracked script download + manual-run handoff)Bookkeeping
DIVERGENCES.md: updated the existingpackages/opencode/src/index.ts+ help-snapshot row (new files are untracked per policy)CHANGELOG.md: "Skills" entry under Unreleasedcodev skillincodev-landing-page/content/docs/code🤖 Generated with Claude Code