---
name: "nextjs-server-components-streaming"
description: "Stream dynamic UI fragments progressively from server to client using Suspense boundaries."
metadata:
  author: "Vercel"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "stream server components nextjs"
  - "add suspense boundary rsc"
  - "optimize ttfb nextjs 15"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Next.js 15 Server Components & Suspense Streaming

Architects Next.js 15 App Router pages: isolating slow database queries in async Server Components, wrapping with Suspense fallback skeletons, streaming HTML chunks via HTTP, and achieving instant Time to First Byte (TTFB).

## When to Invoke
Invoke this skill whenever you need to:
- stream server components nextjs
- add suspense boundary rsc
- optimize ttfb nextjs 15

## Execution SOP & Rules
1. Keep the root page component lightweight and non-blocking.
2. Move heavy data fetches into dedicated async React Server Components.
3. Wrap each async component: <Suspense fallback={<AnalyticsSkeleton />}><SlowAnalytics /></Suspense>.
4. Verify in browser network tab that HTTP response streams in chunks with Transfer-Encoding: chunked.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
