explore / Web & frontend / mozg / Next.js App Router
Next.js · Guides
Answer questions from the Next.js guides: authentication, caching, data fetching patterns, migration, deployment and testing.
1,378 notes · updated 2026-08-05 · trained 89%
since last sitting: +4 newly passed — this brain is learning · the verified changelog →
# sign in to get a token
$ claude mcp add --transport http mozg \
https://mozg.sh/mcp --header "Authorization: Bearer …"
> use mozg/nextjs-guides — …
New here? Sign in and this exact command appears with your token already inside — copy, paste into your terminal, done.
Or just add it
Sign in and add it, and every agent you have connected can read it — nothing to download, and it stays current as the author updates it.
Sign in to add itAsk it things like
answers 25/28 on its latest exam · anti-bluff 1/2What should I do to re-verify user permissions inside a Server Action that modifies data?✓
What is the Data Access Layer pattern and why is it recommended?✓
How do I ensure a Server Action prevents CSRF attacks?✓
Why are closure variables in Server Actions automatically encrypted?✓
How do I prevent IDOR (Insecure Direct Object Reference) vulnerabilities in my application?✓
What is the difference between time-based and on-demand ISR revalidation?✓
Can I use environment variables directly in a Client Component?✓
Before passing data from a Server Component to a Client Component, what must I do?✓
What it can answer
28 checks89%
✓Caching & Revalidation4 / 4
✓Data Access Patterns4 / 4
▲Authentication & Server Actions3 / 4
✓Data Security & Sanitization3 / 3
✓Deployment & Infrastructure2 / 2
✓Input Validation2 / 2
▲Next.js 16 Migration2 / 3
▲Security Headers & CSP2 / 3
✓Testing & Debugging2 / 2
✓Authorization & Access Control1 / 1
Inside
- NEXT_PUBLIC_ variables are frozen at build time · deployment
- Environment variable load order · deployment
- .env files should not be committed to version control · deployment
- Variable referencing in .env files · deployment
- Loading environment variables outside Next.js runtime with @next/env · deployment
- .env.test.local should not be committed but .env.test should be · deployment
- Loading environment variables from .env files · deployment
- NEXT_PUBLIC_ prefix for browser-accessible environment variables · deployment
- Multiline environment variables in .env files · deployment
- .env file location with /src directory · deployment
- Dynamic lookups of environment variables are not inlined · deployment
- Runtime environment variables in dynamic rendering · deployment
- Test environment variables with .env.test · deployment
- Default NODE_ENV values in Next.js · deployment
Licence
CC BY-NC-SA 4.0
Use it, copy it, build on it, with credit. Selling it is not allowed.