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.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.svg" alt="Measured on agentmods" 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 $0.00000 $0.00329
Sonnet 5 $0.00000 $0.00131
Haiku 4.5 $0.00000 $0.00066

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

frontend-code-review

Trigger when the user requests a review of frontend files (e.g., .tsx, .ts, .js). Support both pending-change reviews and focused file reviews while applying the checklist rules.

sangrokjung/claude-forge · 42 tokens

generic-react-ux-designer

Professional UI/UX design expertise for React applications. Covers design thinking, user psychology (Hick's/Fitts's/Jakob's Law), visual hierarchy, interaction patterns, accessibility, performance-driven design, and design critique. Use when designing features, improving UX, solving user problems, or conducting design…

travisjneuman/.claude · 69 tokens

generic-react-feature-developer

Guide feature development for React applications with architecture focus. Covers Zustand/Redux patterns, IndexedDB usage, component systems, lazy loading strategies, and seamless integration. Use when adding new features, refactoring existing code, or planning major changes.

travisjneuman/.claude · 53 tokens

generic-react-code-reviewer

Review React/TypeScript code for bugs, security vulnerabilities, performance issues, accessibility gaps, and CLAUDE.md workflow compliance. Enforces TypeScript strict mode, GPU-accelerated animations, WCAG AA accessibility, bundle size limits, and surgical simplicity. Use when completing features, before commits, or…

travisjneuman/.claude · 71 tokens

generic-react-design-system

Complete design system reference for React applications. Covers colors, typography, spacing, component patterns, glassmorphism effects, GPU-accelerated animations, and WCAG AA accessibility. Use when implementing UI, choosing colors, applying spacing, creating components, or ensuring brand consistency.

travisjneuman/.claude · 59 tokens

component-patterns

Implement React component patterns including composition, custom hooks, render props, HOCs, and compound components. Use when building reusable React components, implementing design patterns, or refactoring component architecture.

armanzeroeight/fastagent-plugins · 41 tokens