Plugin skills load full SKILL.md content at startup, not frontmatter-only
Summary
Claude Code loads the full content of every SKILL.md file at startup, not just the frontmatter. For plugins with many skills, this causes multi-minute cold starts.
Evidence
- Version: v2.1.89 (also reproduced on later versions)
- Plugin: 28 skills, 8,392 lines (~34K tokens total across all SKILL.md files)
- Cold start with skills: 4+ minutes
- Cold start without skills (removed skills/ dir): 3-4 seconds
- All other plugin components are fast: hooks, rules, agents, MCP servers all initialize in <2s
Binary search results
| Skills loaded | Startup time |
|---------------|-------------|
| 0 | 3-4s |
| 3 stubs (~98 lines) | ~5s |
| 5 stubs (~155 lines) | 15-20s |
| 10 stubs (~317 lines) | ~60s |
| 28 stubs (~762 lines) | 4+ min |
Scaling is non-linear per skill count, suggesting per-skill overhead (file discovery, frontmatter parsing, tool schema generation, system prompt injection) rather than pure content size.
Expected behavior
CC should load only the frontmatter (name, description, keywords, allowed-tools) at startup for discovery and routing. The full SKILL.md body should be loaded on invoke — either via lazy loading or the SkillSearch pattern described in #43816.
Workaround
We reduced all 28 skills to 15-line stubs (frontmatter + "Read procedure file" instruction), with full procedure bodies in separate files loaded via Read tool on invoke. This reduced startup context from ~34K to ~3K tokens and brought cold start to acceptable levels.
Related issues
- #43816 — SkillSearch (lazy loading for skills)
- #42906 — Cold cache API calls at startup
- #27721 — Skills registered twice from plugins
- #28660 — Skill catalog re-injected on every tool call
Reproduction
- Create a plugin with 20+ skills (each SKILL.md ~200-400 lines)
claude --plugin-dir ./system- Measure time to first prompt response
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗