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 leejpsd/nextjs-cache-handler --skill nextjs-redis-cachegit clone --depth 1 https://github.com/leejpsd/nextjs-cache-handlerWrote 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/leejpsd/nextjs-cache-handler/nextjs-redis-cache)<a href="https://agentmods.dev/skills/leejpsd/nextjs-cache-handler/nextjs-redis-cache"><img src="https://agentmods.dev/badge/skills/leejpsd/nextjs-cache-handler/nextjs-redis-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.
<a href="https://agentmods.dev/skills/leejpsd/nextjs-cache-handler/nextjs-redis-cache"><img src="https://agentmods.dev/badge/skills/leejpsd/nextjs-cache-handler/nextjs-redis-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00119 | $0.02946 |
| Opus 5.5 | $0.00048 | $0.01178 |
| Sonnet 5.5 | $0.00024 | $0.00589 |
| Haiku 4.5 | $0.00012 | $0.00295 |
Grade A, and why
nextjs-redis-cache scanned grade A with 1 finding 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 today.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **ISR round-trip**: `curl -D- <url>` twice → `x-nextjs-cache: MISS` then `HIT`; How it starts
The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Next.js Redis Cache Handler
@leejpsd/nextjs-cache-handler is a Redis cache handler for self-hosted
Next.js 15/16. It is the only Redis-backed package shipping BOTH handler
interfaces: cacheHandler (ISR / Pages Router / fetch cache) and
cacheHandlers ('use cache', cacheComponents: true).
Do NOT use it on Vercel-hosted apps — Vercel provides its own managed cache. The target is multi-instance self-hosting: ECS/Fargate, Kubernetes, VMs behind a load balancer.
Version rule: always install >= 0.3.3. Earlier 0.3.x have an incomplete soft-invalidation path (issue #1).
1. Which handler(s) — decision table
| Next.js version | cacheHandler (ISR) |
cacheHandlers ('use cache') |
|---|---|---|
| 15.x | ✅ use it | ❌ does not exist in Next 15 |
| >= 16.1.5 | ✅ use it | ✅ use it (cacheComponents: true) |
| < 15 | ❌ unsupported (peer next >=15.0.0 <17) |
❌ |
Detect the version from the app's package.json (dependencies.next).
Install: npm i @leejpsd/nextjs-cache-handler plus ONE client:
redis (node-redis v5) or ioredis (required for Cluster/Sentinel).
2. Wiring recipe (exact files)
Create TWO CommonJS wrapper files in the project root (Next's
require.resolve needs CJS):
// cache-components.cjs (Next 16 only)
const { createCacheComponentsHandler } = require("@leejpsd/nextjs-cache-handler/cache-components");
module.exports = createCacheComponentsHandler({
client: { type: "redis", url: process.env.REDIS_URL },
buildNamespace: () => process.env.DEPLOYMENT_VERSION,
});
// cache-incremental.cjs (Next 15 and 16)
const { createIncrementalCacheHandler } = require("@leejpsd/nextjs-cache-handler/incremental");
module.exports = createIncrementalCacheHandler({
client: { type: "redis", url: process.env.REDIS_URL },
buildNamespace: () => process.env.DEPLOYMENT_VERSION,
});
// next.config.ts — the four load-bearing keys
const nextConfig = {
cacheComponents: true, // Next 16 only
cacheHandler: require.resolve("./cache-incremental.cjs"),
cacheHandlers: { default: require.resolve("./cache-components.cjs") }, // Next 16 only
cacheMaxMemorySize: 0, // optional: Next keeps no ISR memory cache with a custom cacheHandler; this only sizes the built-in 'use cache' store
};
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.
- today Changed 2dcb0ea3b9d6
- 9d ago Changed 14703e1b85b4
- 14d ago Changed · +1 lines f38127262ac4
- 19d ago Changed · +10 lines 7b5ef311862e
- 3mo ago First seen · 183 lines · 119 tokens per session scan A d4d7a5f59d6a
nextjs-redis-cache is a skill published in the GitHub repository leejpsd/nextjs-cache-handler (7 stars, last pushed today), licensed MIT. It adds 119 tokens to every session and 2,946 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
nextjs-redis-cache compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| nextjs-redis-cacheleejpsd/nextjs-cache-handler | Skill | 7 | today | MIT | A | 119 | Claude Code, Codex |
| Cache Strategy Consistency Guards977043/river-review | Skill | 8 | yesterday | MIT | A | 29 | Claude Code |
| trigger-convextriggerdotdev/trigger.dev | Skill | 17k | today | Apache-2.0 | A | 93 | Claude Code, Codex |
| redisericrisco/rsc-harness | Skill | 701 | yesterday | MIT | A | 111 | Claude Code, Codex |
| using-redis-token-bucketsPostHog/posthog-foss | Skill | 736 | today | MIT | A | 148 | Claude Code, Codex |
| using-redis-token-bucketsPostHog/posthog | Skill | 41k | today | none | A | 148 | Claude Code, Codex |
| background-job-orchestratorcuriositech/some_claude_skills | Skill | 284 | 6d ago | MIT | A | 95 | Claude Code |