claude-api skill injects its entire multi-language reference (~184k tokens) in one message, breaking the session

Resolved 💬 2 comments Opened Jun 28, 2026 by Arthur-Askara Closed Jun 28, 2026

Component: Bundled skill claude-api (skill bundle v2.1.195)
Severity: High — unrecoverable session; /compact cannot run

What happens

When the claude-api skill is invoked, it emits its full bundled reference as a single ~735 KB / ~184,000-token user message. The bundle on disk contains per-language reference dirs (csharp, curl, go, java, php, python, ruby, shared, typescript, ~792 KB total) and all of them appear to be concatenated into that one message rather than loading only the relevant language slice.

Impact

  • That single message alone exceeds the standard context window, forcing a jump to 1M context ("Usage credits required for 1M context").
  • /compact fails ("Prompt is too long") because compaction summarizes across messages but cannot shrink a single atomic message that is itself larger than the compaction window.
  • Net result: the session is dead — it can neither continue nor compact.

Reproduction

  1. Start a session, do a bit of normal work.
  2. Invoke the claude-api skill (in our case it auto-fired on the word "pricing" while discussing app subscription pricing — unrelated to the Claude API).
  3. Observe one user message of ~184k tokens, then 1M-context demand, then /compact → "Prompt is too long".

Evidence

  • One message measured at 734,818 chars.
  • Total conversation otherwise tiny: 21 user / 23 assistant messages, ~1 MB total of which ~75% is that one message.

Suggested fixes

  1. Load only the relevant language slice, not all 9 languages, based on detected project language.
  2. Cap / chunk skill payloads; never emit a single message larger than the compaction window.
  3. Tighten trigger matching so "pricing/models" in an app-monetization context doesn't auto-fire the Claude-API skill.

View original on GitHub ↗

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