check-cache

check-cache is a command for Claude Code from pruthvinathJV/nextjs-claude-code-kit. It costs 0 tokens per session (617 once invoked), scanned A, original, MIT.

A command that reviews caching choices in Next.js 15, a web framework version with different default data-fetching behavior.

In plain words
What is it for?
Use it to inspect fetch settings, revalidation, and cache invalidation in Next.js 15 projects.
Why use it?
It identifies data that may be unnecessarily uncached, cached too long, or left stale after changes.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to inspect fetch settings, revalidation, and cache invalidation in Next.js 15 projects.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/pruthvinathjv/nextjs-claude-code-kit/check-cache
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.

Clone the repo
git clone --depth 1 https://github.com/pruthvinathJV/nextjs-claude-code-kit

Made for: Claude Code.

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 check-cache

README.md
[![agentmods](https://agentmods.dev/badge/commands/pruthvinathjv/nextjs-claude-code-kit/check-cache/github.svg)](https://agentmods.dev/commands/pruthvinathjv/nextjs-claude-code-kit/check-cache)
Your own site
<a href="https://agentmods.dev/commands/pruthvinathjv/nextjs-claude-code-kit/check-cache"><img src="https://agentmods.dev/badge/commands/pruthvinathjv/nextjs-claude-code-kit/check-cache/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.

agentmods 80×15 button for check-cache

Your own site · 80×15
<a href="https://agentmods.dev/commands/pruthvinathjv/nextjs-claude-code-kit/check-cache"><img src="https://agentmods.dev/badge/commands/pruthvinathjv/nextjs-claude-code-kit/check-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 617 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.00617
Opus 5.5 $0.00000 $0.00247
Sonnet 5.5 $0.00000 $0.00123
Haiku 4.5 $0.00000 $0.00062

Measured 1mo ago against content hash 0706ced1e693, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

check-cache 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 1mo 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.

commands/check-cache.md · 50 lines

What it actually says

Audit caching configuration in $ARGUMENTS for Next.js 15 correctness.

This project uses Next.js 15, where the default fetch cache behavior is no-store (no cache). Pre-Next.js 15 defaults (force-cache) are incorrect unless explicitly intentional.

Scan for these patterns:

  1. fetch calls without explicit cache option

    • In Next.js 15 these default to no-store, which is correct
    • Flag if the data looks like it should be cached (static content, rarely-changing data)
    • Suggest adding { next: { revalidate: N } } if appropriate
  2. { cache: 'force-cache' } usage

    • Flag every instance — this was the pre-15 default but is now an explicit choice
    • Verify it's intentional: is this data truly static and safe to cache indefinitely?
    • If not, replace with { next: { revalidate: N } } with an appropriate revalidation period
  3. export const revalidate at segment level

    • Check the value is intentional and matches the data freshness requirements
    • Flag export const revalidate = false (cache forever) — usually too aggressive
  4. Missing revalidatePath or revalidateTag after mutations

    • Check Server Actions that mutate data
    • If no revalidation call exists after a write, the UI may show stale data indefinitely
    • Suggest appropriate revalidation based on what was mutated
  5. export const dynamic = 'force-static' with dynamic data

    • Flag if the route fetches user-specific or frequently-changing data while forced static
  6. GET Route Handlers without explicit caching config

    • In Next.js 15, GET Route Handlers are no longer cached by default
    • If a Route Handler returns data that should be cached (e.g., a product list, static config), flag the missing export const dynamic = 'force-static' or export const revalidate = N
    • Do NOT flag handlers that return dynamic/user-specific data — uncached is correct there

Output format: For each file with caching issues:

app/products/page.tsx
  Line 12: fetch('/api/products', { cache: 'force-cache' })
  ⚠️  force-cache is now explicit in Next.js 15. Is this data truly static?
  Suggestion: { next: { revalidate: 3600 } } if it changes hourly, or keep force-cache if truly static

app/actions/updateCart.ts  
  Line 8: await db.cart.update(...)
  ❌ No revalidatePath() call after mutation
  Suggestion: Add revalidatePath('/cart') after the update

End with a caching strategy summary: how many routes are uncached, how many are force-cached, how many use time-based revalidation, and whether the overall strategy looks coherent.

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. 1mo ago First seen · 50 lines · 0 tokens per session scan A 0706ced1e693

Subscribe to this mod's changes

check-cache is a command published in the GitHub repository pruthvinathJV/nextjs-claude-code-kit (2 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 617 tokens. 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.