Claude Code Plugin: Your Local Marketplace Playbook
Ready to supercharge your Claude Code with custom plugins? This guide walks you through setting up a local plugin marketplace, installing your first plugin, and smoothing out your development workflow. Let's get our hands dirty!
Before We Dive In
Make sure you've got the Claude Code CLI installed and configured. If you haven't done that yet, head over to the official docs and get that sorted — it's the only boring step, I promise.
Building Your Local Plugin Hub
First, let's carve out the directory structure for your marketplace. Think of this as setting up the workshop before you start building your tools.
mkdir -p /Users/growthacker/.claude/plugins/.claude-pluginWith the shed built, it's time to create the manifest file that tells Claude what's available. This goes right inside that hidden .claude-plugin directory:
{
"name": "my-local-marketplace",
"owner": {
"name": "Your Name"
},
"plugins": [
{
"name": "rubot",
"source": "./rubot",
"description": "Your awesome rubot plugin"
}
]
}Save this as marketplace.json in /Users/growthacker/.claude/plugins/.claude-plugin/marketplace.json.
Adding & Installing Your First Plugin
With the manifest in place, it's time to tell Claude about your shiny new marketplace and install a plugin. Run these commands inside your Claude Code session:
/plugin marketplace add /Users/growthacker/.claude/plugins
/plugin install rubot@my-local-marketplaceinfo Heads Up!
Make sure your plugin folder contains a .claude-plugin/plugin.json manifest file, or this won't work!
Keeping Your Plugins Fresh
So you've made some changes to your plugin code. You've got options on how to push those updates. Pick your favorite:
Option 1: The Classic Restart
Simply restart Claude Code to pick up the changes. It's tried and tested. If you're using --plugin-dir during development, this is your go-to move for a quick sanity check.
Option 2: The Marketplace Update
If your plugin is installed from a marketplace, run this:
/plugin update rubot@my-local-marketplaceOption 3: Hit the Refresh Button
Updated the plugin source? Refresh the marketplace itself to force a re-sync:
/plugin marketplace update my-local-marketplaceDevelopment Workflow: Fast & Furious
For active plugin development, load your plugin directly using the --plugin-dir flag. It's the quickest way to test changes without the overhead of a full marketplace install:
claude --plugin-dir /Users/growthacker/.claude/plugins/rubotJust remember, you'll need to restart Claude Code each time you tweak the code. Think of it as a quick sanity check before pushing live.
Here's a visual map of the plugin development lifecycle:
flowchart TD
A[Create Plugin Skeleton] --> B[Add .claude-plugin/plugin.json]
B --> C[Add Plugin to Marketplace Manifest]
C --> D[Install Plugin in Claude Code]
D --> E[Develop & Tweak Plugin Code]
E --> F[Restart Claude Code to Test]
F --> G{Works as Expected?}
G -- No --> E
G -- Yes --> H[Share / Publish Plugin]
Troubleshooting Common Hiccups
Some things don't always go as planned. Here's how to fix the most common issues.
My updates aren't showing up!
Clear the plugin cache and try again. This forces Claude to rebuild its local index of your plugins.
I want to start completely fresh with a plugin.
Sometimes a clean install works wonders. Uninstall and reinstall in one go:
My cache feels stale or corrupted.
Re-sync the plugin cache to keep everything fresh without blowing it away entirely.
I've got a broken plugin that's blocking everything.
Remove it temporarily, then reload Claude with your working plugin:
Quick Reference Cheatsheet
Keep this table handy for all your plugin management needs.
| Command | What it Does |
|---|---|
| /plugin marketplace add <path> | Add a local marketplace |
| /plugin install <name>@<marketplace> | Install a plugin |
| /plugin uninstall <name>@<marketplace> | Uninstall a plugin |
| /plugin update <name>@<marketplace> | Update a plugin |
| /plugin marketplace update <name> | Refresh marketplace to pick up changes |
| claude plugins sync | Sync the plugin cache |
| claude --plugin-dir <path> | Load plugin directly for development |
Ready for More?
You've conquered the local marketplace and have your development workflow dialed in. What's next on your plugin journey?
- Dig deeper into the Claude Code Docs for advanced plugin features and API references.
- Set a shell alias to streamline your dev workflow with
--plugin-dir. - Polish up your plugin and publish it for the community!