[BUG] claude-api built-in skill overflows 200k context window on first message from empty session
Summary
The claude-api built-in skill loads too much content (~100–150k tokens) when invoked, making it impossible to use on models with a 200k context window (e.g. Sonnet 4.6). On a fresh session with no prior conversation, a simple first message like how to use sonnet 5 triggers the skill, which immediately causes "Context limit reached" before Claude can respond.
Steps to reproduce
- Open Claude Code with a 200k model (e.g. Sonnet 4.6 /
ml-asset:static-model/claude-sonnet-4-6) - Start a fresh session (empty context)
- Send first message:
how to use sonnet 5 - Claude invokes
claude-apiskill - "Context limit reached" — no response generated
Expected behavior
The skill should either:
- Load lazily (detect language/topic first, load only the relevant sub-file)
- Fit within a 200k context window from a fresh session
- Have a lightweight entrypoint that answers without loading the full bundle
Actual behavior
Skill dumps the entire documentation bundle (all language sub-files: python/, typescript/, java/, go/, ruby/, csharp/, php/ + shared docs) into context in one shot, consuming ~100–150k tokens. Combined with fixed session overhead (~50k tokens for system prompt, tool schemas, MCP schemas), this immediately exceeds the 200k limit.
Environment
- Claude Code version: 2.1.197
- Model:
ml-asset:static-model/claude-sonnet-4-6(200k context window) - Platform: macOS
- Reproducible by multiple users independently
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗