Caching revalidation
Guardrails, skills, loops, hooks & review agents for database + website builders on Claude Code (Next.js + Supabase).
npx -y skills add m-binimran/dev-pack --skill caching-revalidationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Get Next.js App Router caching right — static vs dynamic rendering, fetch cache, revalidatePath/revalidateTag, and ISR. Use when data is stale, a page won't update, or you're tuning performance vs freshness.
SKILL.md
1.6 KB, as published. Nobody here has run it
caching-revalidation
Next.js caches aggressively by default. Most "my data won't update" bugs are caching, not logic.
Decide freshness per route
- Static (default where possible): marketing/content pages. Fast, cached at the edge.
- ISR: mostly-static with periodic refresh —
export const revalidate = 3600(seconds). - Dynamic: per-request/user data — reads of cookies/headers/
searchParams, orexport const dynamic = 'force-dynamic'.
Invalidate on write
- After a mutation (server action/route handler) that changes displayed data, call
revalidatePath('/path')orrevalidateTag('tag')so caches refresh. Tag fetches you'll need to bust:fetch(url, { next: { tags: ['projects'] } }). - For user-specific/never-cache reads, opt out:
fetch(url, { cache: 'no-store' }).
Common fixes
- "Stale after save" → you mutated but didn't
revalidatePath/Tag. - "User sees another user's data" → a per-user route got statically cached; make it dynamic.
- "Slow every load" → over-using
no-store; cache + revalidate instead.
Output
- Per affected route: static / ISR / dynamic, plus the revalidation call wired to each mutation.
Guardrails
- Never cache per-user/authenticated data at a shared layer.
- Don't blanket
force-dynamicto "fix" caching — target the actual route. - Verify freshness by actually triggering the mutation and reloading (don't assume).