Agent skill

Diagnose REST Cache

by strapi-community in strapi-community/plugin-rest-cache

Diagnose why Strapi REST Cache is not caching, is serving stale content, or is caching the wrong thing.

MITAuto-check passedBackend & APIs

Install Diagnose REST Cache

skills CLI
$ npx skills add strapi-community/plugin-rest-cache --skill diagnose-rest-cache -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install strapi-community/plugin-rest-cache diagnose-rest-cache --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/strapi-community/plugin-rest-cache.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/rest-cache-helper/skills/diagnose-rest-cache .claude/skills/diagnose-rest-cache && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diagnose-rest-cache
GitHub stars
155
Token cost
~1.2k tokens
SKILL.md length
575 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Diagnose why Strapi REST Cache is not caching, is serving stale content, or is caching the wrong thing.

  • Works in 4 steps: Is the content type listed in… → Is it a custom route? Those must be… → Turn on strategy.debug: true (or run with → …
  • Responses are not being cached
  • SKILL.md covers Step 1: get the X-Cache header, X-Cache: HITPASS, X-Cache: MISS every time and No X-Cache header at all, plus 5 more sections
  • Calls curl

What it does

Diagnose REST Cache is an agent skill from strapi-community/plugin-rest-cache. Diagnose why Strapi REST Cache is not caching, is serving stale content, or is caching the wrong thing. Use when responses are not being cached, X-Cache shows MISS or HITPASS unexpectedly, content stays stale after an edit, or one user sees another user's data.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Caching. The repository describes itself as: Speed-up HTTP requests with LRU cache. The licence is MIT.

When your agent uses it

  • Responses are not being cached
  • X-Cache shows MISS
  • HITPASS unexpectedly
  • Content stays stale after an edit

Example prompts

  • “/diagnose-rest-cache”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Is the content type listed in strategy.contentTypes? Nothing is cached
  2. Is it a custom route? Those must be listed explicitly, and path must
  3. Turn on strategy.debug: true (or run with
  4. If the admin panel is available, open Settings → REST Cache. The routes

What it can do on your machine

Read from SKILL.md and the folder at commit af0e7d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • strapi-community.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Diagnose REST Cache loads about 1.2k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 575 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from strapi-community/plugin-rest-cache at commit af0e7d8, republished under its MIT licence (© strapi-community). 575 words, ~1,187 tokens.

Download SKILL.mdSave it as .claude/skills/diagnose-rest-cache/SKILL.md (or your agent's skills folder).
name
diagnose-rest-cache
description
Diagnose why Strapi REST Cache is not caching, is serving stale content, or is caching the wrong thing. Use when responses are not being cached, X-Cache shows MISS or HITPASS unexpectedly, content stays stale after an edit, or one user sees another user's data.

Diagnosing REST Cache

Work through this in order. Do not guess at configuration changes before establishing which of the failure modes is happening — they look identical from the outside and have completely different causes.

Step 1: get the X-Cache header

This single header identifies the problem in most cases. It is off by default.

js
// ./config/plugins.js
strategy: {
  enableXCacheHeaders: true,
}

Restart Strapi, then request the failing route twice with curl — not a browser:

bash
curl -sI http://localhost:1337/api/articles | grep -i x-cache
curl -sI http://localhost:1337/api/articles | grep -i x-cache

Then branch on what you see.

X-Cache: HITPASS

The request deliberately bypassed the cache. This is the most common false alarm.

The shipped hitpass skips any request carrying an authorization or cookie header. A browser logged into the admin panel sends a cookie on every request, so testing in a browser tab will always show HITPASS.

X-Cache: MISS every time

The response is being refused. The plugin will not store a response that:

  • is empty, or has a non-2xx status;
  • is a stream (it can only be consumed once);
  • sets a Set-Cookie header — replaying that would hand one caller's session to everybody;
  • says Cache-Control: no-store or private.

Check the response headers of the failing request for Set-Cookie and Cache-Control. A custom middleware or controller setting either of these is the usual cause.

No X-Cache header at all

The route is not cached — the middleware was never attached to it. This is configuration, not runtime.

  1. Is the content type listed in strategy.contentTypes? Nothing is cached until it is named.

  2. Is it a custom route? Those must be listed explicitly, and path must be the path as Strapi registered it, including the API prefix — /api/articles/slug/:slug, not /articles/slug/:slug.

  3. Turn on strategy.debug: true (or run with DEBUG=strapi:plugin-rest-cache). Routes that could not be matched are logged:

    [WARNING] route "[GET] /articles/slug/:slug" not registered in strapi, ignoring...
  4. If the admin panel is available, open Settings → REST Cache. The routes listed per content type are the ones actually resolved. A route missing there did not match.

Show full SKILL.md (222 more words)Show less

Stale content after an edit

Invalidation runs from Strapi's document service, which covers REST, GraphQL, the content manager, Content Releases and any strapi.documents() call.

  • Was the content changed directly in the database? Nothing can observe that. Purge manually.
  • Otherwise check enableDocumentServiceMiddleware is on (it is by default). With it off, the plugin only sees writes arriving on routes it knows about.

Entries expire far too late, or immediately

maxAge is milliseconds. 3600 is 3.6 seconds; 3600000 is one hour. This is the single most common configuration mistake.

One caller sees another caller's data

Stop and treat this as urgent.

It means responses that vary per caller are being cached under a key that does not identify the caller. Either hitpass was disabled without setting keys.useAuth: true, or a route returns per-user data while being treated as public.

Immediate mitigation: re-enable hitpass for that content type, and purge. Then read the authenticated-caching recipe before re-enabling.

Multiple instances behaving inconsistently

The memory provider is per-process. Two Strapi instances have two independent caches, and a purge on one does not reach the other — so one instance serves fresh content and another serves stale. Use the Redis provider. https://strapi-community.github.io/plugin-rest-cache/guide/recipes/multi-instance.html

Still stuck

Collect: plugin/Strapi/Node versions, the provider, the rest-cache config block, the X-Cache value, and the DEBUG=strapi:plugin-rest-cache output. Open an issue with the bug report form: https://github.com/strapi-community/plugin-rest-cache/issues/new/choose

© strapi-community, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/rest-cache-helper/skills/diagnose-rest-cache of strapi-community/plugin-rest-cache.

Open the folder on GitHubat commit af0e7d8

Compare with similar skills

Diagnose REST Cache next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Diagnose REST Cache compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diagnose REST Cache this skillstrapi-community/plugin-rest-cache155—~1.2kAutomated safety check: PassMIT
Stripe Projectsfossasia/eventyay1.7k5 repos~2kAutomated safety check: NotesApache-2.0
FoundatioFoundatioFx/Foundatio2.1k—~3.9kAutomated safety check: PassApache-2.0
Wp Block Themesgambitph/Stackable3513 repos~985Automated safety check: PassGPL-3.0
Wp Performancegambitph/Stackable3513 repos~1.5kAutomated safety check: PassGPL-3.0
Effect Portable Patternsmillionco/expect3.6k—~3.7kAutomated safety check: PassCustom licence

Similar skills

  • Stripe Projects

    fossasia/eventyay

    A skill your agent uses when the user wants to provision infrastructure or third-party services using Stripe Projects.

    1.7k GitHub starsUsed in 5 repos~2k tokens
    Backend & APIsAuto-check: notes
  • Foundatio

    FoundatioFx/Foundatio

    A skill your agent uses when working with Foundatio infrastructure abstractions for .NET -- caching, queuing, messaging, file storage, distributed locking, or background jobs.

    2.1k GitHub stars~3.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Wp Block Themes

    gambitph/Stackable

    A skill your agent uses when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troubleshooting (style…

    351 GitHub starsUsed in 3 repos~985 tokens
    Backend & APIsAuto-check passed
  • Wp Performance

    gambitph/Stackable

    A skill your agent uses when investigating or improving WordPress performance (backend-only agent): profiling and measurement (WP-CLI profile/doctor, Server-Timing, Query Monitor via REST headers)…

    351 GitHub starsUsed in 3 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Effect Portable Patterns

    millionco/expect

    Portable Effect patterns for robust promise execution. An agent skill from millionco/expect.

    3.6k GitHub stars~3.7k tokensUpdated 5 mo ago
    Backend & APIsAuto-check passed
  • FastAPI-Redis SDK Development

    redis/fastapi-redis-sdk

    Official

    Guides development on the fastapi-redis-sdk library itself - its connection lifecycle, dependency-injected caching, and async/sync bridging.

    404 GitHub stars~2.5k tokensUpdated 8 days ago
    Backend & APIsAuto-check: notes

More from strapi-community/plugin-rest-cache

  • Add A Provider

    strapi-community/plugin-rest-cache

    Add a new cache provider package to this repository, or modify an existing one.

    155 GitHub stars~960 tokensUpdated 11 days ago
    Auto-check passed
  • Configure REST Cache

    strapi-community/plugin-rest-cache

    Choose and write a Strapi REST Cache configuration for a specific use case.

    155 GitHub stars~1.1k tokensUpdated 11 days ago
    Auto-check passed
  • Cut A Release

    strapi-community/plugin-rest-cache

    Publish this plugin to npm - a production release, a pre-release, or an experimental build from a branch.

    155 GitHub stars~2.2k tokensUpdated 11 days ago
    Auto-check passed
  • Verify A Change

    strapi-community/plugin-rest-cache

    Verify a change to this plugin before opening a PR. An agent skill from strapi-community/plugin-rest-cache.

    155 GitHub stars~779 tokensUpdated 11 days ago
    Auto-check passed

Categories

Questions about Diagnose REST Cache

What does Diagnose REST Cache do?

Diagnose why Strapi REST Cache is not caching, is serving stale content, or is caching the wrong thing. Diagnose REST Cache is an agent skill from strapi-community/plugin-rest-cache. Diagnose why Strapi REST Cache is not caching, is serving stale content, or is caching the wrong thing.

When should I use Diagnose REST Cache?

Diagnose REST Cache fits situations like: responses are not being cached; X-Cache shows MISS; HITPASS unexpectedly; content stays stale after an edit.

How do I install Diagnose REST Cache in Claude Code?

Run `npx skills add strapi-community/plugin-rest-cache --skill diagnose-rest-cache -a claude-code`. Or copy the skill folder (plugins/rest-cache-helper/skills/diagnose-rest-cache in strapi-community/plugin-rest-cache) into .claude/skills/diagnose-rest-cache in your project. Claude Code loads it when a task matches its description.

How do I install Diagnose REST Cache in Codex?

Run `npx skills add strapi-community/plugin-rest-cache --skill diagnose-rest-cache -a codex`. Or copy the skill folder (plugins/rest-cache-helper/skills/diagnose-rest-cache in strapi-community/plugin-rest-cache) into .agents/skills/diagnose-rest-cache in your project. Codex loads it when a task matches its description.

Can I use Diagnose REST Cache in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add strapi-community/plugin-rest-cache --skill diagnose-rest-cache -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diagnose-rest-cache, .gemini/skills/diagnose-rest-cache, .github/skills/diagnose-rest-cache and .opencode/skills/diagnose-rest-cache in your project.

What does Diagnose REST Cache need to run?

Going by SKILL.md and its folder, Diagnose REST Cache needs the command-line tools its instructions call (curl).

Does Diagnose REST Cache access the network?

SKILL.md names 1 domain. As links in the text: strapi-community.github.io. This is read from the text; nothing was executed.

Is Diagnose REST Cache safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Diagnose REST Cache use?

Diagnose REST Cache is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diagnose REST Cache use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Diagnose REST Cache?

Skills that share tags, products or a category with Diagnose REST Cache: Stripe Projects (fossasia/eventyay, 1.7k stars), Foundatio (FoundatioFx/Foundatio, 2.1k stars), Wp Block Themes (gambitph/Stackable, 351 stars) and Wp Performance (gambitph/Stackable, 351 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diagnose REST Cache?

strapi-community (a GitHub organization) maintains it in strapi-community/plugin-rest-cache, which has 155 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 28, 2026.

Source: strapi-community/plugin-rest-cache on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.