nextjs

Build and review Next.js frontends with App Router and TypeScript.

3|2|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/muzhicaomingwang/ai-ideas --skill nextjs-muzhicaomingwang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs
Source: https://github.com/muzhicaomingwang/ai-ideas/tree/main/.project/ai/FE/skills/nextjs
Command: npx skills add https://github.com/muzhicaomingwang/ai-ideas --skill nextjs-muzhicaomingwang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes the approach to building scalable Next.js frontends, reducing architectural drift and onboarding time for frontend teams.

Core Features & Use Cases

  • App Router focused structure: layout, pages, and route groups (e.g., app/(dashboard)/..., app/(marketing)/...).
  • Server Components by default with client components only when needed; guidance on props serializability.
  • Data fetching patterns: colocated server fetchers in lib, use fetch with caching semantics, and route-specific loading/error handling (loading.tsx, error.tsx).
  • Forms, validation, and authentication integration: server actions, route handlers, env vars guidelines (NEXT_PUBLIC variables).
  • Quality gates and deployment readiness: linting, type checking, accessibility checks, and safe routing changes.

Quick Start

Initialize a new Next.js App Router project with TypeScript and follow the structure: app/layout.tsx, app/page.tsx, and route groups like app/(dashboard)/... ensure Server Components by default and add 'use client' only where needed.

Frequently Asked Questions about nextjs

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

FAQPage Schema
How do I structure a scalable Next.js App Router project with TypeScript?

A scalable Next.js App Router project uses route groups like app/(dashboard)/... and colocates data fetchers in lib. This structure standardizes layouts, pages, and coding conventions to reduce architectural drift and onboarding time.

When do I use Server Components versus client components in Next.js?

Use Server Components by default for data fetching and rendering, adding 'use client' only when interactivity is required. This approach ensures proper props serializability and keeps your Next.js frontend architecture consistent and performant.

How do I handle data fetching and loading states in Next.js App Router?

Handle data fetching in Next.js by colocating server fetchers in lib with fetch caching semantics. Implement route-specific loading.tsx and error.tsx files to manage UI structure and provide seamless loading and error boundaries.

What is the best way to implement forms and authentication in Next.js?

The best way to implement forms and authentication in Next.js is using server actions and route handlers. Follow environment variable guidelines for NEXT_PUBLIC variables to ensure secure validation and deployment readiness.

Does this Next.js architecture support quality gates for deployment readiness?

Yes, this Next.js architecture enforces quality gates including linting, type checking, and accessibility checks. It ensures safe routing changes and deployment readiness by satisfying strict project structure and coding convention requirements.