Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

caching

Skill by zebbern

Caching is a guideline skill for designing, implementing and reviewing cache logic. It covers invalidation, TTL choices, cache keys, cache layers and when not to cache. It is aimed at developers working on APIs or services.

  • Score 87
  • 4.7k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install caching

Built from the published package, never by AI.

git clone --depth 1 https://github.com/zebbern/claude-code-guide /tmp/claude-code-guide && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-guide/skills/caching ~/.claude/skills/caching

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install caching in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The caching skill is a set of guidelines for designing, implementing and reviewing caches. It covers invalidation strategies, TTL values based on data volatility, cache key schemas, and the choice between in-memory, Redis or Memcached, CDN and HTTP cache layers. It also lists cases where data should not be cached, such as user-specific sensitive data in shared caches and error responses.

The guidance is grouped into sections and tagged by priority, from P0-MUST to P2-MAY. The file includes code examples for an in-memory cache with TTL, a Redis stale-while-revalidate helper using ioredis, HTTP Cache-Control headers in Express or Hono, and TanStack Query staleTime and gcTime settings. It is aimed at developers building or reviewing caching logic for an API, service or client app.

Written from the project's SKILL.md and checked against it.

What it can do

  • Invalidation guidanceSets rules for invalidating caches on data changes, preferring event-driven invalidation over time-based expiry.
  • TTL guidelinesMatches TTL length to data volatility, from seconds for real-time data to hours or days for static config.
  • Cache key designDescribes a consistent key format and namespacing to avoid collisions and stale-data bugs.
  • Cache layer selectionCompares in-memory, Redis or Memcached, CDN and HTTP cache headers, and layering memory, Redis and origin.
  • When not to cacheLists data and responses that should not be cached, including sensitive user data and error responses.
  • Code examplesShows an in-memory TTL cache, a Redis stale-while-revalidate helper, HTTP headers and TanStack Query settings.
  • Anti-pattern checklistNames common mistakes such as cache-and-forget, uniform TTL, missing key parameters and cache stampede.

What you need

  • Redis, for the Redis stale-while-revalidate example
  • ioredis package, for the Redis example
  • Express or Hono, for the HTTP header example
  • TanStack Query, for the client-side caching example

Try asking

  • Review my caching code for missing invalidation or stale-data risks
  • Suggest TTL values for product listings, user profiles and config data
  • Design a cache key schema for paginated, localized product queries

Good to know

  • The in-memory example evicts the oldest inserted entry, not the least recently used.
  • The file is guidance and examples, not an installable runtime cache library.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/caching/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md6 KB

Alternatives to caching

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

caching: common questions

What does the caching skill cover?

It covers invalidation, TTL guidelines, cache keys, cache layers and when not to cache. The source also includes code examples for several cache types.

Should error responses be cached?

The source says not to cache error responses. If caching on failure is needed, use a short TTL or skip caching.

How should cache keys be formatted?

The source suggests the format entity:id:variant, such as user:123:profile. It also says to include every query parameter that affects the result.

How do I install caching?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is caching free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is caching safe to use?

It scores 87 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to caching?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

caching Install

Add to stack

Loading.