Install
openclaw skills install nextjs-app-routerDeep Next.js App Router workflow—layouts, routing, Server vs Client Components, data fetching and caching, revalidation, streaming, and deployment (Node, serverless, edge). Use when building or debugging Next.js 13+ apps.
openclaw skills install nextjs-app-routerApp Router changes mental models: where code runs, what is cached, and how HTML streams. Defaults differ from Pages Router—call that out explicitly.
Trigger conditions:
Initial offer:
Use six stages: (1) route & layout model, (2) Server vs Client boundaries, (3) data fetching & cache, (4) revalidation & tags, (5) streaming & UX, (6) deployment & runtime. Confirm Next version and hosting (Vercel self, etc.).
Goal: app/ directory = nested layouts + col ocated routes.
layout.tsx for shared UI and providers (client where needed)page.tsx is leaf UI per segmentloading.tsx, error.tsx, not-found for UX boundariesExit condition: URL tree matches folder tree mental model.
Goal: Default Server Components; use client only where interactivity needs browser APIs or state.
Exit condition: List of client components and why.
Goal: fetch cache semantics (force-cache vs no-store vs revalidate) explicit per call.
Exit condition: Per-route data dependency graph (simple diagram).
Goal: Fresh when needed without DDOS origin.
revalidatePath / revalidateTag from server actions or route handlersExit condition: Invalidation owner and trigger documented.
Goal: Suspense boundaries with meaningful fallbacks; a11y for loading.
Goal: Node vs edge runtime per route segment when using edge.