[BUG] Installing one plugin from marketplace.json loads ALL plugins
Description
When installing a specific plugin from a marketplace that has multiple plugins defined in marketplace.json, ALL plugins from that marketplace get loaded, not just the one being installed.
Reproduction Steps
- Install
document-skills@anthropic-agent-skills(contains xlsx, docx, pptx, pdf skills) - Install
example-skills@anthropic-agent-skills(contains algorithmic-art, frontend-design, etc.) - Run
/skillsor check available skills - Observe duplicate skills: both
document-skills:xlsxANDexample-skills:xlsxexist, even thoughxlsxshould only be indocument-skills
Expected Behavior
Only the skills defined in the installed plugin should be registered. Installing document-skills should only register xlsx, docx, pptx, pdf. Installing example-skills should only register the 12 skills it declares.
Actual Behavior
Both installations load ALL plugins from the shared marketplace.json, resulting in:
document-skills:xlsx,document-skills:pdf, etc.example-skills:xlsx,example-skills:pdf, etc. (duplicates!)- Plus
claude-api:*skills from both
Root Cause Analysis
Both plugins reference the same GitHub repo (anthropics/anthropic-agent-skills) and the marketplace.json file contains ALL plugin definitions. When the plugin loader reads marketplace.json, it loads every plugin defined in it, regardless of which specific plugin was installed.
Files involved:
/plugins/cache/anthropic-agent-skills/document-skills/98669c11ca63/.claude-plugin/marketplace.json/plugins/cache/anthropic-agent-skills/example-skills/98669c11ca63/.claude-plugin/marketplace.json
Both marketplace.json files are identical and contain:
{
"plugins": [
{"name": "document-skills", "skills": [...]},
{"name": "example-skills", "skills": [...]},
{"name": "claude-api", "skills": [...]}
]
}
Suggested Fix
The plugin loader should only load the plugin matching the installed plugin name from marketplace.json, not all plugins defined in it.
Environment
- Claude Code: latest
- Platform: macOS
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗