
react-server-components-framework
Use when building Next.js 16+ apps with React Server Components. Covers App Router, Cache Components (replacing experimentalppr), streaming SSR, Server Actions, and React 19 patterns for server-first architecture.
- Installs
- 220
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/yonatangross/orchestkit --skill react-server-components-framework- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads react-server-components-framework automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
React Server Components Framework
Overview
React Server Components (RSC) enable server-first rendering with client-side interactivity. This skill covers Next.js 16.2 LTS App Router patterns, Server Components, Server Actions, and streaming.
Next.js 16.2.6 / React 19.2.6 (security release, May 2026) — Turbopack is the default bundler (no
--turboflag needed), Server Fast Refresh is on by default, and the newcacheComponentsconfig flag replaces the legacyexperimental_pprescape hatch. For AI-agent debugging Next.js ships Next DevTools MCP — wirenpx -y next-devtools-mcp@latestinto.mcp.json(it connects via the dev server's/_next/mcpendpoint) to inspect render trees and cache boundaries mid-session.
When to use this skill:
- Building Next.js 16+ applications with the App Router
- Designing component boundaries (Server vs Client Components)
- Implementing data fetching with caching and revalidation
- Creating mutations with Server Actions
- Optimizing performance with streaming and Suspense
Quick Reference
Server vs Client Components
| Feature | Server Component | Client Component |
|---|---|---|
| Directive | None (default) | 'use client' |
| Async/await | Yes | No |
| Hooks | No | Yes |
| Browser APIs | No | Yes |
| Database access | Yes | No |
| Client JS bundle | Zero | Ships to client |
Key Rule: Server Components can render Client Components, but Client Components cannot directly import Server Components (use children prop instead).
Data Fetching Quick Reference
Next.js 16 Cache Components (Recommended):
import { cacheLife, cacheTag } from 'next/cache'
// Default — shared across all users (public CDN-cached)
async function CachedProducts() {
'use cache'
cacheLife('hours')
cacheTag('products')
return await db.product.findMany()
}
// Remote variant (16.2+) — always served from the edge/CDN, never rendered
// inline on the origin. Best for static product listings, marketing content.
async function MarketingHero() {
'use cache: remote'
cacheLife('days')
return <Hero />
}
// Private variant (16.2+) — cached per-user session. Never shared across
// users. Use for personalized dashboards with expensive computation.
async function UserDashboard({ userId }: { userId: string }) {
'use cache: private'
cacheLife('minutes')
cacheTag(`user:${userId}`)
return await loadDashboard(userId)
}
// Invalidate cache — v16 requires a cacheLife profile as the 2nd arg
import { revalidateTag } from 'next/cache'
revalidateTag('products', 'max') // or updateTag('products') for read-your-writes
Enable via next.config.ts:
import type { NextConfig } from 'next'
const config: NextConfig = {
cacheComponents: true, // 16.2+ — replaces experimental_ppr flag
}
export default config
Legacy Fetch Options (Next.js 15):
// Static (cached indefinitely)
await fetch(url, { cache: 'force-cache' })
// Revalidate every 60 seconds
await fetch(url, { next: { revalidate: 60 } })
// Always fresh
await fetch(url, { cache: 'no-store' })
// Tag-based revalidation
await fetch(url, { next: { tags: ['posts'] } })
Server Actions Quick Reference
'use server'
export async function createPost(formData: FormData) {
const title = formData.get('title') as string
const post = await db.post.create({ data: { title } })
revalidatePath('/posts')
redirect("/posts/" + post.id)
}
Async Params/SearchParams (Next.js 16)
Route parameters and search parameters are now Promises that must be awaited:
// app/posts/[slug]/page.tsx
export default async function PostPage({
params,
searchParams,
}: {
params: Promise<{ slug: string }>
searchParams: Promise<{ page?: string }>
}) {
const { slug } = await params
const { page } = await searchParams
return <Post slug={slug} page={page} />
}
Note: Also applies to layout.tsx, generateMetadata(), and route handlers. Complete migration guide: first-party next-upgrade / vercel:next-upgrade skill. House scars: Read("references/ork-delta.md").
Dev Server (Next.js 16.2 LTS)
- Turbopack default —
next devandnext buildrun Turbopack without any flag. Pass--webpackonly when forced (legacy plugin). - Server Fast Refresh — Server Components hot-reload on save without losing client state. No extra config; it's on by default in 16.2.
- Next DevTools MCP — register
npx -y next-devtools-mcp@latestin.mcp.json; it attaches to the running dev server over the/_next/mcpendpoint and exposes RSC payloads and cache boundaries to an MCP client. Designed for AI agents that need to inspect render trees mid-session without screenshotting. (There is nonext-browserbinary.)
References
Load on demand with Read("references/<file>"):
| File | Content |
|---|---|
ork-delta.md | House rules and scars: fabricated-API corrections from PR #2143, React 19 house conventions (2026-07-31 distillation) |
tanstack-router-patterns.md | React 19 features without Next.js, route-based data fetching, client-rendered app patterns |
capability-details.md | Keyword and problem-mapping metadata for all 12 RSC capabilities |
Upstream coverage (do not restate)
Vendor tutorials for these topics live in first-party skills and docs. This skill keeps only floors, scars, and house decisions (references/ork-delta.md).
| Topic | First-party source |
|---|---|
| Server Components fundamentals (async components, data fetching, route segment config, generateStaticParams, error handling) | next-best-practices / vercel:nextjs skill; nextjs.org/docs |
Client Components, 'use client', hydration, client-only rendering | next-best-practices / vercel:nextjs skill |
| Server/Client boundary and composition patterns, serializable props | next-best-practices / vercel:nextjs skill; vercel-composition-patterns |
| Data fetching and caching (fetch cache options, revalidate, tags) | next-best-practices / vercel:nextjs skill |
| Streaming SSR, Suspense boundaries, loading.tsx, skeleton states | vercel:nextjs skill (streaming) |
| Server Actions, progressive enhancement, useActionState forms, Zod validation | vercel:nextjs skill (Server Actions) |
| Advanced routing (parallel, intercepting, route groups, dynamic and catch-all) | vercel:nextjs skill (routing) |
| Pages Router to App Router migration | next-upgrade / vercel:next-upgrade skill |
| Next.js 16 upgrade, breaking changes, codemods | next-upgrade / vercel:next-upgrade skill |
Cache Components: use cache, cacheLife, cacheTag, updateTag, PPR | next-cache-components / vercel:next-cache-components skill |
| React 19 core APIs (useActionState, useFormStatus, useOptimistic, use(), ref as prop) | context7: /vercel/next.js + react.dev (query-docs) |
| RSC implementation and deployment checklist | next-best-practices skill |
Best Practices Summary
Component Boundaries
- Keep Client Components at the edges (leaves) of the component tree
- Use Server Components by default
- Extract minimal interactive parts to Client Components
- Pass Server Components as
childrento Client Components
Data Fetching
- Fetch data in Server Components close to where it's used
- Use parallel fetching (
Promise.all) for independent data - Set appropriate cache and revalidate options
- Use
generateStaticParamsfor static routes
Performance
- Use Suspense boundaries for streaming
- Implement loading.tsx for instant loading states
- Enable PPR for static/dynamic mix
- Use route segment config to control rendering mode
Templates
scripts/server-component-template.tsx- Basic async Server Component with data fetchingscripts/client-component-template.tsx- Interactive Client Component with hooksscripts/server-action-template.ts- Server Action with validation and revalidationscripts/create-server-component.md- Command-style scaffold; kept as the script-invocation contract exercised bytests/skills/scripts/
Troubleshooting
| Error | Fix |
|---|---|
| "You're importing a component that needs useState" | Add 'use client' directive |
| "async/await is not valid in non-async Server Components" | Add async to function declaration |
| "Cannot use Server Component inside Client Component" | Pass Server Component as children prop |
| "Hydration mismatch" | Use 'use client' for Date.now(), Math.random(), browser APIs |
| "params is not defined" or params returning Promise | Add await before params (Next.js 16 breaking change) |
| "experimental_ppr is not a valid export" | Use Cache Components with "use cache" directive instead |
| "cookies/headers is not a function" | Add await before cookies() or headers() (Next.js 16) |
Resources
- Next.js 16 Documentation
- React 19.2 Blog Post
- React Server Components RFC
- App Router Migration Guide
Related Skills
After mastering React Server Components:
- Streaming API Patterns - Real-time data patterns
- Type Safety & Validation - tRPC integration
- Edge Computing Patterns - Global deployment
- Performance Optimization - Core Web Vitals
Capability Details
Keyword and problem-mapping metadata for each RSC capability (react-19-patterns, use-hook-suspense, optimistic-updates-async, rsc-patterns, server-actions, data-fetching, streaming-ssr, caching, cache-components, tanstack-router-patterns, async-params, nextjs-16-upgrade).
Load full capability details: Read("references/capability-details.md")
FAQ
What does the react-server-components-framework skill do?
Use when building Next.js 16+ apps with React Server Components. Covers App Router, Cache Components (replacing experimentalppr), streaming SSR, Server Actions, and React 19 patterns for server-first architecture.
How do I install react-server-components-framework?
Run npx skills add https://github.com/yonatangross/orchestkit --skill react-server-components-framework in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/react-server-components-framework/ (personal) or .claude/skills/react-server-components-framework/ (project).
Which AI agents can use react-server-components-framework?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is react-server-components-framework safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains react-server-components-framework?
It is published by yonatangross in yonatangross/orchestkit. It has 220 recorded installs.
More from yonatangross/orchestkit
devops-deployment
yonatangross/orchestkit
Use when setting up CI/CD pipelines, containerizing applications, deploying to Kubernetes, or writing infrastructure as code. DevOps & Deployment covers GitHub Actions, Docker, Helm, and Terraform patterns.
responsive-patterns
yonatangross/orchestkit
Responsive design with Container Queries, fluid typography, cqi/cqb units, subgrid, intrinsic layouts, foldable devices, and mobile-first patterns for React applications. Use when building responsive layouts or container queries.
architecture-decision-record
yonatangross/orchestkit
ADR templates in the Nygard format with context, decision, consequences, and alternatives. Use when writing ADRs, recording an architectural decision, or evaluating options.
ui-components
yonatangross/orchestkit
UI component library patterns for shadcn/ui and Radix Primitives. Use when building accessible component libraries, customizing shadcn components, using Radix unstyled primitives, or creating design system foundations.
rag-retrieval
yonatangross/orchestkit
Retrieval-Augmented Generation patterns for grounded LLM responses. Use when building RAG pipelines, embedding documents, implementing hybrid search, contextual retrieval, HyDE, agentic RAG, multimodal RAG, query decomposition, reranking, or pgvector search.
zustand-patterns
yonatangross/orchestkit
Reference for Zustand 5.x state management including slices, middleware, Immer, useShallow, persistence, selectors, and devtools integration. Documents 7 core patterns with TypeScript examples and anti-patterns. Use when building React state management with Zustand instead of Redux.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.