nextjs

nextjs is a skill for Claude Code, Codex from G1Joshi/Agent-Skills. It costs 23 tokens per session (543 once invoked), scanned A, original, MIT.

A React framework for building full-stack web applications, including pages, server-side code, and routing. It can render pages on the server before sending them to the browser.

In plain words
What is it for?
Use it to build React websites and applications with URL-based pages, server-rendered content, database access, API routes, and interactive browser components.
Why use it?
It brings the user interface and server features into one project, while server rendering can help pages load with useful content and be easier for search engines to read.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/g1joshi/agent-skills/nextjs
Any agent
npx skills add G1Joshi/Agent-Skills --skill nextjs
Clone the repo
git clone --depth 1 https://github.com/G1Joshi/Agent-Skills

Made for: Claude Code, Codex.

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/g1joshi/agent-skills/nextjs.svg)](https://agentmods.dev/skills/g1joshi/agent-skills/nextjs)
Your own site
<a href="https://agentmods.dev/skills/g1joshi/agent-skills/nextjs"><img src="https://agentmods.dev/badge/skills/g1joshi/agent-skills/nextjs.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 543 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.1 $0.00023 $0.00543
Opus 5 $0.00012 $0.00271
Sonnet 5 $0.00005 $0.00109
Haiku 4.5 $0.00002 $0.00054

Measured 2d ago against content hash e4f168d4af1d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 2d 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.

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/frameworks/nextjs/SKILL.md · 74 lines

How it starts

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

Next.js

Next.js is the leading full-stack framework for React. Next.js 15 (2025) stabilizes the App Router and Server Actions, making it a robust platform for modern web apps.

When to Use

  • Full-Stack React: You need API routes, DB access, and UI in one codebase.
  • SEO Critical: Server-Side Rendering (SSR) is first-class.
  • Vercel Ecosystem: seamless deployment to Vercel's edge network.

Quick Start (App Router)

// app/page.tsx (Server Component by default)
import { db } from "@/lib/db";

export default async function Page() {
  const posts = await db.post.findMany(); // Direct DB access!

  return (
    <main>
      <h1>Blog</h1>
      {posts.map((post) => (
        <p key={post.id}>{post.title}</p>
      ))}
    </main>
  );
}

Core Concepts

App Router (app/ dir)

File-system based routing where page.tsx is the UI, layout.tsx wraps children, and loading.tsx defines Suspense boundaries.

Server Components (RSC)

Components in app/ are Server Components by default. They can't use useState or useEffect. To add interactivity, add 'use client' to the top of a file.

Server Actions

Functions that run on the server, callable from the client (forms, buttons).

// actions.ts
'use server'
export async function create(formData) {
  await db.post.create({ data: ... });
}

Best Practices (2025)

Do:

  • Fetch in Server Components: Fetch data directly in your content (async components). No useEffect.
  • Use revalidatePath: Revalidate cache on-demand after mutations (Server Actions).
  • Partial Prerendering (PPR): (Experimental in '24, Stable in '25) Mix static shell with dynamic holes.

Don't:

  • Don't leak secrets: Ensure 'use server' files don't export sensitive data.
  • Don't use client everything: Only put 'use client' at the leaves of your tree (buttons, inputs). Keep high-level layouts as Server Components.

References

Read the full file on GitHub · 74 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. 2d ago First seen · 74 lines · 23 tokens per session scan A e4f168d4af1d

Subscribe to this mod's changes

nextjs is a skill published in the GitHub repository G1Joshi/Agent-Skills (12 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 543 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.

Related

Other skills, from other repositories

react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. Use when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements. Do NOT use…

tech-leads-club/agent-skills · 80 tokens

react-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes. Do NOT…

tech-leads-club/agent-skills · 76 tokens

component-design

Design reusable React components with compound patterns, controlled/uncontrolled hybrids, typed prop APIs, async state handling, and ARIA accessibility. Use when the user creates, refactors, or reviews React components, or mentions props, hooks, .tsx files, component APIs, or accessible UI patterns.

sawrus/agent-guides · 61 tokens

navigation-patterns

When designing app navigation, implementing deep linking, or handling auth flows.

sawrus/agent-guides · 0 tokens

tauri-rust-and-frontend-desktop

Architectural patterns, security IPC, performance optimization, native integration, and production best practices for building cross-platform desktop applications using Tauri (v2) and Rust with modern web frontends (React, Svelte, Vue). Use when designing, building, or optimizing Tauri desktop apps.

hamzabellouch/agent-skills · 68 tokens

ui-styling

Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns…

hamzabellouch/agent-skills · 90 tokens