Agent skill

Nextjs Server Components

by HoangNguyen0403 in HoangNguyen0403/agent-skills-standard

Build async React Server Components and place 'use client' boundaries at leaf nodes for interactivity in Next.js App Router.

MITAuto-check passed

Install Nextjs Server Components

skills CLI
$ npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-server-components -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HoangNguyen0403/agent-skills-standard nextjs-server-components --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nextjs/nextjs-server-components .claude/skills/nextjs-server-components && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nextjs-server-components
GitHub stars
572
Token cost
~745 tokens
SKILL.md length
296 words
Files
4 (incl. references)
Skills in repo
211
Repo updated
First seen
Licence
MIT

At a glance

Build async React Server Components and place 'use client' boundaries at leaf nodes for interactivity in Next.js App Router.

  • Works in 5 steps: Default to RSC — Async Server Components… → Push 'use client' to leaves —… → Compose via children — Pass Server… → …
  • Deciding RSC vs Client Component
  • SKILL.md covers Priority: P0 (CRITICAL), Workflow: Add Server/Client…, Composition Pattern Example and Implementation Guidelines, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Nextjs Server Components is an agent skill from HoangNguyen0403/agent-skills-standard. 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.

Its SKILL.md is about 750 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `evals/evals.json`, `references/composition-security.md` and `references/example.md`).

It works with Next.js and React. The repository describes itself as: A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages. The licence is MIT.

When your agent uses it

  • Deciding RSC vs Client Component
  • Composing server data into client wrappers
  • Fixing hydration errors

Example prompts

  • “use client”
  • “/nextjs-server-components”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Default to RSC — Async Server Components for data fetching.
  2. Push 'use client' to leaves — Interactive leaf nodes only (Button, Form, Chart). Keep layouts/pages as Server Components to maximise RSC…
  3. Compose via children — Pass Server Components as children to Client Components.
  4. Serialize props — Server-to-Client props must be serializable (no functions, Dates, or Classes).
  5. Guard secrets — Import server-only in modules with sensitive logic.

What it can do on your machine

Read from SKILL.md and the folder at commit b529c2d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nextjs Server Components loads about 745 tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 296 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~745
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HoangNguyen0403/agent-skills-standard at commit b529c2d, republished under its MIT licence (© HoangNguyen0403). 296 words, ~745 tokens.

Download SKILL.mdSave it as .claude/skills/nextjs-server-components/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
nextjs-server-components
description
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.

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

  1. Default to RSC — Async Server Components for data fetching.
  2. Push 'use client' to leaves — Interactive leaf nodes only (Button, Form, Chart). Keep layouts/pages as Server Components to maximise RSC benefits.
  3. Compose via children — Pass Server Components as children to Client Components.
  4. Serialize props — Server-to-Client props must be serializable (no functions, Dates, or Classes).
  5. Guard secrets — Import server-only in modules with sensitive logic.

Composition Pattern Example

See implementation examples

Implementation Guidelines

  • Async RSCs: Fetch directly in async Server Components — await db. queries, await params for route segments.
  • Data Fetching: fetch with cache: 'no-store' or revalidate: 0 opts out of static rendering.
  • Streaming: Wrap slow async components in <Suspense>. Use loading.tsx for 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 children prop. See Composition Example.

Anti-Patterns

  • No secrets in Client Components: Use server-only package to prevent accidental bundling.
  • No full DB objects passed to client: Minimize serialized props; pass IDs when possible.
  • No useState/useEffect in 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.

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • Client Component-only hooks

  • await params

  • leaf nodes

  • maximise RSC benefits

  • Additional task-grounded exact anchors: zero JS

© HoangNguyen0403, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/nextjs/nextjs-server-components of HoangNguyen0403/agent-skills-standard.

  • SKILL.md
  • evals/evals.json
  • references/composition-security.md
  • references/example.md

Open the folder on GitHubat commit b529c2d

Compare with similar skills

Nextjs Server Components next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nextjs Server Components compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nextjs Server Components this skillHoangNguyen0403/agent-skills-standard572—~745Automated safety check: PassMIT
Sandbox Benchvercel/next.js143k—~4.1kAutomated safety check: PassMIT
AI SDKvercel-labs/ai-facts16820 repos~1.2kAutomated safety check: PassNone
React View Transitions Guidevercel-labs/next-beats16811 repos~3.1kAutomated safety check: PassMIT
Chakra UI v3 Builderchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT
Remotion Best Practiceslyonjs/shortvid.io14733 repos~1kAutomated safety check: PassMIT

Similar skills

  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • AI SDK

    vercel-labs/ai-facts

    Official

    Answer questions about the AI SDK and help build AI-powered features.

    168 GitHub starsUsed in 20 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • React View Transitions Guide

    vercel-labs/next-beats

    Official

    Guides implementing animated page and state transitions in React with the native View Transition API, covering shared elements, list reorders and directional navigation.

    168 GitHub starsUsed in 11 repos~3.1k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • Remotion Best Practices

    lyonjs/shortvid.io

    Best practices for Remotion - Video creation in React. An agent skill from lyonjs/shortvid.io.

    147 GitHub starsUsed in 33 repos~1k tokens
    Media & CreativeAuto-check passed
  • Website Cloner

    JCodesMore/ai-website-cloner-template

    Rebuilds existing web pages as editable local code that matches their content, assets, responsive layout and interactions, including Framer sites and animated pages.

    36k GitHub stars~1.7k tokensUpdated 6 days ago
    Frontend & DesignAuto-check passed

More from HoangNguyen0403/agent-skills-standard

All 211 skills in this repo
  • Subagent-Driven Development

    HoangNguyen0403/agent-skills-standard

    Runs a multi-task implementation plan by sending each task to a fresh implementer subagent, reviewing it independently, then reviewing the whole branch.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • draw.io Architecture Diagramming

    HoangNguyen0403/agent-skills-standard

    Draws architecture diagrams as editable draw.io files from a JSON spec, with a fixed house style, one C4 level per diagram and evidence-tagged shapes.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Android Navigation 3 Guide

    HoangNguyen0403/agent-skills-standard

    Implements and migrates to Jetpack Navigation 3 in Compose: NavDisplay, typed route objects, a state-list back stack, deep links, multiple back stacks and dialog scenes.

    572 GitHub stars~687 tokensUpdated yesterday
    Auto-check passed
  • Angular HttpClient Standards

    HoangNguyen0403/agent-skills-standard

    Sets rules for Angular HTTP code: functional interceptors, typed requests, services that own every call, and httpResource for reactive data loading in Angular 17+.

    572 GitHub stars~652 tokensUpdated yesterday
    Auto-check passed
  • Angular Tooling

    HoangNguyen0403/agent-skills-standard

    Angular CLI usage, code generation, build configuration, and bundle optimization.

    572 GitHub stars~743 tokensUpdated yesterday
    Auto-check passed
  • Common Code Review

    HoangNguyen0403/agent-skills-standard

    Conduct high-quality, persona-driven code reviews. An agent skill from HoangNguyen0403/agent-skills-standard.

    572 GitHub stars~772 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Nextjs Server Components

What does Nextjs Server Components do?

Build async React Server Components and place 'use client' boundaries at leaf nodes for interactivity in Next.js App Router. Nextjs Server Components is an agent skill from HoangNguyen0403/agent-skills-standard.js App Router.

When should I use Nextjs Server Components?

Nextjs Server Components fits situations like: deciding RSC vs Client Component; composing server data into client wrappers; fixing hydration errors.

How do I install Nextjs Server Components in Claude Code?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-server-components -a claude-code`. Or copy the skill folder (skills/nextjs/nextjs-server-components in HoangNguyen0403/agent-skills-standard) into .claude/skills/nextjs-server-components in your project. Claude Code loads it when a task matches its description.

How do I install Nextjs Server Components in Codex?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-server-components -a codex`. Or copy the skill folder (skills/nextjs/nextjs-server-components in HoangNguyen0403/agent-skills-standard) into .agents/skills/nextjs-server-components in your project. Codex loads it when a task matches its description.

Can I use Nextjs Server Components in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HoangNguyen0403/agent-skills-standard --skill nextjs-server-components -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nextjs-server-components, .gemini/skills/nextjs-server-components, .github/skills/nextjs-server-components and .opencode/skills/nextjs-server-components in your project.

What does Nextjs Server Components need to run?

SKILL.md names no scripts, command-line tools or credentials: Nextjs Server Components is instructions for the agent only.

Does Nextjs Server Components access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nextjs Server Components safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nextjs Server Components use?

Nextjs Server Components is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nextjs Server Components use?

About 745 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 402 tokens, read only when the agent opens those files.

What are the alternatives to Nextjs Server Components?

Skills that share tags, products or a category with Nextjs Server Components: Sandbox Bench (vercel/next.js, 143k stars), AI SDK (vercel-labs/ai-facts, 168 stars), React View Transitions Guide (vercel-labs/next-beats, 168 stars) and Chakra UI v3 Builder (chakra-ui/chakra-ui, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nextjs Server Components?

HoangNguyen0403 (a GitHub user) maintains it in HoangNguyen0403/agent-skills-standard, which has 572 GitHub stars. The repository holds 211 skills in this directory. The repository was last updated on October 9, 2026.

Source: HoangNguyen0403/agent-skills-standard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.