durable-cache
Skill2 starsChanged 7 days agoMITView on GitHub
Design, change, or diagnose caches and rebuildable derived state. Use for process, shared-store, persistent, materialized, computation, build, and shared HTTP response caches; invalidation, consistency, rebuilds, or cache stampedes. Do not use for ordinary database persistence with no reusable derived state.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-artifactSkill
- agent-discoverySkill
- agent-run-supervisionSkill
- api-contract-migrationSkill
- changelog-updateSkill
- change-reviewSkill
- ci-reviewSkill
- claims-auditSkill
- dependency-auditSkill
- derivation-auditSkill
- engineering-auditSkill
- infer-conventionsSkill
- operational-signal-intakeSkill
- planned-releaseSkill
- preferred-stackSkill
- pressure-benchmarkingSkill
- public-surface-reconSkill
- rfc-processSkill
- security-auditSkill
- session-reviewSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Read references/cache-kinds.md when choosing whether a store is a soft cache, persistent cache, materialized view, computation cache, or …
- Distinctive: line 35
Write: commit the primary change before readers observe it.
- Distinctive: line 36
Delete: propagate tombstones or equivalent deletion state long enough for lagging consumers and full rebuilds.
- Distinctive: line 46
delete process and local cache state, then rebuild from the named durable source.
- Distinctive: line 50
read immediately after a write under the promised consistency mode.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Durable cache
Establish what is authoritative, what is derived, and what may disappear before choosing a cache pattern or implementation.
Quick reference
inventory state -> classify retention -> bind identity -> choose consistency -> connect writes -> bound failure -> validateRead references/cache-kinds.md when choosing whether a store is a soft cache, persistent cache, materialized view, computation cache, or durable serving store. Read references/http-response-cache.md when a browser, proxy, gateway, or CDN may reuse an HTTP response.
Establish the contract
- Name the authoritative state, every derived copy, and every layer that may answer a read.
- State whether each entry may be lost, evicted, recomputed, or rebuilt. If the only accepted copy cannot be lost, treat that store as durable state rather than relying on cache semantics.
- Name the rebuild source, cursor or generation, permitted data loss, recovery-time target, and source-load ceiling.
- Name the required read contract: bounded staleness, monotonic reads, read-after-write, read-your-writes, or a version fence. Do not use a TTL as an unnamed consistency guarantee.
- Name the expensive unit the cache avoids and estimate repeated use per effective key and location within the freshness window.
Design the lifecycle
- Identity: include every input that changes the result or who may receive it. Version keys when schema, encoding, permissions, or behavior changes. Do not expose secrets or personal data in observable keys.
- Fill: a miss remains correct. Collapse or bound concurrent misses, reject results older than the current version or generation, and do not run business side effects from speculative fills.
- Write: commit the primary change before readers observe it. Record update or invalidation intent with that commit when losing the intent would violate the promised freshness. Consumers process committed changes idempotently and preserve required ordering.
- Delete: propagate tombstones or equivalent deletion state long enough for lagging consumers and full rebuilds. A restored backup must not recreate data deleted after that backup without replaying the deletion.
- Refresh: distinguish expiry, validation, refresh-ahead, explicit invalidation, and full rebuild. Expiry does not promise retention or proactive refresh.
- Capacity: bound admission, entry size, total bytes, retention, fan-out, retries, and rebuild concurrency. Decide which entries may be evicted and how the source survives a cold cache.
- Isolation: bind tenant, permission, representation, and other visibility differences to the key or bypass sharing. A cache hit must not skip a control required for every request.
- Observability: measure hits, misses, stale or rejected fills, invalidation and rebuild lag, evictions, hot keys, source amplification, stored bytes, and recovery progress. Hit ratio alone does not establish correctness or value.
Validate
Exercise the contract at the boundary that actually serves reads:
- delete process and local cache state, then rebuild from the named durable source;
- race a slow fill with a newer write or invalidation;
- issue concurrent misses for one hot key and observe bounded source work;
- change every key dimension and confirm a distinct result or deliberate bypass;
- read immediately after a write under the promised consistency mode;
- replay duplicate, delayed, reordered, and deletion events;
- exhaust capacity and confirm eviction or rejection does not lose authoritative data;
- interrupt rebuild and resume from the committed cursor;
- measure cold and warm latency, source calls, bytes, and recovery time against named budgets.
Record provider-specific retention, persistence, replication, and purge behavior from current effective configuration. Product names and defaults are evidence for one deployment, not a portable cache contract.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

