◦ 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
◦ 1,163 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
Run Your Laptop-Only Sub-Agents From the Cloud — Talk to a Remote Brain, Let It Drive Work on Your Local Machine in One Session

Paste this into Claude Code, Cursor, or Aider and it'll walk your agent codebase through letting an always-on cloud agent delegate laptop-only sub-agents (the ones that touch your filesystem, a local CLI, or local credentials and can't run in the cloud) down to your local machine: a durable cross-machine task queue that survives the laptop being asleep, a generic remote-dispatch task kind that runs the real local agent to completion, a cloud proxy tool that looks identical to the local one but enqueues instead of executing, a presence heartbeat so the cloud words its reply honestly, native local UI visibility while the agent runs, and a completion ping back to your phone. Interview first, then build tier by tier. Each tier ships independently with verification.