← ClaudeAtlas

context-cachinglisted

Context-cache discipline — the memory-hierarchy borrowing: keep the prompt-cache prefix stable the way a CPU keeps its working set hot. Three modes (off / self / agent): self applies the discipline in-session (pin model+effort at session head, compact at boundaries, rewind over compact for abandoned paths, account for cache-cold subagents, measure with the cache counters); agent delegates the watching to a resident. Volatile vendor numbers live in cache-registry.json, never in this skill.
SoliEstre/EstreGenesis · ★ 7 · AI & Automation · score 78
Install: claude install-skill SoliEstre/EstreGenesis
# /context-caching — context-cache discipline (memory-hierarchy borrowing) Superscalar borrows processor architecture: superscalar issue (§2), out-of-order execution (§2, §5.3), speculation (§4), tier composition (§5.1). This skill adds the **memory hierarchy**: the prompt cache is the L1 the whole session runs against — reads cost ~0.1× and writes cost 1.25–2×, so the discipline is the same as a CPU's: **keep the working set hot, and know exactly which operations flush it.** Normative spec: `Superscalar.md §5.4`. Volatile facts (vendor multipliers, TTLs, invalidator lists) live in **`plugins/superscalar/cache-registry.json`** — dated, source-anchored, with its own revisit cadence. Never recall a number from memory; read the registry, and treat it as expired when its `revisit.date` has passed. ## 1. Toggle contract - State = one marker file: `.agent/context-caching.json` — `{"mode": "self" | "agent" | "off"}`. Absent ⇒ `off`. No mirrors (§5.1's state-convergence lesson). - `/context-caching self|agent|off` writes it · `/context-caching status` reads it back plus the session's cache counters where available. - **Default OFF** — modern harnesses already automate the substrate (TTL selection, breakpoint placement, prefix ordering). The skill's jurisdiction is only what the harness does NOT do for you: *when* to hit a boundary, *whether* a mutation is worth its flush, and *how* fan-out changes the accounting. What the harness absorbs over time leaves this skill's scope — that