nextjs

nextjs is a skill for Claude Code, Codex from ashish7802/awesome-api-skills. It costs 0 tokens per session (657 once invoked), scanned A, original, MIT.

A web application framework built on React, with tools for server-rendered pages, server-side code, and routing. It includes guidance for its App Router, caching, runtimes, and error handling.

In plain words
What is it for?
Use it when creating or maintaining a Next.js app, especially when setting up a project, invalidating cached data after database changes, choosing Edge or Node.js execution, and handling errors.
Why use it?
It helps you choose the right place for code to run and avoid stale data or unsupported server APIs. It also explains common production decisions when building a Next.js application.

Skill for Claude CodeCodex

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

Good fit Use it when creating or maintaining a Next.js app, especially when setting up a project, invalidating cached data after database changes, choosing Edge or Node.js execution, and handling errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ashish7802/awesome-api-skills/nextjs
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 ashish7802/awesome-api-skills --skill nextjs
Clone the repo
git clone --depth 1 https://github.com/ashish7802/awesome-api-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/ashish7802/awesome-api-skills/nextjs/github.svg)](https://agentmods.dev/skills/ashish7802/awesome-api-skills/nextjs)
Your own site
<a href="https://agentmods.dev/skills/ashish7802/awesome-api-skills/nextjs"><img src="https://agentmods.dev/badge/skills/ashish7802/awesome-api-skills/nextjs/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ashish7802/awesome-api-skills/nextjs"><img src="https://agentmods.dev/badge/skills/ashish7802/awesome-api-skills/nextjs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 657 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 21
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00000 $0.00657
Opus 5.5 $0.00000 $0.00263
Sonnet 5.5 $0.00000 $0.00131
Haiku 4.5 $0.00000 $0.00066

Measured 1mo ago against content hash fe69b498a01e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (examples/error-boundary.ts, examples/not-applicable.py, examples/server-action.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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 · 72 lines

How it starts

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

Next.js Skill

The React Framework for the Web.

Ecosystem Graph

graph LR
  nextjs["Next.js"]
  nextjs -- "depends on" --> react
  nextjs -- "deploys to" --> vercel
  nextjs -- "authenticates with" --> clerk
  nextjs -- "alternative to" --> nuxt
  nextjs -- "works well with" --> trpc

Quick Start

Next.js 14+ emphasizes the App Router and React Server Components. Server Components execute exclusively on the server, drastically reducing client-side JavaScript bundles.

npx create-next-app@latest

Production Patterns

Cache Invalidation

The App Router aggressively caches data. Do not rely on time-based revalidation (revalidate: 60) for highly dynamic, user-specific data. Instead, use On-Demand Revalidation (revalidateTag or revalidatePath) triggered directly from your Server Actions after a database mutation.

Architecture & Scaling

Edge vs Node.js Runtimes

Next.js allows specifying export const runtime = 'edge' on a per-route basis. The Edge runtime boots in milliseconds but strictly prohibits native Node.js APIs (like fs or crypto). For heavy backend processing, stick to the default Node.js runtime.

Error Recovery

Use error.tsx at the segment level to catch unexpected runtime errors in Server Components. For expected validation errors during form submissions, return strongly-typed error objects from your Server Action rather than throwing exceptions.

Security Notes

Never expose environment variables to the browser unless they are strictly prefixed with NEXT_PUBLIC_. Treat Server Actions exactly like public API endpoints; always verify the user session (e.g., via Clerk auth()) inside the action before mutating data.

Relationships

Prerequisites: react

Alternatives: nuxt

Works Well With: trpc

Deploys To: vercel

References

Why use this skill

Use this when your agent works with nextjs — structured patterns beat pasted docs and prevent common hallucinations.

Read the full file on GitHub · 72 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 72 lines · 0 tokens per session scan A fe69b498a01e

Subscribe to this mod's changes

nextjs is a skill published in the GitHub repository ashish7802/awesome-api-skills (13 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 657 tokens. 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-08-30.

Related

Other skills, from other repositories

server-side-calls

Call tRPC procedures directly from server code using t.createCallerFactory() and router.createCaller(context) for integration testing, internal server logic, and custom API endpoints. Catch TRPCError and extract HTTP status with getHTTPStatusCodeFromError(). Error handling via onError option.

trpc/trpc · 61 tokens

middlewares

Create and compose tRPC middleware with t.procedure.use(), extend context via opts.next({ ctx }), build reusable middleware with .concat() and .unstablepipe(), define base procedures like publicProcedure and authedProcedure. Access raw input with getRawInput(). Logging, timing, OTEL tracing patterns.

trpc/trpc · 63 tokens

adapter-express

Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.

trpc/trpc · 67 tokens

trpc-router

Entry point for all tRPC skills. Decision tree routing by task: initTRPC.create(), t.router(), t.procedure, createTRPCClient, adapters, subscriptions, React Query, Next.js, links, middleware, validators, error handling, caching, FormData.

trpc/trpc · 59 tokens

api-testing-patterns

Comprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing. Use when testing APIs or designing API test strategies.

proffesor-for-testing/agentic-qe · 34 tokens

contract-testing

Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing. Use when testing API contracts or coordinating distributed teams.

proffesor-for-testing/agentic-qe · 35 tokens