dev-nextjs

Guides Next.js App Router development with TypeScript, React Server Components, and Tailwind conventions.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/Choi-Keith/skill-arsenal-ultra --skill dev-nextjs-choi-keith
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-nextjs
Source: https://github.com/Choi-Keith/skill-arsenal-ultra/tree/main/plugins/dev-skills/dev-frontend/skills/dev-nextjs
Command: npx skills add https://github.com/Choi-Keith/skill-arsenal-ultra --skill dev-nextjs-choi-keith

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents often generate Next.js code that mixes outdated Pages Router patterns, misuses client components, or ignores caching and data-fetching best practices. This Skill encodes expert conventions for Next.js App Router, TypeScript, React Server Components, Shadcn UI, Radix UI, and Tailwind so generated code follows current standards. ## Core Features & Use Cases - App Router Architecture: Enforces correct route structure with page.tsx, layout.tsx, loading.tsx, error.tsx, route handlers, route groups, and colocated private components. - Server/Client Component Discipline: Defaults to React Server Components, restricts 'use client' to interactive leaf components, and forbids importing server components into client files. - Data Fetching & Mutations: Prescribes explicit fetch cache strategies, revalidateTag/revalidatePath, Server Actions with zod validation, and URL state via nuqs. - Use Case: Ask the agent to build a dashboard page with filters and pagination; it will produce a server component that fetches data with explicit caching, shareable URL search params, Suspense streaming, and Shadcn UI styled with Tailwind tokens. ## Quick Start Use the dev-nextjs skill to scaffold a Next.js App Router page with server-side data fetching, a Server Action form, and Shadcn UI components.

Frequently Asked Questions about dev-nextjs

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

FAQPage Schema
How do I structure routes in Next.js App Router?

Each route segment is a folder under app/ containing page.tsx, with optional layout.tsx, loading.tsx, error.tsx, and not-found.tsx files. Use route groups like (group) to scope layouts without changing URLs, and colocate private components in underscore-prefixed folders.

When should I use 'use client' in Next.js?

Add 'use client' only to leaf components that need interactivity or browser Web APIs. Keep data fetching in server components, pass data down via props, and never import a server component into a client component file.

How do I fetch and cache data in Next.js server components?

Use fetch directly in server components with an explicit cache strategy: cache: 'force-cache', cache: 'no-store', or next: { revalidate: n }. For mutations, use Server Actions and call revalidateTag or revalidatePath so changes appear immediately.

Can I use Shadcn UI with Tailwind in Next.js?

Yes. Shadcn UI components are copied into your project under components/ui/, so you customize those copies directly rather than wrapping them. Compose Radix primitives for behavior and accessibility, and style with Tailwind using cn() for conditional classes.

Why should I avoid useEffect for initial data fetching in Next.js?

Fetching initial page data in useEffect causes client-side waterfalls and loses server rendering benefits. Fetch in server components instead, and reserve client-side fetching with SWR or TanStack Query for user-triggered interactions.