nextjs-app-router

nextjs-app-router is a skill for Claude Code from LeahyCC/claude-skills. It costs 69 tokens per session (1,840 once invoked), scanned A, original, MIT.

A set of development guidelines for Next.js applications that use the App Router, Next.js's newer system for organizing pages, layouts, data loading, and navigation.

In plain words
What is it for?
It is for building or reviewing Next.js App Router features such as pages, layouts, server-side data access, API endpoints, loading states, and metadata.
Why use it?
It helps developers choose where code should run, handle data and errors correctly, and avoid common routing and caching mistakes.

Skill for Claude Code

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

Part of the claude-skills plugin — 7 skills, 1 command shipped together

Good fit It is for building or reviewing Next.js App Router features such as pages, layouts, server-side data access, API endpoints, loading states, and metadata.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leahycc/claude-skills/nextjs-app-router
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 LeahyCC/claude-skills --skill nextjs-app-router
Clone the repo
git clone --depth 1 https://github.com/LeahyCC/claude-skills

Made for: Claude Code.

Or install claude-skills, the plugin that ships this one along with the rest of its 7 skills, 1 command.

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-app-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/leahycc/claude-skills/nextjs-app-router/github.svg)](https://agentmods.dev/skills/leahycc/claude-skills/nextjs-app-router)
Your own site
<a href="https://agentmods.dev/skills/leahycc/claude-skills/nextjs-app-router"><img src="https://agentmods.dev/badge/skills/leahycc/claude-skills/nextjs-app-router/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-app-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/leahycc/claude-skills/nextjs-app-router"><img src="https://agentmods.dev/badge/skills/leahycc/claude-skills/nextjs-app-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,840 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.
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.00069 $0.01840
Opus 5 $0.00034 $0.00920
Sonnet 5 $0.00014 $0.00368
Haiku 4.5 $0.00007 $0.00184

Measured 11d ago against content hash 95ccdefce298, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

nextjs-app-router 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 11d 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/nextjs-app-router/SKILL.md · 181 lines

How it starts

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

Next.js App Router

Production guidance for Next.js 16 App Router applications. Server-first: keep rendering, data access, and secrets on the server; add 'use client' only for interactivity.

Architecture Overview

Request → proxy.ts → Route (layout/page) → Server Components → DB/API
                              │                    │
                              │                    ▼
                              │              RSC Payload + HTML
                              │                    │
                              ▼                    ▼
                        Route Handlers      Streaming + Suspense
                                                   │
                                                   ▼
                                          Client Components (hydrate)

Quick Reference

Need help with... Resource
Server vs Client Components server-components.md
Data fetching, Suspense, use() data-fetching.md
Cache Components, revalidation caching.md
Layouts, navigation, dynamic routes routing.md
proxy.ts, auth gates proxy.md
error.tsx, loading.tsx, notFound() error-handling.md
Metadata, App Router ownership metadata-and-seo.md
next/image, next/font assets.md
Pages Router migration migration.md
Next.js 15 → 16 upgrade version-changes.md

Decision Matrix: "What Do I Use?"

Need Solution Resource
Read database / API Server Component server-components, data-fetching
User interaction / state Client Component server-components
Form mutation Server Action data-fetching
HTTP endpoint / webhook Route Handler data-fetching
Cache expensive data 'use cache' + cacheLife caching
Invalidate after user edit updateTag() caching
Invalidate from webhook revalidateTag(tag, 'max') caching
Auth redirect before render proxy.ts proxy
Loading UI loading.tsx or <Suspense> error-handling, data-fetching
Uncaught error error.tsx error-handling
Missing resource notFound() error-handling
SEO metadata metadata / generateMetadata metadata-and-seo
Optimize images/fonts next/image, next/font assets

Read the full file on GitHub · 181 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. 11d ago First seen · 181 lines · 69 tokens per session scan A 95ccdefce298

Subscribe to this mod's changes

nextjs-app-router is a skill published in the GitHub repository LeahyCC/claude-skills (3 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 1,840 once invoked, about $0.0003 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-08-31.

Related

Other skills, from other repositories

Accessibility Audit Helper

Reviews UI code and components for WCAG 2.1 accessibility violations and provides specific fixes.

Notysoty/openagentskills · 23 tokens

accessibility

Accessibility patterns for WCAG 2.2 compliance, keyboard focus management, React Aria component patterns, cognitive inclusion, native HTML-first philosophy, and user preference honoring. Use when implementing screen reader support, keyboard navigation, ARIA patterns, focus traps, accessible component libraries…

yonatangross/orchestkit · 65 tokens

chrome-ext-ui-react

This skill should be used when building React UI for Chrome extensions or when the user asks about UI patterns in extensions. Trigger when: "React in extension", "extension popup React", "side panel React", "Shadow DOM React", "content script UI", "createShadowRootUi", "extension accessibility", "rem to px extension"…

RadOrigin-LLC/RAD-Claude-Skills · 114 tokens

wes-bos-sick-picks

Research-first workflow for building frontend UI components (any framework), in the spirit of Wes Bos. Use when designing or implementing a UI component, layout, interaction, or CSS/HTML feature and you want a modern, accessible, best-practice solution rather than a first guess. Researches pitfalls and platform…

boserup/wes-bos-sick-picks · 140 tokens

wcag-accessibility

Apply and audit WCAG 2.2 accessibility standards when building or testing frontend components. ALWAYS use this skill when: building any UI component, page, or layout (even if the user doesn't mention accessibility); running accessibility audits or tests; asked to "check a11y", "test accessibility", "audit WCAG…

salawi45/skill-wcag-accessibility · 145 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens