nextjs-app-router-patterns

nextjs-app-router-patterns is a skill for Claude Code, Codex from mattmre/EVOKORE-MCP-PUBLIC. It costs 48 tokens per session (3,270 once invoked), scanned A, a copy of nextjs-app-router-patterns, MIT.

A guide to building Next.js 14 and newer applications with the App Router, including server-rendered components, page loading, and route layouts.

In plain words
What is it for?
Use it when creating or migrating Next.js applications, adding nested or parallel routes, loading data, streaming slow pages, or building server-side actions.
Why use it?
It helps choose between server and browser code, static and request-time rendering, and different routing patterns without guessing how the pieces fit together.

Skill for Claude CodeCodex

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

Good fit Use it when creating or migrating Next.js applications, adding nested or parallel routes, loading data, streaming slow pages, or building server-side actions.

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

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/mattmre/evokore-mcp-public/nextjs-app-router-patterns/github.svg)](https://agentmods.dev/skills/mattmre/evokore-mcp-public/nextjs-app-router-patterns)
Your own site
<a href="https://agentmods.dev/skills/mattmre/evokore-mcp-public/nextjs-app-router-patterns"><img src="https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/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/mattmre/evokore-mcp-public/nextjs-app-router-patterns"><img src="https://agentmods.dev/badge/skills/mattmre/evokore-mcp-public/nextjs-app-router-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,270 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.00048 $0.03270
Opus 5 $0.00024 $0.01635
Sonnet 5 $0.00010 $0.00654
Haiku 4.5 $0.00005 $0.00327

Measured 7d ago against content hash 34ff7e3a2a85, 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-patterns scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fetch(url, { cache: "no-store" });
Origin

This is a copy

100% identical to nextjs-app-router-patterns — 99 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

SKILLS/WSHOBSON PLUGINS/frontend-mobile-development/nextjs-app-router-patterns/SKILL.md · 546 lines

How it starts

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

Next.js App Router Patterns

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

When to Use This Skill

  • Building new Next.js applications with App Router
  • Migrating from Pages Router to App Router
  • Implementing Server Components and streaming
  • Setting up parallel and intercepting routes
  • Optimizing data fetching and caching
  • Building full-stack features with Server Actions

Core Concepts

1. Rendering Modes

Mode Where When to Use
Server Components Server only Data fetching, heavy computation, secrets
Client Components Browser Interactivity, hooks, browser APIs
Static Build time Content that rarely changes
Dynamic Request time Personalized or real-time data
Streaming Progressive Large pages, slow data sources

2. File Conventions

app/
├── layout.tsx       # Shared UI wrapper
├── page.tsx         # Route UI
├── loading.tsx      # Loading UI (Suspense)
├── error.tsx        # Error boundary
├── not-found.tsx    # 404 UI
├── route.ts         # API endpoint
├── template.tsx     # Re-mounted layout
├── default.tsx      # Parallel route fallback
└── opengraph-image.tsx  # OG image generation

Quick Start

// app/layout.tsx
import { Inter } from 'next/font/google'
import { Providers } from './providers'

const inter = Inter({ subsets: ['latin'] })

export const metadata = {
  title: { default: 'My App', template: '%s | My App' },
  description: 'Built with Next.js App Router',
}

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body className={inter.className}>
        <Providers>{children}</Providers>
      </body>
    </html>
  )
}

// app/page.tsx - Server Component by default
async function getProducts() {
  const res = await fetch('https://api.example.com/products', {
    next: { revalidate: 3600 }, // ISR: revalidate every hour
  })
  return res.json()
}

export default async function HomePage() {
  const products = await getProducts()

  return (
    <main>
      <h1>Products</h1>
      <ProductGrid products={products} />
    </main>
  )
}

Read the full file on GitHub · 546 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. 7d ago First seen · 546 lines · 48 tokens per session scan A 34ff7e3a2a85

Subscribe to this mod's changes

nextjs-app-router-patterns is a skill published in the GitHub repository mattmre/EVOKORE-MCP-PUBLIC (3 stars, last pushed 3mo ago), licensed MIT. It adds 48 tokens to every session and 3,270 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to nextjs-app-router-patterns, differing in 99 lines, and is treated as a copy.