Nextjs app router

From HoangNguyen0403/agent-skills-standard · View interactive version

Nextjs app router is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Configure file-system routing with nested layouts, route groups, parallel routes, and error boundaries in Next.js App Router. Use when creating page routes, adding loading/error states, or organizing routes with groups and dynamic segments.

How to use this skill

Skill file

**Priority: P0 (CRITICAL)**

Workflow: Add New Route

  1. Create page — Add app/dashboard/page.tsx as Server Component.
  2. Add layout — Create app/dashboard/layout.tsx returning {children}.
  3. Add loading state — Create app/dashboard/loading.tsx for Suspense boundary.
  4. Add error boundary — Create app/dashboard/error.tsx with 'use client' and reset prop.
  5. Await async APIs — In Next.js 15+, await params, cookies(), headers().

Route Group Example

See implementation examples

Implementation Guidelines

Routing Architecture

Data & Functions

File Conventions

Structure Patterns

Best Practices

Anti-Patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.