nextjs-app-router-patterns

nextjs-app-router-patterns is a skill for Claude Code, Codex from pedroiff0/awesome-skills. It costs 36 tokens per session (253 once invoked), scanned A, original, MIT.

A guide to structuring Next.js applications with the App Router, the part of Next.js that organizes pages and server-rendered features by folders.

In plain words
What is it for?
It covers Server Components, Server Actions for updates, nested routes, parallel and intercepting routes, and streaming server-rendered pages.
Why use it?
It helps decide where data fetching, forms, loading states, errors, and interactive browser code should live in a modern Next.js project.

Skill for Claude CodeCodex

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

Good fit It covers Server Components, Server Actions for updates, nested routes, parallel and intercepting routes, and streaming server-rendered pages.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pedroiff0/awesome-skills/nextjs-app-router-patterns"><img src="https://agentmods.dev/badge/skills/pedroiff0/awesome-skills/nextjs-app-router-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 253 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.00036 $0.00253
Opus 5 $0.00018 $0.00127
Sonnet 5 $0.00007 $0.00051
Haiku 4.5 $0.00004 $0.00025

Measured 8d ago against content hash 5e5274e3958a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

nextjs-app-router-patterns 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.

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/web/nextjs-app-router-patterns/SKILL.md · 23 lines

What it actually says

Next.js App Router Architecture & Patterns

Best practices for structuring modern full-stack web applications using React Server Components and Next.js App Router.

Key Principles

  1. Default to Server Components: Keep data fetching on the server; only mark components with client directive when browser APIs, event listeners, or hooks are needed.
  2. Colocation of Route Segments: Structure routes using folder hierarchies with page.tsx, layout.tsx, loading.tsx, and error.tsx.
  3. Mutations via Server Actions: Use server action functions for forms and state mutations with revalidatePath and revalidateTag.
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 · 23 lines · 36 tokens per session scan A 5e5274e3958a

Subscribe to this mod's changes

nextjs-app-router-patterns is a skill published in the GitHub repository pedroiff0/awesome-skills (1 stars, last pushed 4d ago), licensed MIT. It adds 36 tokens to every session and 253 once invoked, about $0.0002 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

airflow-plugins

Builds Airflow 3.1+ plugins that embed FastAPI apps, custom UI pages, React components, middleware, macros, and operator links directly into the Airflow UI. Use when building anything custom inside Airflow 3.1+ that involves Python and a browser-facing interface - creating an Airflow plugin, adding a custom UI page or…

astronomer/agents · 147 tokens

nextjs-patterns

Next.js best practices, server components, app router patterns, caching strategies, and full-stack architecture.

cosmicstack-labs/mercury-agent-skills · 24 tokens

nextjs

Use when building Next.js applications with the App Router. Covers server and client component boundaries, data fetching and caching, server actions, streaming, and rendering strategy.

nimadorostkar/Claude-Skills-collection · 35 tokens

react-component-design

Designs or reviews React component APIs. Handles prop drilling decisions, composition patterns, controlled/uncontrolled contracts, and minimal public API surfaces for React 18+ TypeScript components. Invoked when creating new components, refactoring existing ones, or reviewing component contracts.

soulcodex/agentic · 56 tokens

svix-sending-webhooks

Everything for working with Svix webhooks: first-time setup (API key, SDK install, first message), Dispatch (sending webhooks to your customers), Ingest (receiving third-party webhooks), Applications, Channels, customer UIDs, idempotency, App Portal embedding, operational webhooks, the Svix CLI, and — only when the…

svix/ai · 138 tokens

receiving-webhooks

General guidelines for building a robust webhook receiver/handler: verifying signatures, raw-body access, replay protection, async processing, retries and endpoint auto-disabling. Use whenever you write, review, or debug a handler that consumes incoming webhooks from any provider.

svix/ai · 56 tokens