home / skills / harborgrid-justin / lexiflow-premium / zero-bundle-size-rsc
/frontend/.github-skills/zero-bundle-size-rsc
This skill minimizes client bundles by leveraging Server Components and streaming, reducing initial JS and enabling zero client-side for static subtrees.
npx playbooks add skill harborgrid-justin/lexiflow-premium --skill zero-bundle-size-rscReview the files below or copy the command above to add this skill to your agents.
---
name: zero-bundle-size-rsc
description: Minimizing client bundles through aggressive use of Server Components and streaming protocols.
---
# Zero-Bundle-Size React Server Components
## Summary
Minimizing client bundles through aggressive use of Server Components and streaming protocols.
## Key Capabilities
- Partition application graphs into Server/Client subtrees.
- Eliminate data-fetching libraries from client bundles.
- Serialize complex data structures across the network boundary.
## PhD-Level Challenges
- Formalize the serialization constraints of Server Components.
- Analyze the bandwidth vs. CPU trade-off of RSC payloads.
- Implement a dynamic import strategy for polymorphic server components.
## Acceptance Criteria
- Show a reduction in initial JS execute time.
- Demonstrate zero client-side JS for static subtrees.
- Provide a report on payload size reduction.
This skill helps minimize client bundle sizes by maximizing the use of React Server Components and streaming protocols. It focuses on partitioning application graphs, removing client-side data-fetching dependencies, and serializing server-only state to the client boundary. The result is faster initial load and measurable reductions in client JS execution and payload size.
The skill analyzes component graphs and splits them into Server and Client subtrees, converting eligible components into server-rendered Server Components. It replaces client-side data fetching with server-side data resolution and serializes complex structures across the server/client boundary using an efficient binary/text protocol. Streaming rendering is used to progressively hydrate the UI while keeping static subtrees free of client JS.
Will this remove all client-side JavaScript?
Not always. Static subtrees can be zero-JS, but interactive areas still need thin client components. The goal is to minimize, not necessarily eliminate, client JS where interactivity is required.
How do you measure improvements?
Track initial JS execute time, total payload size (JS + serialized RSC payloads), and time-to-interactive. Generate before/after reports showing reductions in payload and execution time.