nextjs-app-router-fundamentals

Migrate Next.js 13+ projects from Pages Router to App Router.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/henriquemeireles7/zeny-app --skill nextjs-app-router-fundamentals-henriquemeireles7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-app-router-fundamentals
Source: https://github.com/henriquemeireles7/zeny-app/tree/main/.claude/skills/nextjs-app-router
Command: npx skills add https://github.com/henriquemeireles7/zeny-app --skill nextjs-app-router-fundamentals-henriquemeireles7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance for migrating from Next.js Pages Router to App Router (Next.js 13+), covering layouts, routing, metadata, and modern patterns to reduce friction during development and migration.

Core Features & Use Cases

  • Migration guidance from Pages Router to App Router for large projects.
  • Routing patterns including nested layouts, dynamic routes, route groups, and API route handlers.
  • Metadata and SEO strategies compatible with the App Router conventions.
  • Project bootstrapping and best practices for starting new Next.js 13+ apps with App Router.

Quick Start

Start by scaffolding a Next.js project with App Router, create app/layout.tsx and app/page.tsx, then migrate routes, layouts, and metadata following the patterns shown.

Frequently Asked Questions about nextjs-app-router-fundamentals

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

FAQPage Schema
How do I migrate from Next.js Pages Router to App Router?

Next.js App Router requires creating an app/ directory structure with layout.tsx for shared UI, page.tsx for route content, and route.ts for API handlers, replacing the previous Pages Router file conventions.

How do I handle routing and nested layouts in Next.js App Router?

Next.js App Router handles routing and nested layouts by defining layout.tsx and page.tsx files within nested folder structures under the app/ directory, enabling hierarchical UI composition and dynamic route segments.

What is the best way to manage metadata and SEO in Next.js App Router?

The best way to manage metadata and SEO in Next.js App Router is by using the built-in metadata API within layout.tsx and page.tsx files, which replaces the previous Head component and ensures compatible SEO strategies.

Can I use API route handlers with Next.js App Router conventions?

Yes, you can use API route handlers with Next.js App Router by creating route.ts files inside the app/ directory, which define server-side endpoints and replace the traditional pages/api/ structure.

Does migrating a large Next.js codebase to App Router require server components?

Migrating a large Next.js codebase to App Router inherently adopts server components by default, requiring you to understand server and client component boundaries to correctly implement modern routing patterns and layouts.