nextjs-ssr-optimization

Analyze Next.js projects and implement SSR, SSG, ISR, and streaming optimizations.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/zero-rehq/opencode-kit --skill nextjs-ssr-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-ssr-optimization
Source: https://github.com/zero-rehq/opencode-kit/tree/main/.opencode/skill/nextjs-ssr-optimization
Command: npx skills add https://github.com/zero-rehq/opencode-kit --skill nextjs-ssr-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill guides engineers to optimize rendering performance in Next.js projects across SSR, SSG, ISR, and streaming to reduce latency and improve perceived UX.

Core Features & Use Cases

  • Server Components by default with minimal use of "use client" to maximize server-rendered performance
  • Streaming and Suspense boundaries to improve data-loading UX without blocking interactivity
  • ISR and generateStaticParams for dynamic static routes and incremental content updates
  • Parallel data fetching patterns (e.g., Promise.all) to avoid waterfall fetches
  • Guidance on server-first data fetching and caching strategies to minimize client-side work

Quick Start

Run the analyze-ssr.sh script against your Next.js project to generate an SSR optimization report. Then apply Server Components by default, add Suspense boundaries for streaming data, configure ISR and generateStaticParams for dynamic routes, and use parallel data fetching. Re-run the analyzer to verify improvements.

Frequently Asked Questions about nextjs-ssr-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Next.js SSR performance to reduce TTFB and LCP?

To optimize Next.js SSR performance and reduce TTFB and LCP, apply React Server Components by default, implement parallel data fetching with Promise.all to avoid waterfall fetches, and leverage streaming with Suspense boundaries to prevent blocking interactivity.

How does streaming with Suspense boundaries improve Next.js rendering performance?

Streaming with Suspense boundaries improves Next.js rendering performance by sending HTML chunks progressively, which enhances the data-loading user experience without blocking interactivity while the server fetches remaining data.

What's the best way to generate static pages for dynamic routes in Next.js?

The best way to generate static pages for dynamic routes in Next.js is using ISR combined with generateStaticParams, enabling incremental content updates and static generation for dynamic paths.

Can I use server-first data fetching to minimize client-side work in Next.js?

Yes, you can use server-first data fetching in Next.js to minimize client-side work by relying on Server Components to handle data retrieval and applying caching strategies to reduce redundant network requests.

Do I need knowledge of React Server Components to optimize Next.js SSR?

Yes, you need knowledge of React Server Components, server-first data fetching, and parallel data fetching techniques, plus familiarity with Next.js configuration to successfully implement SSR and streaming optimizations.

When should I not use the use client directive in Next.js?

You should minimize the use client directive in Next.js to maximize server-rendered performance, reserving it only for components requiring client-side interactivity while defaulting to Server Components for rendering optimization.