modern-best-practice-nextjs
Installation
SKILL.md
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
app/for new work - Use nested layouts and route groups to organize sections
- Keep server components as the default; add
'use client'only where needed
Data Fetching & Caching
- Fetch data in React Server Components - AVOID fetching via
useEffect()andfetch() - Use server actions ("Server Functions") for mutations, potentially in conjunction with React Hooks like
useActionState
UI States
- Provide
loading.tsxanderror.tsxfor route-level UX - Use
Suspenseboundaries around async UI
Related skills
More from academind/claude-code-course-resources
bun-first
Describes efficient usage of Bun and Bun APIs instead of Node.js (and its APIs)
1modern-tailwind
Build clean, scalable UIs with Tailwind CSS using modern utilities and variants
1clean-typescript
Write clean, efficient TypeScript code that follows common best practices
1web-security
Enforce web security and avoid security vulnerabilities
1use-modern-browser-apis
Utilize built-in browser APIs (like Popover API, View Transitions etc) instead of building features manually via JavaScript
1modern-accessible-html-jsx
Write clean, modern, and highly accessible HTML & JSX code, using semantically correct elements and attributes
1