claudepluginhub
v0.16.0
Published
Install Claude Code components from ClaudePluginHub
Maintainers
Readme
claudepluginhub
Install Claude Code plugins from ClaudePluginHub and GitHub with a single command.
Usage
# GitHub plugin or marketplace
npx claudepluginhub owner/repo
# ClaudePluginHub collection
npx claudepluginhub u/<userId>/<slug>
# ClaudePluginHub plugin by slug
npx claudepluginhub p/<slug>
# Full URL
npx claudepluginhub https://claudepluginhub.com/api/user-plugins/<userId>/<slug>/marketplace.json
# Recommend plugins for the current project
npx claudepluginhub recommend
# Diagnose your Claude Code plugin setup (local, read-only, offline)
npx claudepluginhub doctorIdentifier types
owner/repo (GitHub)
Installs a plugin or marketplace directly from a GitHub repository using Claude Code's native plugin system.
- Marketplace repos (
.claude-plugin/marketplace.json): Adds the marketplace and installs selected plugins viaclaude plugin marketplace addandclaude plugin install. - Plugin repos (with or without
.claude-plugin/plugin.json): Creates a local wrapper marketplace, then installs via Claude Code.
u/<userId>/<slug> (ClaudePluginHub)
Installs from a ClaudePluginHub user-curated collection. Components are downloaded directly and tracked in a lock file.
p/<slug> (ClaudePluginHub)
Installs a single ClaudePluginHub plugin by its site slug via a wrapper marketplace (requires Claude Code).
Full URL
Same as u/ form but with the full marketplace JSON URL.
Commands
npx claudepluginhub <identifier> Install from a source
npx claudepluginhub add <identifier> Same as above
npx claudepluginhub update [identifier] Update (u/ collections only)
npx claudepluginhub list List (u/ collections only)
npx claudepluginhub remove <identifier> Remove
npx claudepluginhub recommend Recommend plugins for the current project
npx claudepluginhub doctor Diagnose the Claude Code plugin setup (read-only)Recommend
Run npx claudepluginhub recommend from a project root to get plugin
recommendations grouped by each detected stack ("For Next.js:", "For
PostgreSQL:", …) — no account, no setup.
npx claudepluginhub recommend # top picks per detected stack
npx claudepluginhub recommend --limit 6 # picks per stack (1-50, default 4)
npx claudepluginhub recommend --json # raw JSON, pipeableDetection reads dependency names from package.json, requirements.txt,
pyproject.toml, Cargo.toml, and go.mod, plus which known config files
exist (e.g. next.config.*, tailwind.config.*). Privacy: only dependency
names and allowlisted config-filename prefixes are sent — never file contents,
never arbitrary filenames.
Doctor
npx claudepluginhub doctor diagnoses the effective Claude Code plugin setup
for the current project — completely locally. It reads claude plugin list
--json (the only installed-plugin source of truth) plus files inside each
plugin's install directory, and reports concrete findings: native load errors,
broken install paths or manifests, duplicate/ambiguous installations, exact
duplicate skill/command/agent content across enabled plugins, broad
unconditional command hooks, missing MCP/LSP prerequisites, missing declared
dependencies, LSP extension conflicts, non-executable bin/ files, and
heuristic context-size estimates. No account or network needed.
npx claudepluginhub doctor # verdict-first report for the current project
npx claudepluginhub doctor --open # detailed HTML report opened in your browser
npx claudepluginhub doctor --verbose # include maintenance details and full inventory
npx claudepluginhub doctor --json # machine-readable (schemaVersion 1)
npx claudepluginhub doctor --strict # warnings also fail (CI)
npx claudepluginhub doctor --scope user # restrict to one scope (user|project|local|all)
npx claudepluginhub doctor --all-projects # analyze other projects' records too, per project
npx claudepluginhub doctor --help # full referenceDefault output leads with a verdict ("No broken plugins found" or "N
issues need attention"), followed by actionable findings, top context
contributors, and coverage notes. Maintenance details (disabled stale caches,
redundant records) are hidden by default — use --verbose to see them. Use
--open to generate a detailed self-contained HTML report and open it in your
browser (writes a temporary file — the only non-read-only action, opt-in).
Default scope behavior. Doctor diagnoses the current directory: user-scope
(and managed) plugins plus project/local plugins whose recorded project path
matches the current directory after resolving symlinks (macOS /private/...
aliases included). Records belonging to other projects are counted but not
analyzed unless --all-projects is passed — and then each project is analyzed
as its own context; plugins that merely coexist in different projects are
never reported as conflicting. Disabled plugins are inventoried but never
count toward active context totals, overlap, or runtime-risk findings. When
several enabled records exist for one plugin and their scans are equivalent
for Doctor's checks, they are treated as one effective plugin; otherwise
Doctor reports the ambiguity instead of guessing.
Severities and exit codes. ERROR = breaks or blocks plugin loading;
WARN = likely problem or notable risk signal; INFO = context. Exit 0 =
no errors (with --strict: no warnings either); exit 1 = completed with
errors (or warnings under --strict); exit 2 = Doctor could not run (bad
arguments, Claude CLI missing, or unusable claude plugin list --json
output). Manifest/component checks are limited structural checks — for
authoritative validation run claude plugin validate <plugin install path>.
Context estimates are heuristics (≈4 characters/token, always marked
~): always-on ≈ each skill/command/agent's name + description (the plugin's
listing text); on-invoke ≈ the component body. claude plugin details is the
authoritative source.
Privacy. Doctor is read-only and offline: it executes nothing (no plugin
code, hooks, MCP/LSP servers, or binaries), modifies nothing, and sends
nothing anywhere. Reports contain no absolute paths, file contents, or
environment/header values; URLs are reduced to their origin and commands to an
executable name, so --json output is safe to share.
// npx claudepluginhub doctor --json | jq '.summary'
{
"errors": 0,
"warnings": 1,
"notes": 2,
"otherProjectRecordsIgnored": 3
}Examples
# Install a specific plugin from a marketplace repo
npx claudepluginhub vercel/next.js --plugin cache-componentsOptions
| Option | Description |
|--------|-------------|
| --plugin <name> | Install a specific plugin from a marketplace repo |
| --yes, -y | Skip prompts (install all, project scope) |
| --scope <scope> | Set scope: user, project (default), local — doctor also accepts all (its default) |
| --limit <n> | recommend only: picks per detected stack (1-50, default 4) |
| --json | recommend / doctor: raw JSON output |
| --strict | doctor only: warnings also fail the run (exit 1) |
| --verbose | doctor only: show maintenance details and full plugin inventory |
| --open | doctor only: generate a detailed HTML report and open in browser |
| --all-projects | doctor only: analyze other projects' records, each per project |
| -h, --help | Show help (doctor --help for the doctor reference) |
Lifecycle differences
| Feature | owner/repo | u/ collections |
|---------|-------------|------------------|
| Install | claude plugin commands | Direct download |
| List | claude plugin list | npx claudepluginhub list |
| Update | claude plugin update | npx claudepluginhub update |
| Remove | npx claudepluginhub remove owner/repo --scope <scope> (standalone) or claude plugin commands (marketplace) | npx claudepluginhub remove |
Standalone wrapper
When installing a standalone plugin via owner/repo, a local wrapper marketplace is created:
| Scope | Wrapper path |
|-------|-------------|
| user | ~/.claude/.cpd-wrappers/<owner>-<repo>-user/ |
| project | .claude/.cpd-wrappers/<owner>-<repo>-project/ |
| local | ~/.claude/.cpd-wrappers/<owner>-<repo>-local-<cwd-hash>/ |
Note: local scope wrappers are stored under ~/.claude/ and are tied to the working directory where they were installed. Running npx claudepluginhub remove owner/repo --scope local for a local install must be done from the same project directory.
Requirements
- Node.js 18+
- Claude Code installed and available in PATH (required for
owner/repoinstalls)
