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/ai-config
web-security
Enforce web security and avoid security vulnerabilities
114modern-best-practice-react-components
Build clean, modern React components that apply common best practices and avoid common pitfalls like unnecessary state management or useEffect usage
73clean-typescript
Write clean, efficient TypeScript code that follows common best practices
46modern-tailwind
Build clean, scalable UIs with Tailwind CSS using modern utilities and variants
32use-modern-browser-apis
Utilize built-in browser APIs (like Popover API, View Transitions etc) instead of building features manually via JavaScript
28modern-accessible-html-jsx
Write clean, modern, and highly accessible HTML & JSX code, using semantically correct elements and attributes
27