context-engineering
Installation
SKILL.md
Context Engineering Skill
How Claude Code's Context Window Works
Claude Code's 200k context window is split across fixed overhead and your conversation:
| Slot | Typical size | Notes |
|---|---|---|
| System prompt | ~2.7k tokens | Fixed |
| System tools | ~16.8k tokens | Fixed — all built-in tools |
| Custom agents | ~1.3k tokens | Per agent file loaded |
| Memory files (CLAUDE.md etc.) | ~7.4k tokens | Grows with your config |
| Skills (metadata) | ~0.5–1k tokens | ~100 tokens per skill description |
| Messages (conversation) | Grows → triggers compaction | Your actual work |
| Autocompact buffer | 33k tokens | Hardcoded — cannot be changed |
Working limit: compaction fires at ~167k tokens (200k minus 33k buffer). When it fires, your precise early context (variable names, exact errors, decisions) gets lossy-summarised.