nextjs

nextjs is a skill for Claude Code, Codex from arbazkhan971/godmode. It costs 21 tokens per session (1,161 once invoked), scanned A, original, MIT.

A guide to building Next.js applications, including routing, server and browser components, data fetching, rendering, and image handling. Next.js is a framework for building React websites and web applications.

In plain words
What is it for?
Use it to create or assess App Router projects, decide between server and client components, configure rendering, and build dashboards or API routes.
Why use it?
It helps organise pages and layouts and choose how each part should run and load, which can otherwise lead to slow or difficult-to-maintain applications.

Skill for Claude CodeCodex

Part of the godmode plugin — 133 skills, 1 command, 9 agents, 3 MCP servers shipped together

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.

agentmods
npx agentmods add skills/arbazkhan971/godmode/nextjs
Any agent
npx skills add arbazkhan971/godmode --skill nextjs
Clone the repo
git clone --depth 1 https://github.com/arbazkhan971/godmode

Made for: Claude Code, Codex.

Or install godmode, the plugin that ships this one along with the rest of its 133 skills, 1 command, 9 agents, 3 MCP servers.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/arbazkhan971/godmode/nextjs.svg)](https://agentmods.dev/skills/arbazkhan971/godmode/nextjs)
Your own site
<a href="https://agentmods.dev/skills/arbazkhan971/godmode/nextjs"><img src="https://agentmods.dev/badge/skills/arbazkhan971/godmode/nextjs.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,161 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.01161
Opus 5 $0.00010 $0.00580
Sonnet 5 $0.00004 $0.00232
Haiku 4.5 $0.00002 $0.00116

Measured yesterday against content hash 38f1c3ad5cfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nextjs scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/nextjs/SKILL.md · 154 lines

How it starts

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

Activate When

  • /godmode:nextjs, "Next.js", "App Router"
  • "Server Components", "server actions", "ISR"
  • "SSG", "SSR", "next/image", "middleware"
  • "nextjs page", "Next.js page", "nextjs dashboard"

Workflow

1. Project Assessment

cat next.config.* 2>/dev/null
ls app/ pages/ 2>/dev/null
grep "next" package.json 2>/dev/null
Router: App Router | Pages Router | Migration
Version: 13 | 14 | 15+
Rendering: mostly static | mostly dynamic | mixed
Auth: NextAuth | Clerk | Supabase Auth | custom
Deploy: Vercel | self-hosted | Docker

2. App Router Architecture

app/
  layout.tsx          # Root (metadata, providers)
  loading.tsx / error.tsx / not-found.tsx
  (marketing)/        # Route group (no URL segment)
    page.tsx, about/, pricing/
  (app)/              # Authenticated app group
    layout.tsx (sidebar, nav)
    dashboard/ (page, loading, error)
    [workspace]/ (dynamic, [...slug]/)
  api/ (route handlers)

Route groups (name) organize without URL impact. Every segment: layout, loading, error optional. Mark error.tsx as 'use client'.

3. Server vs Client Components

DECISION: needs browser APIs, event handlers,
  useState, useEffect, useContext?
  YES -> 'use client'
  NO  -> Server Component (default)

PATTERNS:
  Push 'use client' to leaf components
  Composition: client wrapper, server children
  Context provider at boundary

ANTI-PATTERNS:
  'use client' on page.tsx or layout.tsx
  Import server-only code in client components
  Non-serializable props server -> client

4. Data Fetching

  • Server Component async fetch (default, deduplicated)
  • Server Actions (mutations, 'use server')
  • Revalidation: time-based, on-demand, no-cache
  • Parallel: Promise.all + Suspense boundaries

Read data -> Server Component. Mutate -> Server Action. Real-time -> Client fetch + SWR/React Query.

5. Rendering Strategy

SSG: static content. Default, generateStaticParams().
ISR: periodic refresh. revalidate: <seconds>.
SSR: fresh per request. force-dynamic, cookies().
Streaming: slow data. Suspense + loading.tsx.
Client: interactive/real-time. 'use client' + SWR.

IF can be static: SSG. IF periodic: ISR. IF per-request: SSR. IF slow parts: Streaming.

Read the full file on GitHub · 154 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. yesterday First seen · 154 lines · 21 tokens per session scan A 38f1c3ad5cfa

Subscribe to this mod's changes

nextjs is a skill published in the GitHub repository arbazkhan971/godmode (26 stars, last pushed 7d ago), licensed MIT. It adds 21 tokens to every session and 1,161 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.