01
It starts by itself
data or action change. Runs in GitHub Actions or Claude Code routine.
- ↻ data or action change
pull_request paths: lib/**, app/**
Cache tags and invalidation stay correct.
Install the Next.js Cache Architecture skill and make it a habit: follow https://gethabit.dev/skills/mohamed-hossam1/nextjs-cache-architecture.md
5K installs10 starsMIT licenceSource on GitHub ↗

Next.js Cache Architecture
by mohamed-hossam1 · 5K installs
The skill
Next.js Cache Architecture helps agents design caching in Next.js 16+ App Router: use cache, a tag registry, revalidation utilities, Suspense boundaries, personalized content and migration from unstable_cache.
Only when you ask.
The habit
Cache tags and invalidation stay correct.
↻ Runs by itselfdata or action change
When does it start? How does it check its work? What does it remember?
Stops after one audit and one build per pull request.
Run scripts/audit.mjs on the project root to check the static parts.
Make sure every tag string lives in lib/cache/tags.ts.
Make sure mutations call revalidation utilities and updateTag lives only in lib/cache/revalidate.ts.
Check that use cache is the first statement, personal data is read outside the boundary and filtered pages use SuspenseOnSearchParams.
Run next build and trace any route that turned dynamic unexpectedly.
Write each issue with its file and fix to the log.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the Next.js Cache Architecture skill helps.
updateTag for server actions that need fresh data now; revalidateTag with a second argument for route handlers and webhooks.
No. Read it outside the cache boundary and pass the value as an argument.
Copy the prompt at the top into your agent. It installs the skill from mohamed-hossam1/nextjs-skills and sets up the habit. Or run npx skills add mohamed-hossam1/nextjs-skills --skill nextjs-cache-architecture.
Yes. It is published under MIT. Habit is free too.
Install the Next.js Cache Architecture skill and make it a habit: follow https://gethabit.dev/skills/mohamed-hossam1/nextjs-cache-architecture.md
All mohamed-hossam1 skills →More code skills →
Works in
Made by mohamed-hossam1, published under MIT. Habit links to the original and never changes it. Is this your skill?