Agent skill
Next.js Rendering Strategies
SSG, SSR, ISR, Streaming, and Partial Prerendering (PPR).
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/rendering
Metadata
Additional technical details for this skill
- labels
-
nextjs rendering isr ssr ssg
- triggers
-
{ "files": [ "**/page.tsx", "**/layout.tsx" ], "keywords": [ "generateStaticParams", "dynamic", "dynamicParams", "PPR", "streaming" ] }
SKILL.md
Rendering Strategies (App Router)
Priority: P0 (CRITICAL)
Choose rendering strategy based on data freshness and scaling needs. See Strategy Matrix.
Guidelines
- SSG (Default): Build-time render. Use
generateStaticParams. - SSR: Per-request render. Triggered by
cookies(),headers(), orcache: 'no-store'. - Streaming: Wrap slow components in
<Suspense>to avoid blocking. - ISR: Post-build updates. Use
revalidate(time) orrevalidatePath(on-demand). - PPR: Static shell + dynamic holes. Experimental
pprconfig. - Runtime: Node.js (Full) or Edge (Lighter/Faster).
Scaling & Hydration
- Static Shell: Render layout as static, personalize via Suspense.
- Error Boundaries: Use
error.tsxwithreset()to catch runtime errors. - Hydration Safety: Avoid
typeof windoworDate.now()in initial render. UseuseEffect.
Anti-Patterns
- No Root Awaits: Avoid waterfalls in
page.tsx. Use Streaming. - Bailouts: Understand Suspense Bailout Rules.
References
- Strategy Selection Matrix
- Implementation Details
- Scaling Patterns
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?