nextjs-expert
Comprehensive Next.js expertise across App Router, server/client boundaries, data and caching patterns, and production operations. Use when building…
от frankxai★ 51 звезда на GitHub
Установить nextjs-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Next.js Expert Skill
Version: 2.1 (Next.js 16+ with MCP Integration) Author: FrankX AI Systems Last Updated: 2026-05-13
Platform baseline (Next.js 16 + Vercel, May 2026)
- Next.js: 16.x (Turbopack is the default build/dev engine; webpack is opt-in only)
- React: 18.3 stable on FrankX; React 19 RSC patterns supported
- Node: 24 LTS by default on Vercel
- Functions: Vercel Fluid Compute (concurrency-aware Node functions) — not legacy Edge/Serverless. Default
maxDuration= 300s for Hobby/Pro. - Config files:
next.config.ts(or.mjs) for framework. Platform config:vercel.tsis the recommended way (typedVercelConfig, env-aware logic, programmatic functions pervercel:knowledge-update2026-02-27).vercel.jsonstill works for simple cases. FrankX currently usesvercel.json+next.config.mjs— migrate tovercel.tswhen you need typed config, dynamic logic, or env-var access at config time. - Caching: "Cache Components" (formerly PPR) is the forward-looking primitive —
cacheComponents: trueat top level ofnext.config, NOT underexperimental.
Next.js 16 gotchas (production-critical)
These bite real builds. Memorize them.
1. Dynamic route params is now a Promise — always
Every dynamic route page, layout, route handler, and generateMetadata receives params as Promise<{...}>. Synchronous access (the Next 15 pattern) builds fine but 404s every request in production.
// BROKEN in Next 16 (compiles, silently 404s)
export default function Page({ params }: { params: { slug: string } }) {
return <div>{params.slug}</div>
}
// CORRECT — async + await
export default async function Page({
params,
}: {
params: Promise<{ slug: string }>
}) {
const { slug } = await params
return <div>{slug}</div>
}
Same rule for generateMetadata, generateStaticParams, route handlers, and searchParams (also a Promise).
2. app/<name>.ts collides with app/<name>/page.tsx under Turbopack
If you have app/sitemap.ts, app/robots.ts, app/manifest.ts, app/icon.ts, etc., do NOT also create app/sitemap/page.tsx — the prod build fails under Turbopack with a route-collision error. next dev masks this; only next build / Vercel surfaces it. Pick distinct names (/sitemap-info/page.tsx).
3. Verify with next build before pushing
Turbopack catches collisions, missing await params, and metadata conflicts only at build time. Dev server is lenient. Always run pnpm build (or npm run build) locally before pushing to main.
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 16+):
// 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 (
<html lang="en">
<body>{children}</body>
</html>
)
}
Server Components (Default):
// 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 <div>{data.title}</div>
}
Client Components (Interactive):
// components/counter.tsx
'use client'
import { useState } from 'react'
export function Counter() {
const [count, setCount] = useState(0)
return (
<button onClick={() => setCount(count + 1)}>
Count: {count}
</button>
)
}
Server Actions
Form Handling with Server Actions:
// 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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл nextjs-expert?
Comprehensive Next.js expertise across App Router, server/client boundaries, data and caching patterns, and production operations. Use when building, debugging, or optimizing a Next.js app, deciding server vs client components, or resolving App Router gotchas.
Как установить скилл nextjs-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nextjs-expert запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…