Individual skill
nextjs-ppr-patterns
Next.js 16 App Router pages mixing static and dynamic content — Partial Prerendering (PPR) under the Cache Components model. Covers enabling it with cacheComponents (the removed experimental.ppr / experimental_ppr flags), the dynamic-by-default rendering inversion, the Suspense static-shell/dynamic-hole boundary, the 'use cache' directive (automatic keys, cacheLife/cacheTag, children/action pass-through, runtime values as props, serverless durability), async runtime APIs and connection() for non-determinism, page composition from a single hole to parallel dashboards to streaming a Promise into a Client Component with use(), and forms/wizards with updateTag read-your-writes and Activity state preservation. Triggers on PPR, cacheComponents, 'use cache', Suspense streaming, partial prerendering, or static-shell work even when not named explicitly.
skills/.experimental/nextjs-ppr-patterns/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
- writing Derived category
- engineering Derived category
- engineering-web Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 6,565 bytesSKILL.mdcore · 9,424 bytesSKILL.mdcore · 9,424 bytesassets/templates/_template.mddoc · 1,063 bytesmetadata.jsonasset · 2,159 bytesreferences/_debug-boundaries.mddoc · 9,540 bytesreferences/_sections.mddoc · 3,464 bytesreferences/cache-in-memory-not-durable-serverless.mddoc · 1,187 bytesreferences/cache-keys-are-automatic.mddoc · 1,216 bytesreferences/cache-pass-runtime-values-as-props.mddoc · 2,103 bytesreferences/cache-pass-through-children-and-actions.mddoc · 1,272 bytesreferences/cache-set-lifetime-and-tags.mddoc · 1,154 bytesreferences/cache-use-cache-directive.mddoc · 1,162 bytesreferences/compose-do-not-opt-out-the-shell.mddoc · 1,656 bytesreferences/compose-parallel-holes.mddoc · 1,606 bytesreferences/compose-single-dynamic-hole.mddoc · 1,253 bytesreferences/compose-stream-to-client-with-use.mddoc · 1,713 bytesreferences/mutate-updatetag-vs-revalidatetag.mddoc · 1,588 bytesreferences/mutate-wizard-url-driven-steps.mddoc · 1,760 bytesreferences/runtime-gate-nondeterminism-with-connection.mddoc · 1,179 bytesreferences/runtime-keep-param-routes-static.mddoc · 1,216 bytesreferences/runtime-request-apis-force-a-boundary.mddoc · 1,341 bytesreferences/setup-dynamic-by-default.mddoc · 1,308 bytesreferences/setup-enable-cache-components.mddoc · 1,255 bytesreferences/shell-place-boundaries-low.mddoc · 1,373 bytesreferences/shell-suspense-does-not-force-dynamic.mddoc · 1,448 bytesreferences/shell-suspense-is-the-boundary.mddoc · 1,211 bytesreferences/shell-wrap-uncached-data.mddoc · 1,410 bytes
Read excerpt
# Next.js 16 Partial Prerendering Patterns
Partial Prerendering (PPR) for the **Next.js 16 App Router** under the **Cache Components** model — the decisions PPR forces and how to settle them, written so an agent applies them while writing or reviewing code. Contains **21 rules across 6 categories**, ordered from easy to complex: enable PPR → understand the static/dynamic boundary → cache → handle runtime data → compose whole pages → build forms and wizards. Each rule corrects a specific wrong default of a model defaulting to Next.js 14/15; there is no rule for things the model already gets right.
> **Version-specific.** This skill targets **Next.js 16** (PPR via `cacheComponents`, React 19.2). The Next.js 14/15 `experimental.ppr` flag and `export const experimental_ppr` route export were **removed** — see `setup-enable-cache-components`. For migrating an existing app, see the [migration guide](https://nextjs.org/docs/app/guides/migrating-to-cache-components).
> **Write, then verify.** These rules are for *authoring* PPR; they can't tell you what actually rendered. To empirically deconstruct the boundary — diff the static shell against the hydrated DOM to find the dynamic holes, locate the `'use client'` islands, measure loading, and explain why a route is dynamic — drive `next build` and a real browser per [_debug-boundaries.md](references/_debug-boundaries.md).
## When to Apply
- Building or reviewing a Next.js 16 page that mixes static chrome with personalized, real-time, or per-request content
- Enabling or migrating PPR (`cacheComponents`), or seeing dead `experimental.ppr` / `experimental_ppr` code
- Deciding where `<Suspense>` boundaries go, or debugging an `Uncached data was accessed outside of <Suspense>` build error
- Adding `'use cache'`, `cacheLife`, `cacheTag`, or choosing `updateTag` / `revalidateTag` / `refresh` after a mutation
- Composing forms, multi-step wizards, dashboards, or streaming server data into interactive Client Components