We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Monster skill jumpscare: claude-api
Claude Fable spent $4* to tell me that a long background job might cost me $4 in expired cache.
I was refining a testing skill with Fable in one Claude Code session, and exercising it with Opus in another. I asked what would happen if the other agent's background job took a long time to return.
Fable:
This is a caching-mechanics question โ let me check the claude-api reference rather than answer from memory.
To paraphrase the eventual response: it would cost about $4 for the one cold turn of 200k tokens, if the agent were to wait, idle, longer than the cache TTL of one hour. Fable assumed Fable prices; the agent in question was actually an Opus. Also, it's all subscription usage, so dollars here are a proxy for something unknowable. About the answer I'd expected, I suppose. For what it's worth, the Claude Code docs agree on one hour as the default cache TTL on subscription usage.
But the context bar on my Fable chat had jumped, on that one question, from somewhere around 10% full to 29%. Now a new question had my attention: What's the 290k token context in this session composed of?
Fable:
The bulk of it is one thing: the claude-api skill payload that loaded last turn. My rules require loading that skill before answering any Claude pricing/caching question, and it injects its entire bundled reference โ the full model-migration guide, the whole managed-agents documentation suite (~15 files), prompt-caching, tool-use concepts, the TypeScript SDK docs โ as a single block. That block is on the order of 180โ200k tokens by itself.
That just spawns more questions. The most pressing:
How is there such a thing as a 200k-token skill?
Reassuringly, there isn't; not by design, anyway.
The claude-api skill is documented as using progressive disclosure. It has a SKILL.md containing some quick references and a Reading Guide section, plus a tree of documents built for selective loading.
But the version I loaded is bundled into Claude Code.
Fable peeked into the Claude Code binary, and informed me that invoking the bundled skill extracts a language-specific folder of markdown files, plus a shared/ folder, to files on disk, from where they can be read selectively.
The hitch is that it does that in a single manoeuvre that bungs the entirety of the above into the current session's context. For my TypeScript project, that's about 550kB.
That's a plausible "how." I'm sure there's a story behind "why".
I could have satisfied my curiosity more cheaply by checking for bug reports, at the expense of missing out on the spectacle of Claude Code opening up its own binary guts to look for answers.
Here's one from the end of May, still open as of writing: [BUG] /claude-api bundled skill saturates context unconditionally โ ~77% spike from neutral question #63566.
Whoops: [Bug] claude-api skill consumes entire context window on Haiku model #79463
Was claude-api even the right skill?
Should Fable have loaded the claude-api skill for me, running Claude Code on subscription usage?
Fable suggested that the right path would have been to invoke a claude-code-guide subagent instead, which would have used the WebFetch and/or WebSearch tools to find the appropriate docs.
According to its documentation, the claude-api skill is relevant when you're "building applications on" the Anthropic Messages API or Claude Managed Agents (beta). The title inside SKILL.md is Building LLM-Powered Applications with Claude.
The documented activation conditions match up with that picture:
Automatic activation occurs when:
- Your code imports an Anthropic SDK (
anthropicfor Python,@anthropic-ai/sdkfor TypeScript/JavaScript) - You ask Claude to help build, debug, or optimize something with the Claude API, an Anthropic SDK, or Managed Agents
- You add, modify, or tune a Claude feature in a file (prompt caching, adaptive thinking, compaction, tool use, batch, files, citations, memory) or a model reference
So...no?
The actual trigger text on claude-api has a strong gravitational pull, though. Here's the first part of the skill description:
Reference for the Claude API / Anthropic SDK โ model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration.
TRIGGER โ read BEFORE opening the target file; don't skip because it "looks like a one-liner" โ whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) โ never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens).
...
I did ask about caching!
I suspect the Managed Agents feature blurred the line between building with Claude and building on Claude. I'm still not sure if the intention now matches the docs or the actual trigger text better, though.
I don't know if Claude Code CLI has always swallowed this skill whole; and I don't know why it does now. It seems I could find out the first answer by getting Fable to reverse-engineer old binaries. I could probably get Fable to fix it! Or else discover why it hasn't been fixed. What a time to be alive.
It's interesting that despite these two quirks having collided at least two months ago, not that many people are complaining. I didn't hit it until a couple of days ago. I have some hypotheses! But it's time to let this go. (I did add my report via /bug in CC.)