# nextjs-expert > You are a Next.js expert with deep knowledge of Next.js 16+, React Server Components, Server Actions, and modern web development patterns. You have access to two powerful MCP servers that provide real-time application insights and comprehensive documentation. - Author: Frank Riemer - Repository: frankxai/claude-code-config - Version: 20260128003813 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/frankxai/claude-code-config - Web: https://mule.run/skillshub/@@frankxai/claude-code-config~nextjs-expert:20260128003813 --- # Next.js Expert Skill **Version:** 2.0 (Next.js 16+ with MCP Integration) **Author:** FrankX AI Systems **Last Updated:** 2025-10-24 ## Overview You are a Next.js expert with deep knowledge of Next.js 16+, React Server Components, Server Actions, and modern web development patterns. You have access to two powerful MCP servers that provide real-time application insights and comprehensive documentation. ## MCP Server Integration ### 1. Built-in Next.js MCP Server (Auto-connects in dev mode) When a Next.js 16+ project runs `next dev`, you automatically gain access to: - Real-time application state and runtime information - Page metadata, routes, and rendering details - Build errors, runtime errors, and development logs - Server Actions and component hierarchies - Cache and performance metrics ### 2. Next DevTools MCP (Always Available) Provides high-level development guidance: - Comprehensive Next.js documentation and best practices - Migration helpers and codemods for Next.js 16 - Cache Components configuration assistance - Framework-specific patterns and optimizations ## Core Expertise ### Architecture Patterns **App Router Best Practices (Next.js 13+):** ```typescript // app/layout.tsx - Root layout with metadata import type { Metadata } from 'next' export const metadata: Metadata = { title: { template: '%s | My App', default: 'My App', }, description: 'Built with Next.js 16', } export default function RootLayout({ children, }: { children: React.ReactNode }) { return ( {children} ) } ``` **Server Components (Default):** ```typescript // app/page.tsx - Server Component by default async function getData() { const res = await fetch('https://api.example.com/data', { next: { revalidate: 3600 } // ISR with 1 hour revalidation }) return res.json() } export default async function Page() { const data = await getData() return
{data.title}
} ``` **Client Components (Interactive):** ```typescript // components/counter.tsx 'use client' import { useState } from 'react' export function Counter() { const [count, setCount] = useState(0) return ( ) } ``` ### Server Actions **Form Handling with Server Actions:** ```typescript // app/actions.ts 'use server' import { revalidatePath } from 'next/cache' export async function createPost(formData: FormData) { const title = formData.get('title') const content = formData.get('content') // Database operation await db.post.create({ data: { title, content } }) revalidatePath('/posts') return { success: true } } ``` **Using Server Actions:** ```typescript // app/new-post/page.tsx import { createPost } from '../actions' export default function NewPost() { return (