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 mohamed-hossam1/nextjs-skills --skill nextjs-cache-architecturegit clone --depth 1 https://github.com/mohamed-hossam1/nextjs-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/mohamed-hossam1/nextjs-skills/nextjs-cache-architecture)<a href="https://agentmods.dev/skills/mohamed-hossam1/nextjs-skills/nextjs-cache-architecture"><img src="https://agentmods.dev/badge/skills/mohamed-hossam1/nextjs-skills/nextjs-cache-architecture/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/mohamed-hossam1/nextjs-skills/nextjs-cache-architecture"><img src="https://agentmods.dev/badge/skills/mohamed-hossam1/nextjs-skills/nextjs-cache-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
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.00127 | $0.02954 |
| Opus 5 | $0.00063 | $0.01477 |
| Sonnet 5 | $0.00025 | $0.00591 |
| Haiku 4.5 | $0.00013 | $0.00295 |
Grade A, and why
nextjs-cache-architecture 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 11d 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 — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Next.js Cache Architecture
Architect caching in a Next.js 16+ App Router project from day one — not just
dropping "use cache" where it happens to fit, but structuring the tag
registry, revalidation utilities, Suspense boundaries, and mutation wiring so
the cache stays correct as the codebase grows.
How to use this skill
Apply every rule and template below to the user's actual project. Replace
placeholders like [Entity] and [collection] with names from their codebase
before writing any code.
$ARGUMENTS
Where to look next
Most implementations only need this file. Load a reference when the task calls for it.
| If the user is... | Read |
|---|---|
Asking how cache keys are derived, what cacheLife profiles mean, or hitting a "use cache" limitation |
references/core-concepts.md |
| Caching anything that depends on a logged-in user | references/personalized-content.md |
| Reporting stale data, or doing a final review pass | references/debugging-and-checklist.md |
Migrating an existing codebase off unstable_cache |
references/migration-from-unstable-cache.md |
Drop-in templates in assets/ (rename placeholders to match the user's
codebase):
assets/tags.ts→lib/cache/tags.tsassets/revalidate.ts→lib/cache/revalidate.tsassets/SuspenseOnSearchParams.tsx→components/SuspenseOnSearchParams.tsx
The architecture in one breath
A correct cache implementation has three load-bearing pieces. Build all three on day one — adding them later is much harder than getting them right up front.
What ships with it
10 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.
- assets/revalidate.ts 1.4 KB runs code
- assets/SuspenseOnSearchParams.tsx 823 B
- assets/tags.ts 1.4 KB runs code
- evals/evals.json 5.2 KB
- overlay.yaml 2.4 KB
- references/core-concepts.md 4.0 KB
- references/debugging-and-checklist.md 3.4 KB
- references/migration-from-unstable-cache.md 4.9 KB
- references/personalized-content.md 2.3 KB
- scripts/audit.mjs 6.5 KB runs code
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.
- 11d ago First seen · 370 lines · 127 tokens per session scan A f324b456a36c
nextjs-cache-architecture is a skill published in the GitHub repository mohamed-hossam1/nextjs-skills (8 stars, last pushed 3mo ago), licensed MIT. It adds 127 tokens to every session and 2,954 once invoked, about $0.0006 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-08-31.
Other skills, from other repositories
building-agents
Use when building or restructuring an LLM agent — provider adapter, tool calling, structured output, RAG, agent loop, eval gate, cost routing, tracing, MCP server — model-agnostic across OpenAI/Anthropic/Gemini/OSS so a model swap is a config change. NOT vector-store SQL alone (that is postgresdb) or service…
redis-cache-strategy
Redis caching strategy designer and reviewer. ALWAYS use when designing, reviewing, or troubleshooting Redis caching layers — cache pattern selection (cache-aside, write-through, write-behind), TTL strategy, cache stampede/penetration/avalanche prevention, hot key handling, cache-DB consistency, distributed locking…
V3 Memory Unification
Unify 6+ memory systems into AgentDB with HNSW indexing for 150x-12,500x search improvements. Implements ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend).
caching
HybridCache (.NET 9+), output caching, cache-aside pattern, and IMemoryCache — registration, usage, invalidation, and key strategy.
performant-laravel
Strategies for high-performance, scalable Laravel systems (Octane, DB Optimization, Redis, Microservices).
caching-strategy
Implement Redis/Memcached patterns and invalidation strategies.