[Feature Request] Implement sparse checkout for plugin marketplace repositories to reduce clone size

Resolved 💬 2 comments Opened Feb 25, 2026 by vinta Closed Mar 25, 2026

Bug Description

Summary

When adding a plugin marketplace with claude plugin marketplace add <org>/<repo>, Claude Code clones the entire GitHub repository into ~/.claude/plugins/marketplaces/<repo>/. If the repo contains non-plugin content, all of it gets downloaded even though only the plugin directories matter.

Current behavior

Given a repo structure like:

my-project/
├── .claude-plugin/
│   └── marketplace.json    # pluginRoot: "./plugins"
├── plugins/
│   └── my-plugin/          # 2 MB - the only part users need
├── src/                    # 50 MB of application code
├── docs/                   # 10 MB of documentation
└── assets/                 # 100 MB of images and videos

Running claude plugin marketplace add org/my-project clones everything -- src/, docs/, assets/, all of it -- into ~/.claude/plugins/marketplaces/my-project/.

Expected behavior

marketplace.json already supports metadata.pluginRoot and per-plugin source paths:

{
  "metadata": { "pluginRoot": "./plugins" },
  "plugins": [
    { "name": "my-plugin", "source": "my-plugin" }
  ]
}

Claude Code has enough information to clone only .claude-plugin/ and the declared plugin directories using a two-step git sparse checkout:

# 1. Clone repo structure without file contents, fetch only .claude-plugin/
git clone --filter=blob:none --sparse https://github.com/org/my-project
cd my-project
git sparse-checkout set .claude-plugin

# 2. Parse marketplace.json for pluginRoot and source paths,
#    then expand the checkout to include plugin directories
git sparse-checkout add plugins

This downloads only the plugin-related files. Everything else (src/, docs/, assets/) never hits disk. No schema changes required.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.55
  • Feedback ID: b9943836-d861-4a7a-953f-573af328dbf4

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗