app-router

Teach Next.js App Router patterns and file conventions for complex routes.

3.3k|453|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/davepoon/buildwithclaude --skill app-router-davepoon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: app-router
Source: https://github.com/davepoon/buildwithclaude/tree/main/plugins/nextjs-expert/skills/app-router
Command: npx skills add https://github.com/davepoon/buildwithclaude --skill app-router-davepoon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Next.js App Router introduces complexity in routing, layouts, and data flow; this guide clarifies how to use App Router conventions to build scalable apps with clarity and consistency.

Core Features & Use Cases

  • Understand file conventions for app/router: page.tsx, layout.tsx, loading.tsx, error.tsx, and not-found.tsx.
  • Design complex routing topologies: nested layouts, route groups, parallel routes, and intercepting routes for modals.
  • Apply best practices for data fetching and server components across routes in real-world apps.

Quick Start

Run through a ready-made Next.js app directory to see App Router patterns in action.

Frequently Asked Questions about app-router

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

FAQPage Schema
How do I structure Next.js App Router dynamic routes and nested layouts?

Structure Next.js App Router dynamic routes and nested layouts using file conventions like page.tsx, layout.tsx, and loading.tsx. This approach defines modular routing topologies, managing complex hierarchies and shared UI across multiple route segments.

What's the best way to manage loading and error states across complex route hierarchies?

Manage loading and error states in complex route hierarchies using specialized file conventions. Implement loading.tsx for immediate UI feedback during data fetching and error.tsx to isolate and handle runtime errors within specific route segments.

How do parallel routes and intercepting routes work in Next.js?

Parallel routes render multiple pages simultaneously within a single layout using named slots. Intercepting routes overlay content like modals over the current context, preserving the original route state upon navigation back.

Can I use server components for data fetching across all App Router segments?

Yes, server components are the default for data fetching across App Router segments. Fetch data directly within server components to leverage server-side rendering capabilities and streamline your application's data flow architecture.

When should I use route groups in my Next.js application?

Use route groups in your Next.js application to organize routes logically without affecting the URL path. They allow you to share layouts and routing files across specific segments, keeping your project structure clean and modular.