[FEATURE] Add option to skip Git LFS when cloning plugin marketplaces
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Problem
When using claude plugin marketplace add with repositories that contain Git LFS tracked files, Claude Code
downloads all LFS objects even though they are typically not needed for the plugin functionality.
For repositories with large LFS files, this makes plugin installation
unnecessarily slow and wastes bandwidth/disk space. The plugin system only needs the .claude-plugin/
directory contents, not large binary files.
Proposed Solution
Add an option to skip LFS when adding marketplaces. This could be:
- A flag on the command:
claude plugin marketplace add --skip-lfs git@gitlab.com:org/repo.git
- A marketplace-level setting in settings.json:
{
"plugins": {
"skipLfs": true
}
}
- Default behavior: Since plugins typically don't need LFS files, consider making GIT_LFS_SKIP_SMUDGE=1 the
default for marketplace clones.
Alternative Solutions
## Current Workaround
Users can work around this by setting the GIT_LFS_SKIP_SMUDGE=1 environment variable before running Claude
Code, either in their shell or via ~/.claude/settings.json:
```
{
"env": {
"GIT_LFS_SKIP_SMUDGE": "1"
}
}
However, this is not discoverable and affects all git operations globally when set in the shell.
### Priority
Medium - Would be very helpful
### Feature Category
CLI commands and flags
### Use Case Example
1. User has a marketplace in monorepo with many LFS files
2. Only the plugin related files are installed with marketplace add and plugin install.
### Additional Context
## Environment
- Claude Code version: 2.1.12
- OS: macOS
## Additional Context
Claude Code already uses --depth 1 for shallow clones, which suggests optimization is already a
consideration. Skipping LFS would be a natural extension of this optimization.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗