Cache economics
API prompt caching gives you a 90% discount on tokens the model has already seen. But this only works if the prefix of your messages does not change between calls. If you inject skill content into the system prompt, the cache breaks every time. Instead, inject skills as tool results instead. They appear later in the message list and preserve the system prompt cache.
Flashcards: Flashcards
Loading practice…
Checkpoint: Subagents and skills checkpoint
Loading practice…
Terminal
bash
# Run the subagents & skills agent
make 05-subagents-and-skills
# Try: "Use the code-review skill to review 03-tool-design/agent.py"
# Try: "Spawn an explore agent to find all TODO comments in this repo"See subagents and skills in action. Try spawning different agent types and loading skill files.