Next.js App Router patterns for the server/client boundary, caching, server actions, streaming, and runtimes. Load before any edit in app/ or next.config.*, however small, or for Next.js questions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Next App Router Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-next-app-router-patterns)
---
name: next-app-router-patterns
description: Next.js App Router patterns for the server/client boundary, caching, server actions, streaming, and runtimes. Load before any edit in app/ or next.config.*, however small, or for Next.js questions.
---
# Next.js App Router patterns
Default assumption: Next.js 16.5 with the App Router, per the Next.js blog and upgrade guides.
A row applies when the `next` version in the project's `package.json` and lockfile is at least its version. With `cacheComponents: true` the Cache Components model applies, and with it off the previous caching model. Pages Router projects, with no `app/` directory, are out of scope, and react-patterns applies on top.
## Reference files
Loading this skill isn't enough. Before your next edit, read the file of every row that matches it. The rules live in those files, and this one only points at them.
| Before | Read |
| ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| Writing Next.js code, or raising the `next` version | [reference/upgrades.md](reference/upgrades.md) |
| Writing, changing, or reviewing Next.js code | [reference/anti-patterns.md](reference/anti-patterns.md) |
| Adding `"use client"`, caching or revalidating, streaming, images, fonts, `next/dynamic`, or a `runtime` export | [reference/practices.md](reference/practices.md) |
| Configuring or running ESLint, the type check, `next build`, or a bundle analyzer | [reference/tooling.md](reference/tooling.md) |
| Writing or changing a `"use server"` file or a Server Function | [reference/server-actions.md](reference/server-actions.md) |
| Writing or changing `proxy.ts` or `middleware.ts` | [reference/proxy.md](reference/proxy.md) |
| Writing or changing a `page`, `layout`, `loading`, `error`, `global-error`, `default`, `not-found`, or `route` file | [reference/segment-files.md](reference/segment-files.md) |
| Changing `next.config.ts`, `.js`, or `.mjs` | [reference/next-config.md](reference/next-config.md) |