Plugin skill cache incomplete — git clone drops random skill directories
Bug Description
When Claude Code downloads plugins from a marketplace, the skills/ directory is sometimes cloned incompletely. Only a subset of skill directories end up in the cache, causing Skill() calls to return Unknown skill for the missing ones. The skill files exist in the source repo but are never written to disk.
Environment
- Claude Code: 2.1.79
- OS: WSL2 (Ubuntu) on Windows, Linux 6.6.87.2-microsoft-standard-WSL2
- Node.js: v22 (via nvm)
- Plugin:
superpowersv5.0.5 (fromsuperpowers-marketplace)
Reproduction
- Install the
superpowersplugin (has 14 skills inskills/directory) - Check the cached skill count:
``bash``
ls ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/skills/ | wc -l
- Expected: 14 skills. Actual: varies (7, 9, 10, or 0 depending on version/install)
Evidence
The plugin was installed from two different marketplaces at different times. The claude-plugins-official source always had all 14 skills. The superpowers-marketplace source had inconsistent counts:
| Cache source | v5.0.1 | v5.0.2 | v5.0.4 | v5.0.5 |
|---|---|---|---|---|
| claude-plugins-official | 14 | 14 | 14 | 14 |
| superpowers-marketplace | 9 | 0 | 10 | 7 |
Skills present on disk at superpowers-marketplace/5.0.5:
finishing-a-development-branch, receiving-code-review, systematic-debugging,
using-git-worktrees, verification-before-completion, writing-plans, writing-skills
Skills missing (exist in source repo, never cloned):
brainstorming, dispatching-parallel-agents, executing-plans,
requesting-code-review, subagent-driven-development, test-driven-development,
using-superpowers
Impact
Skill("superpowers:subagent-driven-development")→Unknown skill- Other skills referenced by registered skills (e.g.,
writing-planstells you to usesubagent-driven-development) fail silently - Users see inconsistent skill availability across sessions
- Workaround: manually copy missing directories from a complete cache
Analysis
The skill registration system itself works correctly — it scans skills/*/SKILL.md and registers everything found. The bug is upstream: the git clone/checkout that populates the plugin cache is dropping directories. The inconsistent counts across versions suggest a race condition, shallow clone depth issue, or sparse checkout misconfiguration in the plugin download mechanism.
Workaround
Copy missing skill directories from a complete cache:
cp -r ~/.claude/plugins/cache/claude-plugins-official/superpowers/5.0.5/skills/{brainstorming,dispatching-parallel-agents,executing-plans,requesting-code-review,subagent-driven-development,test-driven-development,using-superpowers} \
~/.claude/plugins/cache/superpowers-marketplace/superpowers/5.0.5/skills/This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗