Next.js Overview and App Router
Pack:
nextjsSource:nextjs/nextjs-overview-and-app-router/SKILL.mdUse this skill when the task is primarily about choosing the right Next.js starting path, understanding App Router structure, or deciding which Next.js surface owns the work.
- App Router docs topology and pack routing
- installation and starter decisions
- core file conventions like
app/,layout.tsx,page.tsx, and route groups - high-level Server Components vs Client Components framing
- version and upgrade awareness
Routing cues
Section titled “Routing cues”- install Next.js, create a new app, choose App Router, understand file conventions, or decide where a Next.js task belongs -> use this skill
fetch, caching, revalidation,use cache,unstable_cache,revalidateTag, orrevalidatePath-> usenextjs-data-fetching-and-cacheuse server, Server Actions, Route Handlers, form actions, cookies, redirects after mutations, or backend mutation flow -> usenextjs-server-actions-and-route-handlers- metadata, OG images,
generateMetadata, JSON-LD,robots.txt, orsitemap.xml-> usenextjs-metadata-seo-and-file-conventions - rendering mode selection, streaming, runtime boundaries,
runtime = 'edge', or legacy middleware / newproxy.tswork -> usenextjs-rendering-runtime-and-middleware
Default path
Section titled “Default path”- Read references/docs-map-and-starting-points.md first.
- Treat App Router as the default for new Next.js work.
- Keep the initial setup minimal:
app/, rootlayout.tsx, routepage.tsx, and only the files needed for the current slice. - Default to Server Components and add
'use client'only where browser-only interactivity is actually needed. - Route out quickly once the task becomes mostly about caching, mutations, SEO, or rendering runtime.
When to deviate
Section titled “When to deviate”- Switch to Pages Router guidance only if the repo is already Pages-based or the task explicitly targets Pages APIs.
- Add
'use client'only when state, effects, refs, browser APIs, or client-only hooks are required. - Reach for
proxy.tsor runtime-specific logic only when the task is clearly about request interception or execution boundaries.
Quick example
Section titled “Quick example”npx create-next-app@latest my-appGuardrails
Section titled “Guardrails”- Treat App Router as the default center of gravity for this pack.
- Do not mix Pages Router data APIs like
getServerSidePropsinto App Router guidance. - Server Components are the default; add
'use client'only where browser-only interactivity is actually needed. - Use this skill to orient and route, not to answer deep cache, mutation, or SEO questions by itself.
- building new App Router work around
pages/conventions by habit - putting client components at the top of the tree without a concrete reason
- answering cache, metadata, or server-action questions inside this skill when a sibling skill owns the decision
- turning initial setup into a full architecture rewrite before the actual task is clear
Verification checklist
Section titled “Verification checklist”- the task is confirmed to be App Router work, not Pages Router work
- the advice keeps
app/file conventions intact 'use client'is only added where it is actually needed- no Pages Router data APIs are mixed into the recommendation
- the response clearly routes to a sibling skill if the work is really about cache, actions, SEO, or runtime
Canonical references
Section titled “Canonical references”- https://nextjs.org/docs/app
- https://nextjs.org/docs/app/getting-started/installation
- https://nextjs.org/docs/app/getting-started/project-structure
- https://nextjs.org/docs/app/getting-started/layouts-and-pages
- https://nextjs.org/docs/app/getting-started/linking-and-navigating
- https://nextjs.org/docs/app/getting-started/server-and-client-components
- https://nextjs.org/docs/app/getting-started/upgrading
Current snapshot
Section titled “Current snapshot”- Checked against official docs on 2026-04-03
- Latest App Router docs version in scope: Next.js
16.2.2 - Current npm line verified live on 2026-04-03:
next@16.2.2