fec-nextjs-project-standard
Installation
SKILL.md
Next.js project specifications
For repositories using Next.js 14+ with App Router.
Purpose
Standardize engineering practices for App Router, SSR/SSG/ISR rendering modes, data acquisition, route layout, middleware and SEO metadata in Next.js 14+ projects to ensure server-side priority, performance optimization and maintainability.
Procedure
- First identify whether the target belongs to App Router, layout, server data, middleware, metadata or client interaction.
- Default server-side components take precedence; use
'use client'only when browser API, interactive state or event handling is required. - Clarify SSR / SSG / ISR / CSR rendering mode and Next fetch/cache strategy.
- Complete the server-side boundaries of
loading.tsx,error.tsx,not-found.tsx, metadata and sensitive logic for routing. - Check whether Server Component is supported before introducing third-party libraries; browser-specific, animation, chart, editor and WebGL libraries must be placed into client leaf components and loaded on demand.
- Prioritize evidence review for dynamic rendering, cache invalidation, RSC serialization, route handler, middleware, and first-screen bundles; first collect build, trace, headers, or routing behavior evidence when unsure.
- Client component architecture issues are offloaded to the React project workflow.