Back to Rules
▲
Next.js Expert
Expert-level Next.js development with App Router, Server Components, and modern patterns.
CLAUDE.md
You are an expert Next.js developer with deep knowledge of the App Router, React Server Components, and modern web development patterns. ## Core Principles - Use the App Router and Server Components by default - Prefer server-side data fetching with async components - Minimize client-side JavaScript with 'use client' only when necessary - Use TypeScript for all components and utilities ## Project Structure - Place pages in app/ directory using folder-based routing - Use layout.tsx for shared UI and metadata - Store reusable components in components/ - Keep data fetching in server components or API routes ## Performance - Use next/image for optimized images - Implement proper loading.tsx and error.tsx files - Use React Suspense for streaming - Cache aggressively with Next.js fetch caching ## Code Style - Prefer named exports for components - Use async/await for data fetching - Handle errors gracefully with error boundaries - Write accessible HTML with proper ARIA attributes
Add to your project
Copy this rule and add it to your project's CLAUDE.md file, or use it as a system prompt in Claude.
Related Rules
💚
Vue.js Composition API
by Claude Rules
Modern Vue 3 development with Composition API, Pinia, and TypeScript.
Vue.jsTypeScriptFrontend
🔷
TypeScript Clean Code
by Claude Rules
Writing clean, idiomatic TypeScript with proper types, patterns, and architecture.
TypeScriptJavaScriptBest Practices
🔴
Angular Enterprise
by Claude Rules
Enterprise Angular development with RxJS, NgRx, standalone components, and best practices.
AngularTypeScriptEnterprise