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 skills add j4flmao/agent-skills --skill cachinggit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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/j4flmao/agent-skills/caching)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/caching"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/caching/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/caching"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/caching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 558 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00139 | $0.05527 |
| Opus 5 | $0.00069 | $0.02763 |
| Sonnet 5 | $0.00028 | $0.01105 |
| Haiku 4.5 | $0.00014 | $0.00553 |
Grade A, and why
backend-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 — 600 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Caching
Purpose
Design consistent, production-grade caching layers. Every cache must follow the same conventions for strategy selection, data flow, invalidation, stampede prevention, TTL management, and monitoring.
Agent Protocol
Trigger
Exact user phrases: "cache", "Redis", "Memcached", "CDN", "cache-aside", "read-through", "write-through", "write-behind", "cache invalidation", "TTL", "cache stampede", "thundering herd", "cache warming", "LRU", "LFU", "cache hit ratio", "cache strategy", "design a caching layer", "add caching".
Input Context
- The data being cached (DB query result, computed value, API response, static asset).
- The read/write ratio.
- The consistency requirement (eventual vs strong).
- The hosting topology (single node, clustered, multi-region).
Output Artifact
Caching strategy specs as text. No file unless requested.
Response Format
Layer: {application | distributed | CDN}
Store: {Redis | Memcached | CDN | in-memory}
Strategy: {cache-aside | read-through | write-through | write-behind}
Key format: {namespace}:{entity}:{id}
TTL: {duration}
Invalidation: {manual | TTL-based | event-driven}
Stampede protection: {yes/no — method}
No preamble. No postamble. No explanations. No filler/hedging/transitions.
Completion Criteria
- Cache strategy selected with justification
- Key naming convention defined with namespaces
- TTL set for every cache entry (no infinite TTL unless immutable data)
- Stale data tolerance documented
- Invalidation strategy defined (TTL and/or event-driven)
- Cache stampede prevention in place for high-traffic keys
- Monitoring plan (hit ratio, latency, memory) defined
Architecture Decision Trees
Cache Layer Selection
What is the primary goal?
├── Reduce latency for hot data (<1ms reads)
│ ├── Single-node app? → In-memory cache (LRU map, async cache)
│ └── Multi-node app? → Distributed cache (Redis cluster)
├── Reduce database load
│ ├── Read-heavy workload (>80% reads)?
│ │ ├── Yes → Cache-aside with distributed cache
│ │ └── No → Write-behind or read-through
│ └── Expensive queries (>100ms)?
│ ├── Yes → Cache result with medium TTL
│ └── No → Simple cache-aside is sufficient
├── Serve static/semi-static content globally
│ ├── Global audience? → CDN (CloudFront, Cloudflare, Fastly)
│ └── Regional audience? → CDN or reverse proxy cache
└── Handle API response caching
├── Public data? → CDN + gateway caching
└── User-specific data? → Private cache (Cache-Control: private)
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/cache-invalidation.md 4.0 KB
- references/cache-monitoring.md 8.2 KB
- references/cache-strategies.md 3.5 KB
- references/cache-testing.md 6.9 KB
- references/caching-advanced.md 4.6 KB
- references/caching-fundamentals.md 2.7 KB
- references/caching-stampede-prevention.md 7.3 KB
- references/cdn-caching.md 4.2 KB
- references/redis-patterns.md 4.5 KB
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 · 600 lines · 139 tokens per session scan A 06bd9d98ba37
backend-caching is a skill published in the GitHub repository j4flmao/agent-skills (22 stars, last pushed 3d ago), licensed MIT. It adds 139 tokens to every session and 5,527 once invoked, about $0.0007 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-09-03.
Other skills, from other repositories
Caching Strategy Advisor
Recommends the right caching layer, TTL strategy, and invalidation approach for any application bottleneck.
opentelemetry
OpenTelemetry observability patterns: traces, metrics, logs, context propagation, OTLP export, Collector pipelines, and troubleshooting.
bunjs-production
Use when deploying Bun.js to production, containerizing with Docker, setting up AWS ECS/Fargate, implementing Redis caching, hardening security, or configuring CI/CD pipelines. See bunjs for basics, bunjs-architecture for patterns.
swr-docs
SWR — React data fetching library with built-in caching, revalidation, pagination, mutation, suspense, and middleware.
system-design-patterns
System design patterns for scalability, reliability, and performance. Use when: (1) designing distributed systems, (2) planning for scale, (3) making architecture decisions, (4) evaluating trade-offs.
system-design
Scalability, availability, and distributed systems design.