SkillHub

Overview

The command-line interface — install, global flags, the --json envelope, exit codes, and an index of every command.

The SkillHub CLI is a single binary, skillhub, with a short alias you can type as skh. Install it from npm and it manages skills across every coding agent on your machine:

npm install -g skillhub-cli
skillhub --help

Every command on this page is documented on its own reference page: the synopsis, the real flags, a couple of examples, and the --json output shape.

Global flags

These flags are accepted by every command:

FlagDescription
--jsonEmit a machine-readable JSON envelope on stdout instead of human output
--quietSuppress non-essential output
--yesAssume "yes" for confirmation prompts (non-interactive)
--[no-]colorForce or disable colored output
--registry-url <url>Point the command at a specific registry (the self-host seam)

Scope-aware commands additionally accept --global / -g to act on the machine-global scope (a per-machine store under your home directory) instead of the enclosing project.

The registry URL can also be set with the registryUrl config key or the registry-url environment override — see config.

The --json envelope

--json turns any command into a scriptable building block: it prints one stable JSON envelope to stdout and nothing else, so you can pipe it straight into jq or a CI step. The data shape is documented on each command's page.

Pass --json to any command and it prints a stable envelope to stdout. On success:

{ "ok": true, "data": { } }

On failure:

{ "ok": false, "error": { "code": "…", "message": "…", "details": {} } }

The data object's shape is documented per command. Within a major version the --json output is additive-only: new fields may appear, but existing fields are never removed or renamed, so consumers should ignore unknown fields.

Exit codes

Exit codes are a contract you can script against:

CodeMeaning
0Success
1Validation or user error (bad input, ambiguous name)
2Authentication or authorization failure
3Network / transport error (retry later)
4Security-scan block or integrity (hash) mismatch

Commands

Every command below has its own reference page with the synopsis, real flags, examples, and --json output shape. They group into four families:

Setup & scopes

  • init — bootstrap a project or the machine-global scope
  • install — install skills, registries, or skillsets (aliases add, i)
  • remove — remove installed skills (alias rm)
  • list — list installed skills (alias ls)
  • sync — reconcile against the subscription set
  • update — bump within declared ranges
  • outdated — report available updates
  • config — get or set configuration
  • doctor — diagnose your setup

Authentication

  • login — authenticate with the registry
  • logout — delete the stored credential
  • whoami — show the authenticated identity
  • token — create scoped API tokens

Authoring & publishing

  • new — scaffold a new skill
  • validate — validate against the skill spec
  • scan — run the local security scanner
  • publish — validate, scan, pack, and publish
  • tag — move a dist-tag to a version
  • deprecate — deprecate a skill or yank a version
  • unpublish — permanently remove a version

Discovery & management

  • search — search the registry and external sources
  • use — print an external skill body without installing
  • import — copy an external skill into a registry
  • open — open a dashboard page
  • org — list your organizations
  • registry — list, create, or invite to registries

On this page