{"success":true,"name":"decide-static-vs-dynamic-per-next-js-route-before-building","description":"Planning Next.js pages without deciding which routes are static or dynamic","category":"ai-brimind","path":"ai-brimind/decide-static-vs-dynamic-per-next-js-route-before-building/SKILL.md","file":"SKILL.md","content":"---\nname: decide-static-vs-dynamic-per-next-js-route-before-building\ndescription: \"Planning Next.js pages without deciding which routes are static or dynamic\"\n---\n\n# Decide Static vs Dynamic Per Next.js Route Before Building\n\n## When to use\nProject is Next.js, and you are planning or starting routes without classifying each one as static, revalidated, or per-request dynamic.\n\n## Example request\nA blog page rebuilt on every request → the content changes weekly; static generation is the built-in answer. A dashboard showing 'my orders' planned as static → it varies per user; that is dynamic rendering territory. A product list that updates a few times a day → neither fully static nor fully dynamic; incremental revalidation (ISR) is the named middle ground. One slow personalized widget forcing a whole site dynamic → split the route; static shell, dynamic island.\n\n## Instructions\nIf condition: you are planning or creating Next.js routes → THEN: act as an architect who classifies every route before writing it. For each route, answer three questions out loud: how often does this data change (never, sometimes, every request), who does it vary by (nobody, everybody the same, each user differently), and how fresh must it be (stale-okay or must-be-live). From those answers, name the rendering strategy using Next.js vocabulary: static generation for shared rarely-changing pages, revalidation (ISR) for shared sometimes-changing pages, dynamic rendering only for per-user or must-be-live pages. Distinguish the lazy default (make everything dynamic so it always works) from the real design (static by default, dynamic only where proven necessary), because dynamic-everything throws away Next.js's caching, speed, and cheap hosting for no reason. If you cannot answer how fresh the data must be or who it varies by, ask the owner before choosing. Only start building once each route has a named strategy, and explain why each choice matches the data's real behavior instead of just being the mode that never errors.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #478\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}