After compaction Claude Code keeps only the first 5,000 tokens
The specification recommends keeping the instructions under about 5,000 tokens, because the whole body is loaded when the skill is activated.
In Claude Code there is a harder edge. When a long session runs out of room, Claude Code compacts it into a summary and then re-attaches each skill that was used, but only the first 5,000 tokens of it. Anything after that point is gone for the rest of the session, and the agent carries on without it.
"Instructions (< 5000 tokens recommended): The full SKILL.md body is loaded when the skill is activated"
"Claude Code re-attaches the most recent invocation of each skill after the summary, keeping the first 5,000 tokens of each."
"The 5,000-token budget for SKILL.md is a recommendation, not a hard limit."
"Delivery rules: Claude Code's body cap, … and Codex's ~10K-token cut when the model reads SKILL.md through the shell."
Split detail into files that load on demand
Move detail into reference files that load only when a step needs them. The token count in the report is an estimate: characters divided by four.
| Fails | Passes | |
|---|---|---|
| SKILL.md | about 8,200 tokens | about 2,100 tokens |
| references/models.md | none | loaded only when step 2 needs it |
Skillland's call: Skillland estimates tokens as characters divided by four.
400 of 4462 indexed skills fail this check
This check against the 10 that fire most often in the index:
Run the same check on your own skill in the validator, or from a terminal with the skillland CLI.