[BUG] Skills from git-installed marketplace plugins resolve to wrong path
Description
When a plugin is installed from a git-based marketplace with a local source path, Claude Code incorrectly resolves skill paths. Skills are looked up in the marketplace cache directory (~/.claude/plugins/marketplaces/) instead of the actual plugin location in the git repository.
Steps to Reproduce
- Install a marketplace from a local git repository:
``bash``
/plugin marketplace add /path/to/git-repo
- Enable a plugin from that marketplace that includes skills:
``bash``
/plugin install plugin-name@marketplace-name
- Try to use a skill from that plugin programmatically (not via the Skill tool)
Expected Behavior
Skills should be resolved relative to the plugin's actual location:
/path/to/git-repo/plugins/plugin-name/skills/skill-name/
Actual Behavior
Skills are resolved relative to the marketplace cache directory:
~/.claude/plugins/marketplaces/marketplace-name/skills/
This results in a "no such file or directory" error when trying to access skill files.
Root Cause
In the Rd6 function (plugin loader for marketplace entries), when A.source is a string (relative path), the code does:
if(typeof A.source==="string"){
let K=Y.statSync(B).isDirectory()?B:a8(B,"..") // B is marketplaceInstallLocation
if(W=a8(K,A.source),!Y.existsSync(W)){
// ERROR
}
}
The problem is that B (marketplaceInstallLocation) points to ~/.claude/plugins/marketplaces/{marketplace-name}/, but for git-installed marketplaces, the actual plugin files are in the git repository directory, not the marketplace cache.
When skills are later resolved:
if(A.skills){
let K=Array.isArray(A.skills)?A.skills:[A.skills], D=[]
for(let H of K){
let z=a8(W,H) // W is the wrong base path
if(Y.existsSync(z))D.push(z)
}
}
The base path W is incorrect because it was constructed relative to the marketplace cache instead of the actual git repository location.
Workaround
Skills eventually work when invoked via the Skill tool because the SKILL.md file header contains the correct base directory path:
Base directory for this skill: /actual/path/to/skill
However, this doesn't help when Claude Code tries to auto-discover skills during plugin initialization.
Environment
- Claude Code Version: 2.0.25
- OS: macOS (Darwin 24.6.0)
- Installation method: Git-based local marketplace
Suggested Fix
The marketplace install location should be used to find the plugin entry metadata, but skill/command/agent paths should be resolved relative to where the plugin actually exists (the git repository location), not the marketplace cache directory.
For git-based marketplaces, the actual plugin source location needs to be tracked separately from the marketplace cache location, and used as the base path for resolving component paths (skills, commands, agents).
Additional Context
This issue affects all git-installed marketplace plugins that define skills in their plugin manifests. Commands and agents likely have the same issue.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗