Repository navigation
feat(cli): change package visibility from the CLI - #174
Merged
Merged
Conversation
Add `skillx visibility get|set <@publisher/slug>`. `set` posts the audited compare-and-set to the owner visibility endpoint with the owner's unscoped account key (`--from`, else read first). A key may only narrow; widening is refused by the registry and the hint names the dashboard, as do stale-from, scoped-key and deleted-package refusals. The release list now reports the package `visibility`, which `get` and `set` read. A publish refused with `release.visibility_mismatch` names the next step both in the registry message and in the CLI hint. Refs #172 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FL32rutkqdxB36bmy1tBt2
`skillx visibility set <pkg> <v> --from <v>` returned "already <v>" without asking the registry, so a public package could be reported as private. The CLI now reads the stored value and refuses a mismatch as `visibility_conflict`. The registry's mismatch message names the CLI only for a narrowing, since a widening needs the dashboard, and the unreachable deleted-package hint is gone (that case answers 404). Refs #172 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FL32rutkqdxB36bmy1tBt2
This was referenced Nov 4, 2026
Open
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 #172
What
skillx visibility get <@publisher/slug>andskillx visibility set <@publisher/slug> <public|unlisted|private> [--from] [--registry] [--json].setposts the existing audited compare-and-set (POST /api/v1/packages/@x/y/visibility,{from, to}) with the owner's unscoped account key;fromis--fromor read first. When target equalsfrom, the stored value is confirmed and nothing is written.GET /api/v1/packages/@x/y/releasesnow reportsvisibility(additive; only callers who may already read the list see it, non-public answers stayprivate, no-store).release.visibility_mismatch: the registry message now names the next step (CLI for a narrowing, dashboard for a widening), and the CLI publish error adds ahintwithskillx visibility set …and<registry>/dashboard.visibility.approval_required→ dashboard URL,visibility_conflict→ re-read withget, 401 → use an unscoped account key.Security policy unchanged: an API key may only narrow; widening still needs a signed-in, approved dashboard session (server decides).
Evidence
pnpm typecheck— all 4 packages pass.pnpm test— 158 files, 2896 passed, 3 skipped.apps/web/tests/creator/cli-visibility-roundtrip.test.tsruns the CLI'srunVisibilityGet/Setagainst the real list loader and owner visibility handler (in-process D1): narrowing public→unlisted→private is audited, widening is refused with the dashboard hint and writes nothing, stale--from, publish keys and other accounts are refused.pnpm --filter skillx-sh buildthennode packages/cli/bin/skillx.js visibility --helplistsgetandset.--fromequal to target trusted without a read) fixed in the second commit; dead deleted-package hint removed; mismatch message made direction-aware.Docs
docs/cli-reference.md(new section, publish flag text),docs/api-reference.md(list response, owner management),packages/cli/README.md,CLAUDE.md.Generated by Claude Code