claude-code - 💡(How to fix) Fix [FEATURE] plugins marketplace update should use shallow clone (--depth 1) for faster performance [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46458Fetched 2026-04-11 06:19:46
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Timeline (top)
commented ×2labeled ×2
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

When running claude plugins marketplace update, the CLI performs a full git clone of the marketplace repository. This is slow for larger repositories (e.g., cloning infinity-microsoft/third-eye takes noticeably long during setup).

Proposed Solution

Since the marketplace only needs the latest state of plugin definitions, a shallow clone (git clone --depth 1) would be sufficient and significantly faster. The git history is not needed for reading marketplace.json and plugin files.

Suggested fix: Change the git clone command to use --depth 1 flag.

Alternative Solutions

Alternative 1: Pre-clone marketplace locally

Clone the marketplace repo manually with git clone --depth 1 and configure it as a local directory marketplace instead of a git URL. This works but requires manual maintenance and defeats the purpose of the automatic marketplace update command.

Alternative 2: Use sparse checkout (as proposed in #40864)

Issue #40864 proposes sparse checkout to fetch only plugin subdirectories. This is complementary - --depth 1 (shallow) reduces commit history, while sparse checkout reduces files. Both could be implemented together for maximum performance, but --depth 1 is a simpler, lower-risk change that provides immediate benefit.

Priority

Medium - Would be very helpful

Feature Category

Performance and speed

Use Case Example


Scenario: Setting up a repo that uses external plugin marketplaces

Steps:

  1. Developer runs setup script which calls claude plugins marketplace update <marketplace-name> to refresh an external marketplace
  2. The CLI performs a full git clone of the marketplace repository, downloading the entire git history
  3. Developer waits 30+ seconds watching "Cloning repository..." while only needing the latest marketplace.json and plugin definitions
  4. Setup completes, but the slow clone creates friction for new team members onboarding

With --depth 1:

  • Step 2 would take ~3-5 seconds instead of 30+
  • The marketplace only needs the current state of files, not commit history
  • Faster onboarding, better developer experience

Additional Context

There is a similar issue here https://github.com/anthropics/claude-code/issues/40864 which seems to be about claude plugin install but the current one is complimentary and lower complexity and can reduce clone time with a simple fix.

extent analysis

TL;DR

Change the git clone command to use the --depth 1 flag to significantly reduce the cloning time for larger repositories.

Guidance

  • Implement a shallow clone by adding the --depth 1 flag to the git clone command to reduce the amount of data fetched.
  • Verify the fix by measuring the cloning time before and after the change, using a large repository like infinity-microsoft/third-eye as a test case.
  • Consider combining the --depth 1 flag with sparse checkout (as proposed in #40864) for maximum performance, but prioritize the simpler --depth 1 change for immediate benefit.
  • Test the updated claude plugins marketplace update command with various marketplaces to ensure the fix does not introduce any regressions.

Example

git clone --depth 1 <repository-url>

Replace <repository-url> with the URL of the marketplace repository.

Notes

The proposed fix assumes that the marketplace only needs the latest state of plugin definitions, and the git history is not required. This change should be tested thoroughly to ensure it does not break any existing functionality.

Recommendation

Apply the workaround by changing the git clone command to use the --depth 1 flag, as it provides a simple and low-risk solution to reduce cloning time.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING