frontend-rendering-strategies
Use when the user asks about CSR vs SSR vs SSG vs ISR, streaming SSR, hydration and partial hydration, islands, edge rendering or picking a rendering mode per…
от j4flmao★ 47 звёзд на GitHub
Установить frontend-rendering-strategies в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Frontend Rendering Strategies
Purpose
Select and implement the correct rendering strategy for each route: CSR for highly interactive dashboards, SSR for personalized content, SSG for marketing pages, ISR for content that changes on a schedule, and RSC for React apps needing zero-bundle data fetching.
Agent Protocol
Trigger
Exact phrases: "rendering strategy", "CSR", "SSR", "SSG", "ISR", "RSC", "React Server Components", "server-side rendering", "static site generation", "incremental static regeneration", "hydration", "progressive hydration", "streaming SSR", "edge rendering".
Input Context
- Framework (Next.js, Astro, Nuxt, Remix, Gatsby, SvelteKit, vanilla)
- Per-route requirements: data freshness, SEO significance, interactivity level
- Authentication requirements (SSR for personalized, SSG for public pages)
- Hosting/deployment platform capabilities (serverless, edge, static)
- Team familiarity with server components
Output Artifact
Rendering strategy map per route: which strategy, why, and implementation details.
Response Format
## Strategy Map
<route> → <strategy> — <rationale>
## Implementation
<per-strategy code examples>
## Trade-offs
<seo | speed | interactivity | cost>
—
Compression footer: frontend-rendering/v1 | routes: <count> | strategies: <CSR|SSR|SSG|ISR|RSC>
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Each route assigned a strategy with justification
- Hydration approach matches interactivity needs
- Data fetching method aligns with rendering strategy
- SEO-critical routes are pre-rendered (SSG or SSR)
- User-specific routes use SSR or CSR with loading state
- Content routes with periodic updates use ISR with revalidation
- Streaming configured for SSR routes with slow data dependencies
Max Response Length
4096 tokens
Rendering Strategy Architecture / Decision Trees
Per-Route Strategy Decision Tree
For each route:
|-- SEO critical? -->
| |-- YES -->
| | |-- Public content (same for all users)? -->
| | | |-- YES --> SSG or ISR
| | | |-- NO (user-specific) --> SSR (streamed)
| |
| |-- NO -->
| |-- Highly interactive? -->
| |-- YES --> CSR (SPA with loading state)
| |-- NO --> SSR or RSC
|
|-- Content changes predictably? -->
| |-- YES (e.g., blog posts updated hourly) --> ISR with revalidate
| |-- NO (e.g., real-time dashboard) --> SSR or CSR
|
|-- React app? -->
|-- RSC for data-fetching, client components for interactivity
|-- Default: Server Components, opt-in to Client Components with "use client"
Hydration Strategy Decision Tree
How much interactivity does the page need?
|-- None (static content, docs, blog) -->
| No hydration needed. Zero JS sent.
| Framework: Astro (default), or SSG without JS
|
|-- Some interactive islands (like buttons, forms) -->
| Partial hydration / islands architecture
| Framework: Astro (client:* directives), Qwik (resumable)
|
|-- Fully interactive (dashboard, admin) -->
| |-- Content-heavy with slow data? -->
| | Progressive hydration: hydrate above-fold first
| | Streaming SSR: shell renders fast, data streams in
| |
| |-- App-like (SPA) -->
| Full hydration: CSR with route-level code splitting
|
|-- React app with mixed concerns -->
Selective hydration (React 18+): prioritize by user interaction
Data Fetching Decision Tree
Where does data come from?
|-- Database / ORM -->
| |-- SSG/ISR: fetch at build time or revalidate interval
| |-- SSR/RSC: fetch per request (may cache at CDN level)
|
|-- External API -->
| |-- SSG: fetch at build time, cache result
| |-- ISR: fetch at build time + revalidate
| |-- SSR: fetch per request (add CDN caching if public)
| |-- CSR: fetch on client (show loading state)
|
|-- User-specific (auth required) -->
SSR or CSR. Never SSG or ISR (cached response would leak data).
Workflow
1. Rendering Decision Framework
For each route:
├── SEO critical? + Public content? → SSG or ISR
├── SEO critical? + User-specific? → SSR (streamed)
├── Not SEO critical? + Highly interactive? → CSR
├── Content changes predictably? → ISR with revalidate
└── React app? → RSC for data-fetching, client components for interactivity
2. Strategy Comparison
| Aspect | CSR | SSR | SSG | ISR | RSC |
|---|---|---|---|---|---|
| SEO | Poor (requires crawler JS) | Excellent | Excellent | Excellent | Excellent |
| TTFB | Fast | Slower (server render) | Fastest | Fast (cached) | Fast (streaming) |
| FCP | Slow (JS needed) | Fast | Fastest | Fast | Fast (streaming) |
| TTI | Waits for hydration | Waits for hydra |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/edge-rendering.md
- references/hydration-strategies.md
- references/isomorphic-rendering.md
- references/rendering-comparison.md
- references/ssr-csr.md
- references/streaming-ssr.md
FAQ
Что делает скилл frontend-rendering-strategies?
Use when the user asks about CSR vs SSR vs SSG vs ISR, streaming SSR, hydration and partial hydration, islands, edge rendering or picking a rendering mode per route. Produces a per-route rendering decision based on freshness, SEO and interactivity. Not for Server Components mechanics (use react-server-components) or Next.js caching internals (use nextjs-internals).
Как установить скилл frontend-rendering-strategies?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frontend-rendering-strategies запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…