> 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. (triggers: app/**/*.tsx, src/app/**/*.tsx, app/**/*.jsx, src/app/**/*.jsx, use client, Server Component, Client Component, hydration)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/nextjs-server-components?format=md"Server & Client Components
Priority: P0 (CRITICAL)
[!WARNING] If the project uses the
pages/directory instead of the App Router, ignore this skill entirely.
Next.js (App Router) uses React Server Components (RSC) by default.
Workflow: Add Server/Client Component Split
- Default to RSC — Write components as async Server Components for data fetching.
- Push
'use client'to leaves — Only add for interactivity (onClick, useState, useEffect). - Compose via children — Pass Server Components as
childrento Client Components. - Serialize props — Ensure all Server-to-Client props are serializable (no functions, Dates, or Classes).
- Guard secrets — Import
server-onlyin modules with sensitive logic.
Composition Pattern Example
Implementation Guidelines
- Async RSCs: Fetch data directly inside async Server Components; use
await db.queries andawait paramsfor route segments. - Data Fetching: Use
fetchwithcache: 'no-store'orrevalidate: 0to opt out of static rendering when needed. - Streaming: Wrap slow async components in
<Suspense>for progressive loading. Useloading.tsxfor route-level skeletons. - Hydration: Server sends HTML + RSC payload; client hydrates only Client Components. Server Components produce zero JS in the client bundle.
- Server-in-Client: You cannot import a Server Component directly into a Client Component.
- Fix: Pass Server Component as
childrenprop to the Client Component. See Composition Example.
- Fix: Pass Server Component as
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 are Client Component-only hooks. - No
'use client'at tree root: Push the boundary to leaf components.
References
> related_skills --same-repo
> common-store-changelog
Generate user-facing release notes for the Apple App Store and Google Play Store by collecting git history, triaging user-impacting changes, and drafting store-compliant changelogs. Enforces character limits (App Store ≤4000, Google Play ≤500), tone, and bullet format. Use when generating release notes, app store changelog, play store release, what's new, or version release notes for any mobile app. (triggers: generate changelog, app store notes, play store release, what's new, release notes, ve
> golang-tooling
Go developer toolchain — gopls LSP diagnostics, linting, formatting, and vet. Use when setting up Go tooling, running linters, or integrating gopls with Claude Code. (triggers: gopls, golangci-lint, golangci.yml, go vet, goimports, staticcheck, go tooling, go lint)
> common-ui-design
Design distinctive, production-grade frontend UI with bold aesthetic choices. Use when building web components, pages, interfaces, dashboards, or applications in any framework (React, Next.js, Angular, Vue, HTML/CSS). (triggers: build a page, create a component, design a dashboard, landing page, UI for, build a layout, make it look good, improve the design, build UI, create interface, design screen)
> common-owasp
OWASP Top 10 audit checklist for Web Applications (2021) and APIs (2023). Load during any security review, PR review, or codebase audit touching web, mobile backend, or API code. (triggers: security review, OWASP, broken access control, IDOR, BOLA, injection, broken auth, API review, authorization, access control)