<!-- CORE-OVERLAY-START -->
This repository (Asymmetric-al/core)
Core overlay, reviewed 2026-11-18 against Next.js 16.4.5. The upstream text below is unchanged. Where it conflicts with this block, this block wins.
- Cache Components is already on. Every app's
next.config.tssetscacheComponents: true. The flag flip, the codemod pre-step and step 1's strategy choice describe a migration Core has made; repeating it needs an explicit request. What still applies: the step 2 loop for a route that still blocks, the blocker recipes for new or changed routes, and the verification ladder. Theexport const instant = falseopt-outs on the Payload admin routes underapps/admin/app/(payload)/are deliberate and say why; removing one needs an explicit request. Route work follows Instant Navigation indocs/ai/rules/frontend.mdand thecache-componentsskill. - Use the installed skills.
next-dev-loopis installed; use it instead of thetree/canarylink below. Do not runnpx skills add: skills enter Core only through the reviewed import indocs/ai/rules/agent-skill-routing.md. - Do not run the unpinned codemods. Do not run
npx @next/codemod@latest upgrade latest: each app pins Next.js, and an upgrade is a separate, reviewed dependency change. Do not runnpx @next/codemod@latest agents-md: Core's installed Next.js bundles its docs innode_modules/next/dist/docs/(mirrored in.next-docs/), and rootAGENTS.mdalready carries the Next.js block thatnext devwrites and re-adds; the rest of that file is hand-maintained. To opt a route out, addexport const instant = falseby hand as the skill's manual fallback describes instead of runningcache-components-instant-false. - Never pass
--force, and set work aside with a commit, notgit stash, because the stash is shared by every worktree. - Scope. Commits, pushes and pull requests follow
docs/ai/rules/general.md; asking the user whether to commit or open a pull request does not authorize either.
<!-- CORE-OVERLAY-END -->
next-cache-components-adoption
Enable Cache Components on an app and walk it to a passing build. This skill sequences the work; per-error recipes live in the dev overlay fix cards and the build's terminal output. The migrating to Cache Components guide is the canonical reference for the concepts and per-API recipes this skill applies — consult it whenever the skill steps reference a pattern ("use cache", cacheLife, <Suspense> placement, etc.) and you want the full explanation.
requires
- App Router project. Cache Components is an App Router feature;
cacheComponents: truedoes nothing forpages/routes. If the project has apages/orsrc/pages/tree but noapp/orsrc/app/tree, stop and tell the user — Pages → App migration is its own project, not part of this skill. A hybrid app (bothpages/andapp/) is fine: the flag affects theapp/routes;pages/routes are unaffected and don't need opt-outs.
- A resolved app directory. Locate
next.config.{js,ts,mjs,cjs}first: that's the project root, and an agent invoked from a subdirectory would otherwise test forapp/against the wrongcwdand find nothing. Look forapp/andsrc/app/under it, and treat every command and glob in this skill as relative to whichever one exists. If both exist, Next.js buildsapp/and never looks atsrc/app/, so its routes are shadowed and unbuilt — tell the user that and ask which tree to migrate instead of picking one.
- A runnable app. The whole loop verifies against
next devand a browser, so the app has to boot. If it reads a database or required env at import (e.g. anenv.tsthat throws on a missingDATABASE_URL), confirm it actually starts — with the real environment, or local data you stand up — before step 1. Adoption can't be verified against an app that won't run.
- Next.js 16.3 or later. That release is where the pieces this skill relies on land: top-level
cacheComponents,export const instant, the dev-overlay instant-navigation validation warnings, and thecache-components-instant-falsecodemod. Ifnext --versionreports below 16.3, upgrade first: npx @next/codemod@latest upgrade latestto apply the version-to-version codemods.- Read the relevant version upgrade guide (e.g. Version 16) for what the codemod doesn't cover.
- No incompatible config keys.
cacheComponents: trueerrors on any file that still exportsdynamic,revalidate, orfetchCache. Inventory these exports before running the codemod, then follow the migration guide's per-key sections. The guide is the source of truth for translating each value. Thecache-components-instant-falsecodemod does not remove these configs.
experimental.dynamicIOis fatal. It was renamed to top-levelcacheComponentsand the old key now aborts before any build can run — remove it (or replace withcacheComponents: true) first.experimental.useCacheis still accepted as a deprecated alias; redundant oncecacheComponents: trueis set, so remove it for clarity.
notes
- No passing baseline before the flag. If the app already uses
"use cache", the pre-flag build errors withplease enable the feature flag cacheComponents. Enabling the flag is the first thing you do (in Incremental, before the codemod; in Direct, before fixing routes) — not a thing to do _after_ getting a passing build. Note this in your starting summary so it doesn't read as a regression.