orpc-optimize-ssr

Optimize SSR performance by avoiding redundant HTTP self-calls and sharing server clients via globalThis.

8|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/ali-master/skills --skill orpc-optimize-ssr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orpc-optimize-ssr
Source: https://github.com/ali-master/skills/tree/main/skills/orpc-optimize-ssr
Command: npx skills add https://github.com/ali-master/skills --skill orpc-optimize-ssr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @orpc/server, @orpc/client/fetch, @orpc/client, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill optimizes Server-Side Rendering (SSR) for fullstack frameworks by avoiding unnecessary HTTP self-calls, reducing latency and improving performance.

Core Features & Use Cases

  • Eliminate Redundant Calls: Avoids server making HTTP requests back to its own API endpoints.
  • Global Variable Sharing: Uses globalThis to share server client without bundling into client code.
  • OpenAPILink Support: Integrates with OpenAPILink for enhanced server-side functionality.
  • Alternative Approach: Offers an alternative Fetch-based implementation for SSR optimization.

Quick Start

Use the oRPC Optimize SSR skill to enhance your SSR performance by configuring the server client in your project.

Frequently Asked Questions about orpc-optimize-ssr

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

FAQPage Schema
How do I optimize SSR performance by avoiding redundant HTTP self-calls?

Optimize SSR performance by using global variables to share the oRPC server client, preventing the server from making redundant HTTP self-calls to its own API endpoints, which reduces latency.

Why does my fullstack server make HTTP requests back to its own API endpoints during SSR?

During SSR, servers make HTTP self-calls when client and server code share API request logic. You can eliminate this overhead by sharing the server client globally via globalThis without bundling it into client code.

Does oRPC support server-side optimization for fullstack projects using OpenAPILink?

Yes, oRPC supports server-side optimizations by integrating with OpenAPILink to enhance functionality, making it suitable for fullstack projects aiming to improve SSR efficiency.

Can I use a Fetch-based implementation instead of OpenAPILink for oRPC SSR optimization?

Yes, you can use an alternative Fetch-based implementation for SSR optimization, providing a different approach to configuring the oRPC server client alongside the OpenAPILink integration.

What is the best way to prevent bundling the server client into client code when sharing oRPC instances?

The best way to prevent bundling the server client into client code is by utilizing globalThis for global variable sharing, ensuring the oRPC server client remains isolated during fullstack SSR.

Do I need oRPC installed to optimize server-side rendering for my fullstack project?

Yes, you need oRPC installed, specifically the @orpc/server and @orpc/client dependencies, to configure the server client and optimize SSR efficiency by avoiding redundant HTTP calls.