insight-error-page
Insight Error Page — Write & Audit
Write or audit an errors/<slug>.mdx insight-kind page that ships from this repo to nextjs.org and mirrors the fix-card set in the Next.js dev overlay.
Terminology: the frontmatter uses kind: insight but the body text calls these "errors" — never "insights". Write "this error", "error pages", "dismiss the error".When to use this skill
- Write mode: "create the error page for
next-prerender-random", "write the sync IO docs" - Audit mode: "audit the blocking-prerender-dynamic page", "check the error pages match the framework"
- Any task involving
errors/*.mdxinsight pages (frontmatter haskind: insight)
Source of truth chain
Every decision traces back to one of these. When in doubt, read the source — don't guess.
| What | Source file | How to read it |
| --------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Card titles, IDs, groups, snippets, link URLs | packages/next/src/next-devtools/dev-overlay/components/instant/instant-guidance-data.ts | Each FixCard[] array is one error family |
| Error headline (literal text user sees) | packages/next/src/server/app-render/sync-io-messages.ts, blocking-route-messages.ts, etc. | createSyncIOError, createDynamicBodyError, etc. — the template string is the headline |
| Existing page (content to preserve) | errors/<slug>.mdx in this repo | Read the full file; relocate useful content that doesn't fit fix cards into Gotchas or Other options |
| Canonical API docs (terminology) | docs/01-app/ in this repo | Cross-check every API name, directive name, and concept against the published docs |
| Template structure | This skill file (below) | The canonical shape of the page |
| Vercel writing style | The vercel-technical-writing skill in vercel/front (not present here) | Apply end-to-end; see "Voice and style" below for the rules condensed |
Before you start
- Read the framework card data for the error family you're writing. Find the matching
FixCard[]ininstant-guidance-data.ts. Note every card'sid,title,group,link, andsnippets. - Read the factory message that produces the dev-overlay headline. Find
createSyncIOError,createSyncIOClientError,createDynamicBodyError, etc. The headline template (minus theRoute "..."prefix) becomes the pagetitle. - Read the existing
errors/<slug>.mdxif it exists. Note every pattern, code example, and caveat. You must preserve all useful content — relocate it if the new structure doesn't have a 1:1 slot for it. - Read the canonical docs for every API you'll reference:
use cache,cacheLife,cacheTag,connection,Suspense,useEffect,use client,generateStaticParams, etc. Use the exact terminology from the published docs. - Apply Vercel technical writing style (active voice, sentence-case headings, no banned words). The full
vercel-technical-writingskill lives invercel/front; the condensed rules below are the minimum bar.
Page structure (mandatory)
Every page follows this exact shape. Do not add, remove, or reorder sections.
---
title: <literal dev-overlay headline, no period, strip Route "..." prefix>
kind: insight
---
<the Instant Navigations callout div — the styled box linking the blog post and the Ensuring instant navigations guide; copy it from any existing insight page>
<Framing, 2-3 paragraphs. Paragraph 1 opens "During <phase>, <event>" in past tense (e.g. "During prerendering, a Server Component called ..."), names the APIs, and states the mechanism or consequence. Never open a paragraph with inline code — lead with a word ("The `params` prop ..."). Later paragraphs carry the teaching and cross-link sibling pages (parallel API families + client/server counterpart) using the "For X, see Y" formula.>
## Ways to fix this
<FixCardGrid> wrapping one <FixCard /> per framework card, in framework order
## <Card 1 title>
Choose this fix when ...
### Patterns
### Trade-off
### Gotchas
(optional: ### Short-lived caches — only for cache fixes)
## <Card 2 title>
...
## <Card N title>
...
(optional: ## Other options — for useful patterns that don't map to a framework fix card but are still relevant. Examples: bridging to a different error page's fix ("Cache the value in a Server Component" on a client page, linking to the server page), upstream content from `errors/<slug>.mdx` that doesn't fit the card structure, alternative APIs that sidestep the problem entirely. Each option gets its own `###` heading with framing prose, a code snippet, and a "Learn more" link to the page that covers it in full.)
