Skip to content

fix: use relative path for plugin source to avoid redundant GitHub clone#13

Open
rexlwt wants to merge 1 commit into
microsoft:mainfrom
rexlwt:fix/use-local-plugin-source
Open

fix: use relative path for plugin source to avoid redundant GitHub clone#13
rexlwt wants to merge 1 commit into
microsoft:mainfrom
rexlwt:fix/use-local-plugin-source

Conversation

@rexlwt
Copy link
Copy Markdown

@rexlwt rexlwt commented May 27, 2026

Summary

  • Change plugin source in .claude-plugin/marketplace.json from {"source":"github"} to the relative path "./"
  • Avoids a redundant git clone when the repo is already present as a local marketplace
  • Fixes install failures in environments without GitHub SSH host keys (e.g. fresh WSL installs)

Problem

When a user adds the repo as a local marketplace and runs /plugin install webwright@webwright, Claude Code reads marketplace.json, sees source: github, and attempts to clone from GitHub again — even though the files are already present. This fails without SSH host keys.

Solution

Using "./" as the plugin source tells Claude Code to use the already-present marketplace directory as the plugin root. Works for both local and GitHub marketplace paths.

Test plan

  • Clone locally: git clone https://github.com/microsoft/Webwright /tmp/Webwright
  • /plugin marketplace add /tmp/Webwright
  • /plugin install webwright@webwright — should succeed without network calls
  • Verify /webwright:run is available in a new session

Generated with Claude Code

When a user adds the Webwright repo as a local marketplace
(`/plugin marketplace add /path/to/Webwright`), the plugin source
`{"source":"github","repo":"microsoft/Webwright"}` caused Claude Code
to attempt a second git clone from GitHub, which fails when SSH host
keys are not configured in the environment.

Using `"./"` as the plugin source tells Claude Code to use the already-
present marketplace directory as the plugin root, avoiding any network
request. This also works correctly for the GitHub marketplace path
(where the repo is cloned to cache) since the relative path resolves
to the same cached directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant