/jamie-superpowers:cache-aware-dispatchfrom jamie-superpowers
Use before sending follow-up work (fixes, review findings, questions) to an existing subagent, before switching models, and before long waits - decides between resuming an agent and dispatching a fresh one based on prompt-cache age and context size
Ships in jamie-superpowers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Every turn of an agent re-sends its whole context. While the prompt cache is warm, that context is billed at the cheap cache-read rate. Once the cache expires, the whole context is written again at the cache-write rate. For a large context the difference is 20–80× per turn, depending on the model.
A real case: review fixes were routed back to the original author agent after it had been idle for more than an hour with ~400K tokens of context. That single habit consumed about a third of a weekly quota.
Core principle: an agent's context is an asset only while its cache is warm. After that it is a liability; a fresh agent with a tight brief is cheaper and usually just as good.
Before sending anything to an existing agent, run "${CLAUDE_PLUGIN_ROOT}/scripts/jsp-agents" check <id>.
| Situation | Do |
|---|---|
Warm (last activity < cacheResumeMinutes, default 45) AND the task is hard AND it needs the agent's full context | Resume the agent |
| Warm, but the fix is narrow and the diff/findings explain it | Fresh agent (cheaper model) with the brief |
| Cold | Fresh agent. Always. |
| Several narrow fixes from several review rounds | Batch them: hold briefly, then one fresh Sonnet (Haiku for uniform multi-file edits) gets all of them in one brief |
A fresh-agent brief contains: the goal in one line, file paths (not pasted contents), the findings verbatim, the diff or review-package path, constraints, and the report contract. Not the session history.
Track every dispatched agent so cache age is known, not guessed:
jsp-agents log <id> <model> <short description>jsp-agents touch <id>jsp-agents done <id>jsp-agents list shows open agents and marks COLD ones. Mention long-idle agents to the user./compact while the cache is still warm, so the next turn re-reads a small context.| Thought | Reality |
|---|---|
| "It wrote the code, it knows it best" | If cold, you pay to re-read everything it knows. Fresh + diff. |
| "Just one small fix, send it back" | Small fixes are exactly what fresh cheap agents are for. |
| "Switch to the big model for this one question" | Subagent with that model, not /model. |
| "I'll dispatch each review finding as it arrives" | Batch narrow fixes. |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (thongpham95/jamie-superpowers) — no native marketplace selected
npx claudepluginhub p/thongpham95-jamie-superpowers22 skills in this plugin
/batch-cleanupUse after every release, after any worktree/branch is merged, once a change looks stable, after a batch of parallel agents, after a deploy, when free disk drops below ~10 GB, or before pausing a session - removes finished worktrees, merged branches, regenerable build output, the project's unused container images/volumes and temp files, and reports space freed/brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./ci-watchUse after every push or merge to a branch with CI, and whenever the user reports CI failure emails or red checks - follows the run to completion, collects the COMPLETE list of failures, classifies them, and fixes root causes so they do not recur/context-keeperUse throughout long sessions, when the context meter passes 50%, before long waits, and whenever about to read large files or logs - keeps the main context lean, saves state before compaction, and tells the user when to compact/deploy-changelogUse right after any deploy or release (beta channel, store submission, staging, production, backend functions) - posts a formatted changelog with emoji in the chat and appends it to the deploy log/diagnosing-jamie-superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.