skillhub/cli
huishi3 3e05be72db test(cli): expand integration test coverage with 63 new test cases
Add comprehensive test coverage across all CLI commands:
- auth-resolution: token/registry priority chain (6 cases)
- multi-registry: credential isolation across registries (4 cases)
- cross-command: end-to-end flows spanning multiple commands (15 cases)
- inventory-resilience: corrupt inventory recovery (3 cases)
- concurrency: parallel install and stale lock handling (3 cases)
- version-upgrade-flow: version pinning and force upgrade (2 cases)
- Expand existing tests for install (+9), search (+10), publish (+5),
  doctor (+5), remove (+3), list (+3), whoami (+2), update (+8)
- Align 5xx exit codes with a14d89d8 refactor (EXIT.generic, not EXIT.network)
2026-05-07 06:39:43 -07:00
..
scripts test(cli): add comprehensive integration tests and fix update command bugs 2026-05-07 14:46:40 +08:00
src refactor(cli): improve doctor command semantics and transparency 2026-05-09 11:30:36 +08:00
test test(cli): expand integration test coverage with 63 new test cases 2026-05-07 06:39:43 -07:00
.env.example feat(cli): add npm publish workflow and update package scope 2026-05-06 16:34:59 +08:00
.eslintrc.cjs feat(cli): add SkillHub CLI v1 with full command suite 2026-04-29 15:37:04 +08:00
bun.lock feat(cli): add SkillHub CLI v1 with full command suite 2026-04-29 15:37:04 +08:00
bunfig.toml feat(cli): add SkillHub CLI v1 with full command suite 2026-04-29 15:37:04 +08:00
LICENSE feat(cli): add npm publish workflow and update package scope 2026-05-06 16:34:59 +08:00
package.json test(cli): add comprehensive integration tests and fix update command bugs 2026-05-07 14:46:40 +08:00
README.md refactor(cli): improve doctor command semantics and transparency 2026-05-09 11:30:36 +08:00
tsconfig.json test(cli): add comprehensive integration tests and fix update command bugs 2026-05-07 14:46:40 +08:00

SkillHub CLI

Manage and install skills for AI coding agents.

SkillHub is an enterprise-grade, self-hosted skill registry that enables teams to discover, share, and install reusable skills for AI coding agents like Claude Code. This CLI provides a seamless interface to interact with SkillHub registries.

📦 Installation

npm install -g @astron-team/skillhub

🚀 Quick Start

Using the default registry

# Login to the default registry
skillhub login

# Search for skills
skillhub search react

# Install a skill
skillhub install @astron-team/react-component-builder

# List installed skills
skillhub list

Using a custom registry

# Login to a custom registry
skillhub login --registry https://skillhub.yourcompany.com

# After login, other commands will use the same registry
skillhub search react
skillhub install @yourorg/custom-skill

You can also set a default custom registry in your shell:

🐧 Linux/macOS (Bash/Zsh):

export SKILLHUB_REGISTRY=https://skillhub.yourcompany.com

🪟 Windows (PowerShell):

$env:SKILLHUB_REGISTRY="https://skillhub.yourcompany.com"

🪟 Windows (CMD):

set SKILLHUB_REGISTRY=https://skillhub.yourcompany.com

📚 Commands

🔐 Authentication

  • skillhub login [--registry <url>] - Authenticate with a SkillHub registry
  • skillhub logout [--registry <url>] - Remove stored credentials

🎯 Skill Management

  • skillhub search <query> - Search for skills in the registry
  • skillhub install <skill-name> - Install a skill to ~/.claude/skills/
  • skillhub uninstall <skill-name> - Remove an installed skill
  • skillhub list - List all installed skills
  • skillhub info <skill-name> - Show detailed information about a skill

🛠️ Utilities

  • skillhub version - Display CLI version
  • skillhub help - Show help information
  • skillhub doctor [--json] - Scan the current project for installed skills and merge findings into the local inventory. Existing entries outside the scan are preserved; conflicts are reported but unrelated records are not deleted.

💡 Examples

Search and install a skill

# Search for React-related skills
skillhub search react

# Install a specific skill
skillhub install @astron-team/react-component-builder

# Verify installation
skillhub list

Manage installed skills

# View details about an installed skill
skillhub info @astron-team/react-component-builder

# Uninstall a skill
skillhub uninstall @astron-team/react-component-builder

Work with custom registries

# Login to your private registry
skillhub login --registry https://skillhub.yourcompany.com

# After login, search and install work automatically
skillhub search internal-tools
skillhub install @yourorg/internal-skill

🌐 Registry

Default registry

By default, the CLI connects to the public SkillHub registry at https://skill.xfyun.cn.

Custom registry

Organizations can deploy their own private SkillHub instance. You can point the CLI to a custom registry:

Per-command (recommended for one-time use):

skillhub login --registry https://skillhub.yourcompany.com

Shell-level default (persistent across commands):

🐧 Linux/macOS:

export SKILLHUB_REGISTRY=https://skillhub.yourcompany.com

🪟 Windows PowerShell:

$env:SKILLHUB_REGISTRY="https://skillhub.yourcompany.com"

🪟 Windows CMD:

set SKILLHUB_REGISTRY=https://skillhub.yourcompany.com

Skill namespaces

Skills are namespaced by organization to prevent naming conflicts:

  • @astron-team/skill-name - Skills from the Astron team
  • @yourorg/skill-name - Skills from your organization

When installing skills, always include the full namespaced name.

📄 License

Apache-2.0

Copyright 2026 iFlytek Co., Ltd.