nextjs-server-components
БесплатноБез исполняемых скриптовНе проверенBuild async React Server Components and place 'use client' boundaries at leaf nodes for interactivity in Next.js App Router. Use when deciding RSC vs Client…
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
Server & Client Components
Priority: P0 (CRITICAL)
[!WARNING] If project uses
pages/directory instead of App Router, ignore this skill entirely.
App Router uses React Server Components (RSC) by default.
Workflow: Add Server/Client Component Split
- Default to RSC — Async Server Components for data fetching.
- Push
'use client'to leaves — Interactive leaf nodes only (Button, Form, Chart). Keep layouts/pages as Server Components to maximise RSC benefits. - Compose via children — Pass Server Components as
childrento Client Components. - Serialize props — Server-to-Client props must be serializable (no functions, Dates, or Classes).
- Guard secrets — Import
server-onlyin modules with sensitive logic.
Composition Pattern Example
Implementation Guidelines
- Async RSCs: Fetch directly in async Server Components —
await db.queries,await paramsfor route segments. - Data Fetching:
fetchwithcache: 'no-store'orrevalidate: 0opts out of static rendering. - Streaming: Wrap slow async components in
<Suspense>. Useloading.tsxfor route-level skeletons. - Hydration: Server sends HTML + RSC payload; client hydrates only Client Components. Server Components: zero JS in client bundle.
- Server-in-Client: Cannot import Server Component into Client Component.
- Fix: Pass as
childrenprop. See Composition Example.
Anti-Patterns
- No secrets in Client Components: Use
server-onlypackage to prevent accidental bundling. - No full DB objects passed to client: Minimize serialized props; pass IDs when possible.
- No
useState/useEffectin Server Components: These Client Component-only hooks. - No
'use client'at tree root: Push boundary to leaf components.
References
Server-boundary checklist
- Keep server-only environment variables unprefixed and never echo client-prefix syntax when explaining secret boundaries; do not expose them to client bundles.
Установить nextjs-server-components в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nextjs-server-components?
Build async React Server Components and place 'use client' boundaries at leaf nodes for interactivity in Next.js App Router. Use when deciding RSC vs Client Component, composing server data into client wrappers, or fixing hydration errors.
Как установить скилл nextjs-server-components?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nextjs-server-components запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic