◦ Prompt · Cache

Give Your Sub-Agent Team Prompt Caching — From Re-Paying for Every System Prompt to a High Cache-Hit Rate in One Session

Paste this into Claude Code, Cursor, or Aider and it'll audit every place your agent team calls the Anthropic API, find where you're re-sending large system prompts and tool schemas at full price on every sub-agent call, and add cache_control in the right places — the shared tool loop, the main conversation history, and the per-agent one-shots — while catching the silent invalidators (a timestamp in the system prompt, an unstable tool order) that quietly keep your hit rate near zero. Audit first, then fix tier by tier. Each fix ships independently with before/after verification from the usage numbers you already get back.

Jun 15, 2026agentprompt-cachingclaude-apianthropic-sdkcost-optimizationtutorial
◦ 5,692 builders waiting

Want the agent behind these prompts?

These prompts came out of building Trillion. The whole thing is going open-source on GitHub. Drop your email and I'll ping you the moment the repo drops.

I'll send a one-time link to confirm your email. Nothing else.

◦ Next prompt
Give Your AI Agent a Screen It Can Draw On: The On-Demand Widget System Behind Trillion →

Paste this into Claude Code, Cursor, or any coding agent. It walks your agent through building the widget system Trillion uses to put numbers, plans and inboxes on screen while she talks: a small kit of building blocks the page knows how to draw, ready-made widgets the server expands into those blocks, a design system so every card looks like it belongs, widget packs that only appear when the matching app is connected, custom widgets built from the same blocks, tap-to-ask buttons that can never approve anything, and live widgets that refresh themselves while you're looking. It interviews you first about your agent, your users and your apps, then builds one layer at a time, each one something you can see working before the next begins.