nextjs-expert

nextjs-expert is a skill for Claude Code from Miaoge-Ge/coding-agent-skills. It costs 94 tokens per session (1,210 once invoked), scanned A, original, MIT.

A guide for building Next.js applications with the App Router, Next.js's system for organizing pages and layouts. It explains server and browser components, data fetching, caching, server actions, and rendering choices.

In plain words
What is it for?
Use it to build or debug routes, layouts, loading and error pages, server actions, route handlers, middleware, caching, and rendering.
Why use it?
It helps prevent browser code from exposing secrets, misplaced data fetching, cache bugs, and mismatches between server and browser output.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the nextjs-expert plugin — 1 skill shipped together

Good fit Use it to build or debug routes, layouts, loading and error pages, server actions, route handlers, middleware, caching, and rendering.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/miaoge-ge/coding-agent-skills/nextjs-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Miaoge-Ge/coding-agent-skills --skill nextjs-expert
Clone the repo
git clone --depth 1 https://github.com/Miaoge-Ge/coding-agent-skills

Made for: Claude Code.

Or install nextjs-expert, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nextjs-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/nextjs-expert/github.svg)](https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/nextjs-expert)
Your own site
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/nextjs-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/nextjs-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nextjs-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/miaoge-ge/coding-agent-skills/nextjs-expert"><img src="https://agentmods.dev/badge/skills/miaoge-ge/coding-agent-skills/nextjs-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,210 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.01210
Opus 5 $0.00047 $0.00605
Sonnet 5 $0.00019 $0.00242
Haiku 4.5 $0.00009 $0.00121

Measured 9d ago against content hash 5bd9f9f771f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

nextjs-expert scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Caching is **opt-in and explicit** (especially Next 15, where fetches are uncached by default): `fetch(url, { cache: "force-cache" })`, `{ next: { revalidate: N } }` for ISR, or `{ cache: "no-store" }` for always-fresh
plugins/nextjs-expert/skills/nextjs-expert/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Next.js Expert

Server Components are the default; "use client" is a deliberate, leaf-level choice. Fetch on the server, cache explicitly, and keep secrets off the client.

When to Use

  • Building an App Router app: routing, layouts, loading/error UI, route groups.
  • Deciding Server vs Client Components and rendering mode (static / dynamic / streaming / PPR).
  • Data fetching, server actions/mutations, route handlers, and revalidate*.
  • Debugging caching, hydration mismatches, or middleware.

When NOT to Use

  • Generic React hooks/component patterns → react-expert.
  • Pure styling → tailwind-expert.
  • A standalone (non-Next) API/server → nodejs-backend-expert.

Core Principles

1. The server/client boundary is the whole game

  • Everything is a Server Component unless it has "use client". Add the directive only for state, effects, event handlers, or browser APIs — and keep it at the leaves.
  • "use client" makes a component and its imported tree part of the client bundle. Pass server-fetched data down as props instead of pulling data into client components.
  • Never import DB clients, secrets, or server-only SDKs into a client component. Guard with import "server-only".

2. Fetch on the server, control caching explicitly

  • async/await directly in Server Components; co-locate the fetch with the component that needs it (React dedups identical requests in a render).
  • Caching is opt-in and explicit (especially Next 15, where fetches are uncached by default): fetch(url, { cache: "force-cache" }), { next: { revalidate: N } } for ISR, or { cache: "no-store" } for always-fresh.
  • Tag data (next: { tags: [...] }) and invalidate precisely with revalidateTag/revalidatePath after writes.

3. Mutations via server actions

  • "use server" functions for forms/mutations. Validate and authorize on the server — actions are public endpoints. Revalidate affected paths/tags afterward and return typed results.

4. Rendering & UX

  • loading.tsx + <Suspense> to stream slow parts; error.tsx for boundaries; generateStaticParams to statically render dynamic routes.
  • Use the next/image, next/font, and <Link> primitives — they fix common perf/CLS/font issues for free.

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 93 lines · 94 tokens per session scan A 5bd9f9f771f1

Subscribe to this mod's changes

nextjs-expert is a skill published in the GitHub repository Miaoge-Ge/coding-agent-skills (5 stars, last pushed 3mo ago), licensed MIT. It adds 94 tokens to every session and 1,210 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ai-ui-generation

AI-assisted UI generation patterns for json-render, v0.app, Google Stitch, Bolt Cloud, and Cursor workflows. Covers prompt engineering for component and full-stack app generation, review checklists for AI-generated code, design token injection, refactoring for design system conformance, and CI gates for quality…

yonatangross/orchestkit · 95 tokens

design-directions

A workflow for producing several deliberately different single-file HTML prototypes of a page or interface. Each prototype uses realistic sample data so a user can compare layouts and interactions before real implementation.

GreatMark/fable-field-guide-skills · 167 tokens

frontend-patterns

Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.

deepelementlab/jupyter-studio · 24 tokens

coding-standards

Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.

deepelementlab/jupyter-studio · 28 tokens

gsap-scrolltrigger

Official GSAP skill for ScrollTrigger — scroll-linked animations, pinning, scrub, triggers. Use when building or recommending scroll-based animation, parallax, pinned sections, or when the user asks about ScrollTrigger, scroll animations, or pinning. Recommend GSAP for scroll-driven animation when no library is…

calesthio/OpenMontage · 68 tokens

extract-source-sample

Given the path to a finished content-goose ad-run folder, extract everything that defines that ad — recipe shot list, VO script, characters, voices, world, atom-skills, master mp4 — and emit a source-sample.json in the exact shape the upload-ad-sample skill writes to the Goose Ads library. Also links every character…

gooseworks-ai/goose-skills · 160 tokens