Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/soliestre/estregenesis/context-cachingnpx skills add SoliEstre/EstreGenesis --skill context-cachinggit clone --depth 1 https://github.com/SoliEstre/EstreGenesisWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/soliestre/estregenesis/context-caching)<a href="https://agentmods.dev/skills/soliestre/estregenesis/context-caching"><img src="https://agentmods.dev/badge/skills/soliestre/estregenesis/context-caching.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00104 | $0.01456 |
| Opus 5 | $0.00052 | $0.00728 |
| Sonnet 5 | $0.00021 | $0.00291 |
| Haiku 4.5 | $0.00010 | $0.00146 |
Grade A, and why
context-caching scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/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|offwrites it ·/context-caching statusreads 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 shrinkage is expected, not a defect.
2. self mode — the in-session discipline
- Pin at the session head. Model and effort are each part of the cache key — switching either mid-session recomputes the entire history. Pick both at the top; a mid-task switch is a paid decision, not a free preference. Need another model for a side question? That is what a subagent is for.
- Boundary discipline. Compaction rebuilds the conversation layer by design — so choose when: at natural task boundaries, not mid-task via auto-compact. To abandon a path, prefer rewinding to an earlier turn over compacting: a rewind returns to a prefix that is already cached; a compact builds a new one.
- Prefetch at the boundary. The OS-prefetch analogy: right after a boundary (post-compact, post-clear), load the context the next task will need — the reads land at the front of the new stable prefix and stay cheap for the rest of the task. The wrong time to do bulk reading is right before a boundary, where it is about to be thrown away.
- Fan-out accounting. A subagent starts cache-cold on its own prefix (and on some harnesses at a shorter TTL), while the parent's cache is untouched. Delegation is therefore cheapest exactly where §5.1 already routes it: self-contained lanes and parallel fan-outs that have forfeited the shared cache anyway. A cache-hot, deep-context single edit loses money on delegation — same rule, cache-side reasoning.
- Know the flush list. Before any mid-session environment mutation — connecting/disconnecting an MCP server, denying a whole tool, toggling a speed mode — check the registry's invalidator list for the current harness. Some flushes happen without you: a server process dying and reconnecting is a flush on harnesses that load tool definitions into the prefix.
- Measure, never declare. Cache health is two counters the API already reports (cache-read vs cache-write tokens). High write turn after turn means the prefix is churning — go find what changed. A claimed hit-rate that nobody read from the counters is a declaration, and declarations are how this repository got burned before.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 46 lines · 104 tokens per session scan A bcca919884d1
context-caching is a skill published in the GitHub repository SoliEstre/EstreGenesis (8 stars, last pushed yesterday), licensed Apache-2.0. It adds 104 tokens to every session and 1,456 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
update-agent-context
This skill should be used to keep CLAUDE.md, AGENTS.md, and the skill files themselves compact, current, and internally consistent. It runs in three phases: Phase 1 performs a one-time structural refactor of CLAUDE.md using a Karpathy-inspired behavioral scaffold and derives AGENTS.md from it by stripping Claude…
watercooler-onboarding
Bootstrap Watercooler memory for a repository by inspecting local code, docs, CI, git history, and existing Watercooler threads, then writing a small set of durable, provenance-backed seed threads that future agents can query and extend. Use when entering a repo for the first time, seeding a repo with Watercooler…
recall
Recall project context or answer questions about history and decisions. Use before starting work, when investigating unfamiliar code, or asking "What was decided about X?" / "Why did we choose Y?".
wiki
Use this skill when querying workspace knowledge before tasks or running mandatory post-review ingest evaluation and conditional wiki ingestion. Self-learning loop for the workspace.
agent-v3-memory-specialist
Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist.
agent-memory-coordinator
Agent skill for memory-coordinator - invoke with $agent-memory-coordinator.