Documentation: Publishing plugins as npm packages
Resolved 💬 2 comments Opened Mar 21, 2026 by depopry Closed Apr 19, 2026
Summary
The plugin marketplace documentation covers the npm source type for consuming plugins (marketplace.json schema, package, version, registry fields), but there is no publisher-side documentation for how to structure and publish a Claude Code plugin as an npm package.
What exists today
plugin-marketplaces.mddocuments the npm source entry inmarketplace.jsonplugins.mddocuments the plugin directory structure (.claude-plugin/plugin.json,skills/,commands/, etc.)- The installation mechanism is noted as
npm install
What's missing
- Step-by-step guide for publishing a plugin to npm (or a private registry)
package.jsonrequirements — are there any special fields needed (main,exports, a custom key)? Or does the package root just need to be a valid plugin directory?- Example npm-published plugin — even a minimal reference implementation would be very helpful
- Private registry guidance — how to publish to a private npm registry (e.g. AWS CodeArtifact, Artifactory, Verdaccio) for organisations that want to distribute plugins internally without using GitHub
Why this matters
For organisations distributing plugins internally, npm is an attractive option because:
- It decouples plugin distribution from GitHub seat licensing (not everyone who needs Claude Code skills has a GitHub seat)
- Private npm registries (CodeArtifact, Artifactory) are common in enterprise environments
- It provides familiar versioning and dependency management semantics
The git-based source types are well-documented, but they require consumers to have git credentials for the source repo. npm distribution would allow organisations to use their existing package registry infrastructure.
Desired outcome
A dedicated section (or page) in the plugin docs covering:
- How to structure a
package.jsonfor a Claude Code plugin npm package - Any special fields or conventions required
- A minimal working example
- Guidance on private registry configuration for both publishers and consumers
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗