context-caching

context-caching is a skill for Claude Code from SoliEstre/EstreGenesis. It costs 104 tokens per session (1,456 once invoked), scanned A, original, Apache-2.0.

A set of rules for keeping frequently reused conversation context easy for the AI agent to reuse during a session.

In plain words
What is it for?
Use it to choose a caching mode, check cache status, keep session settings stable, and manage context at session boundaries.
Why use it?
It helps reduce unnecessary repeated processing and keeps the working context organized when the agent explores or abandons different paths.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the superscalar plugin — 5 skills shipped together

Install

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.

agentmods
npx agentmods add skills/soliestre/estregenesis/context-caching
Any agent
npx skills add SoliEstre/EstreGenesis --skill context-caching
Clone the repo
git clone --depth 1 https://github.com/SoliEstre/EstreGenesis

Made for: Claude Code.

Or install superscalar, the plugin that ships this one along with the rest of its 5 skills.

Wrote 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.

agentmods badge for context-caching

README.md
[![agentmods](https://agentmods.dev/badge/skills/soliestre/estregenesis/context-caching.svg)](https://agentmods.dev/skills/soliestre/estregenesis/context-caching)
Your own site
<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>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash bcca919884d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

plugins/superscalar/skills/context-caching/SKILL.md · 46 lines

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|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 shrinkage is expected, not a defect.

2. self mode — the in-session discipline

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.

Read the full file on GitHub · 46 lines

Changes

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.

  1. 6d ago First seen · 46 lines · 104 tokens per session scan A bcca919884d1

Subscribe to this mod's changes

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.

Related

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…

mostlyharmless-ai/watercooler · 203 tokens

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…

mostlyharmless-ai/watercooler · 79 tokens

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?".

mostlyharmless-ai/watercooler · 41 tokens

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.

wcgomes/agents-workspace · 30 tokens

agent-v3-memory-specialist

Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist.

ruvnet/ruflo · 25 tokens

agent-memory-coordinator

Agent skill for memory-coordinator - invoke with $agent-memory-coordinator.

ruvnet/ruflo · 19 tokens