nextjs-app-development

Build Next.js applications with App Router, Pages Router, and TypeScript.

4|Updated Feb 16, 2017
One-click install
npx skills add https://github.com/nekorush14/dotfiles --skill nextjs-app-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-app-development
Source: https://github.com/nekorush14/dotfiles/tree/main/configs/claude/skills/nextjs-app-development
Command: npx skills add https://github.com/nekorush14/dotfiles --skill nextjs-app-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides building Next.js applications using App Router and Pages Router, covering server components, data fetching, routing, and API routes.

Core Features & Use Cases

  • App Router & Pages Router: Server Components, Client Components, and routing patterns.
  • Data Fetching Strategies: SSR, SSG, and ISR for performance and SEO.
  • Server Actions: Mutations with server-side logic and revalidation.
  • API Routes & Route Handlers: Backend endpoints integrated with frontend.

Quick Start

Create pages and routes under app/ or pages/, add server components and actions, and run the dev server.

Frequently Asked Questions about nextjs-app-development

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

FAQPage Schema
How do I build a Next.js app with App Router and Server Components?

App Router enables server-first rendering with Server Components by default. Create pages under the app/ directory, use Server Components for data fetching and logic, add Client Components with 'use client' where interactivity is needed, and leverage Server Actions for mutations. This architecture reduces client-side JavaScript and improves performance.

What's the difference between SSR, SSG, and ISR in Next.js?

SSR (Server-Side Rendering) generates pages on request, SSG (Static Generation) builds pages at build time for fast delivery, and ISR (Incremental Static Regeneration) revalidates static pages on demand without full rebuilds. Choose based on content frequency: SSG for static content, ISR for occasionally-updated data, SSR for dynamic user-specific pages.

How do I handle dynamic routing and parameters in Next.js App Router?

Use bracket notation in file names—app/posts/[id]/page.tsx—to create dynamic segments. Access params via typed props in Server Components; Next.js passes params and searchParams as strongly-typed objects. This enables clean URLs and SEO-friendly routing without manual query parsing.

Can I use Server Actions for form submissions and data mutations?

Yes, Server Actions let you define server-side functions directly in Server Components or separate files, then call them from forms or Client Components. They handle mutations securely on the server, support revalidation to update cached data, and eliminate the need for separate API routes for simple backend operations.

What's the best way to integrate API routes with Next.js frontend components?

App Router uses Route Handlers (app/api/route.ts) as the modern approach to create backend endpoints. Server Components can fetch from Route Handlers or external APIs directly, while Client Components use fetch() or libraries. This keeps API logic colocated with your frontend and supports TypeScript end-to-end.

Do I need to migrate from Pages Router to App Router?

No, both routers work simultaneously in the same project during migration. App Router is the recommended approach for new projects; Pages Router remains supported for existing apps. Gradual adoption lets you adopt App Router features incrementally without rewriting your entire codebase.