Learn-skills.dev modern-best-practice-nextjs
Build modern Next.js apps with App Router and best practices
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/academind/ai-config/modern-best-practice-nextjs" ~/.claude/skills/neversight-learn-skills-dev-modern-best-practice-nextjs && rm -rf "$T"
manifest:
data/skills-md/academind/ai-config/modern-best-practice-nextjs/SKILL.mdsource content
Next.js Best Practices (App Router)
Next.js is a library that changes frequently - use web search or context7 MCP (via DocsExplorer agent) for exploring the current documentation.
Routing & Structure
- Use the App Router in
for new workapp/ - Use nested layouts and route groups to organize sections
- Keep server components as the default; add
only where needed'use client'
Data Fetching & Caching
- Fetch data in React Server Components - AVOID fetching via
anduseEffect()fetch() - Use server actions ("Server Functions") for mutations, potentially in conjunction with React Hooks like
useActionState
UI States
- Provide
andloading.tsx
for route-level UXerror.tsx - Use
boundaries around async UISuspense
Metadata & SEO
- Use the Metadata API in layouts and pages
- Prefer static metadata when possible; keep dynamic metadata minimal