Build Yourself a Claude Code Plugin Marketplace
There’s a lot of ways to configure Claude Code↗ (CC) now. There are custom slash commands↗, skills↗, hooks↗, subagents↗, and mcp servers↗.
I’ve found myself with different permutations of these primitives scattered throughout my projects and wanted a way to organize and share them between machines. CC has a concept of a plugin↗ which wraps the above capabilities in a single consumable artifact. Anthropic enables the distribution of plugins through a marketplace↗, a GitHub repo with specific configuration that can expose plugins to the outside world. I’ve created my own at just-be-dev/ccpm↗ (short for Claude Code Plugin Marketplace, if that wasn’t already clear).
Anthropic also has an official plugin marketplace at anthropics/claude-plugins-official↗. I’m still unclear on why they need to specify it as official when it’s in their repo but I digress.
Consuming plugins from a Marketplace
Before diving into the details of how Marketplaces are constructed, I just wanted to demonstrate how they’re used. I have a plugin called mise in my ccpm repo that has a setup slash command. So if I wanted to use that on a new computer I’d…
- Fire up claude code
- Run
/plugin marketplace add just-be-dev/ccpm - Run
/plugin install mise@just-be.
The mise plugin’s setup command is now available by running /mise:setup in a CC session. Note that it’s namespaced behind the plugin’s name but not the marketplace’s name.
The marketplace add command is fairly basic, it just installs the marketplace from https://github.com/just-be-dev/ccpm. They do offer the ability to auto update a marketplace which will automatically refresh the marketplace’s manifest and update any plugins you have installed from that marketplace. It goes without saying that you should be extremely careful with this given it’s an easy way to give someone overprivileged access to your machine.
The mise@just-be bit of the plugin install looks a little strange. The just-be portion is actually the name of the marketplace (as specified by the marketplace.json in the repo) which won’t necessary match the name of the repo.
Anatomy of a Marketplace
Marketplace repos are comprised of a few things:
- A
.claude-plugin/marketplace.jsonfile that includes basic metadata and a list of the plugins that the marketplace provides. - A collection of plugins in the paths specified by the marketplace.json file.
Anthropic has the marketplace schema↗ documented, but they don’t have an actual json spec published. If you check their official marketplace you’ll see a link to https://anthropic.com/claude-code/marketplace.schema.json↗ in their marketplace.json, but it doesn’t actually exist. I think it’s just a hallucination and there are a few↗ issues↗ open for it, but they haven’t got around to addressing them.
One other odd thing I’ll note is that marketplaces have an optional version field, but so far as I can tell it’s not used anywhere. Anthropic themselves never increment the version field in their marketplace.json, so I assume it’s unlikely to ever be used.
Plugin Structure
Plugins are comprised of its top level config and capabilities.
| Path | Purpose |
|---|---|
| .claude-plugin/ | Contains the plugin.json configuration file |
| commands/ | Slash commands as Markdown files |
| agents/ | Custom agent definitions |
| skills/ | Agent Skills with SKILL.md files |
| hooks/ | Event handlers in hooks.json |
| .mcp.json | MCP server configurations |
| .lsp.json | LSP server configurations for code intelligence |
The plugin.json file contains metadata about the plugin, such as its name, version, and description.
I’m not going to go into each of the specific capabilities of the plugin. If you want to learn more, check out the plugin creation guide↗.
The one thing I will callout is that a plugin’s version field is required and is what CC uses to determine if a plugin needs updates.
Uses for Marketplaces
I’m just starting out, but there are a few things I’m already using marketplaces for.
Configuring Tools in New Projects
I use Mise↗ in essentially all of my projects now. It’s just a tool for managing other tool versions (like node, pnpm, python, uv, etc). I have a very similar setup for every project, but it can change slightly based on the project’s language and needs. Instead of writing a script that programmatically tries to figure out how the mise config needs to be setup, I just have a slash command called setup↗ that has enough context to configure the tooling for the project.
Meta Marketplace Updates
Another fun usage use my meta plugin↗ which helps update the marketplace itself. I have a create plugin↗ command that uses the github CLI to open an issue on the marketplace repo and to invoke @claude which’ll kick off the claude GitHub app. That’ll only work for my user account. It’s a fun (if convoluted) way of being able to add plugins to my marketplace from any claude instance.
Marketplace Maintenance
In my marketplace repo I have a series of scripts to help automate the development process. Here’s the list straight from the README:
detect-changed-plugins.ts- Detect which plugins have changedvalidate-manifests.ts- Validate marketplace.json and plugin.json filesverify-version-updates.ts- Check if plugin versions need to be updatedrequires-version-bump.ts- Validate if a change requires a version bumpbump-plugin-version.ts- Automatically determine and apply version bumps
The validate-manifests script runs the claude plugin validate script I mentioned previously on the marketplace.json file and all the plugin.json files. I have a GitHub action setup to run that in CI just to make sure I don’t accidentally merge something invalid.
Fin
That’s it for now! If you have any questions or feedback, feel free to reach out to me on Twitter @just_be_dev↗ or BlueSky @just-be.dev↗.