[BUG] The relative paths in source property value in .claude-plugin/marketplace.json are confusing
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The documentation here: https://code.claude.com/docs/en/plugin-marketplaces#plugin-sources
Relative paths
For plugins in the same repository:
{
"name": "my-plugin",
"source": "./plugins/my-plugin"
}
Is very unclear. I simply think it is a bug. Note that marketplace.json is in the subfolder .claude-plugin . So the relative paths should most likely be "../plugins/my-plugin" relative to the marketplace.json file.
What Should Happen?
With the spec like this:
Relative paths
For plugins in the same repository:
{
"name": "my-plugin",
"source": "./plugins/my-plugin"
}
but my plugins being in the parent folder of .claude-plugin, the plugin loading should fail.
Only when I use:
Relative paths
For plugins in the same repository:
{
"name": "my-plugin",
"source": "../plugins/my-plugin"
}
it should work. This is how relative paths are generally resolved. Relative to the file in which they are specified.
What you have is a magical behavior and unexpected. I wasted a lot of time trying to understand why my plugins were not found because I used "../plugins/my-plugin".
NOTE: The leading ../
Error Messages/Logs
Steps to Reproduce
Try using:
Relative paths
For plugins in the same repository:
{
"name": "my-plugin",
"source": "../plugins/my-plugin"
}
in ./claude-plugin/marketplace.json file file.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.50 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
I think the current implementation is a bad UX because of magical behavior.
4 Comments
I don't agree this is a documentation issue. It is a wrong or at minimum non-established-standards design choice. I wasted 20 mins because I applied my brain and used ../
Adding a related dimension to this: the same docs section is also unclear about where
marketplace.jsonitself must live.The docs show
marketplace.jsoninside.claude-plugin/in the walkthrough, but don't prominently state it's required there. The natural instinct — placing it at the repo root — silently fails. The installer simply never finds it.The two confusions compound each other:
marketplace.jsonat the repo root (wrong location)"source": "./developer"— which looks correct from the rootA single warning box near the top of the "Create the marketplace file" section would address both:
And such friction should be avoided in the first place by implementing standard expectation of the user like other cases the way relative paths are implemented.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.