nextjs-frontend-guidelines

Define frontend guidelines for Next.js 15 projects with React 19 and TypeScript.

51|39|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/chacha95/claude-code-harness --skill nextjs-frontend-guidelines
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-frontend-guidelines
Source: https://github.com/chacha95/claude-code-harness/tree/main/.claude/skills/nextjs-frontend-guidelines
Command: npx skills add https://github.com/chacha95/claude-code-harness --skill nextjs-frontend-guidelines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide provides a unified set of frontend guidelines for Next.js 15 projects, helping teams apply modern patterns consistently and reduce cognitive overhead when starting new frontend work.

Core Features & Use Cases

  • Component Patterns: Server Components by default with Client Components where interactivity is required.
  • Data Fetching & Routing: Server Components data fetching, App Router routing, Suspense boundaries, and API route patterns.
  • Styling: MUI v5 styling with sx prop combined with Tailwind CSS 4 utilities for flexible design.
  • Project Organization & Type Safety: Clear file structure, strict TypeScript practices, and import alias usage.
  • Complete Examples: End-to-end examples of server/client components, API routes, and forms.

Quick Start

Start by reading the resources/component-patterns.md to align your components with Server/Client best practices.

Frequently Asked Questions about nextjs-frontend-guidelines

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Next.js App Router projects with Server and Client components?

Structure Next.js App Router projects by using Server Components by default and Client Components only where interactivity is required. This approach enforces server-first patterns, ensuring consistent architecture and optimized performance.

What is the best way to combine MUI v5 and Tailwind CSS 4 in Next.js?

Combine MUI v5 and Tailwind CSS 4 in Next.js by applying MUI's sx prop for complex component styling alongside Tailwind CSS utility classes. This provides flexible design while maintaining consistent styling patterns across the application.

How do I fetch data in Next.js 15 using Server Components?

Fetch data in Next.js 15 directly within Server Components to leverage server-first patterns. Use App Router routing, Suspense boundaries for loading states, and API route patterns to handle data fetching end-to-end.

Does this Next.js guideline enforce strict TypeScript practices and import aliases?

Yes, the Next.js guideline enforces strict TypeScript practices with explicit typings and standardized import alias usage. This ensures clear file structure and type safety across Server and Client components.

When should I use Client Components instead of Server Components in Next.js?

Use Client Components in Next.js instead of Server Components only when user interactivity is required, such as event handlers or state. Server Components should remain the default for data fetching and static rendering.

Can I use Suspense boundaries for API routes in Next.js App Router?

Yes, you can use Suspense boundaries in the Next.js App Router to manage loading states while fetching data in Server Components and handling API route patterns. This ensures smooth user experiences during asynchronous operations.