nextjs-app-router

nextjs-app-router is a skill for Claude Code from giuseppe-trisciuoglio/developer-kit. It costs 112 tokens per session (2,988 once invoked), scanned A, original, MIT.

A development guide for Next.js App Router, the system for organizing pages and layouts in modern Next.js applications. It covers server and browser components, server actions, API route handlers, caching, and advanced routing.

In plain words
What is it for?
Use it to create or migrate Next.js applications, add routes and layouts, handle form changes, build API endpoints, and configure caching.
Why use it?
It provides consistent patterns for building pages, forms, APIs, and shared layouts instead of piecing together separate approaches.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { createPost } from "../actions";.

Part of the developer-kit-typescript plugin — 25 skills, 3 commands, 13 agents shipped together

Good fit Use it to create or migrate Next.js applications, add routes and layouts, handle form changes, build API endpoints, and configure caching.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit
agentmods
npx agentmods add skills/giuseppe-trisciuoglio/developer-kit/nextjs-app-router

Made for: Claude Code.

Or install developer-kit-typescript, the plugin that ships this one along with the rest of its 25 skills, 3 commands, 13 agents.

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/giuseppe-trisciuoglio/developer-kit/nextjs-app-router/github.svg)](https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/nextjs-app-router)
Your own site
<a href="https://agentmods.dev/skills/giuseppe-trisciuoglio/developer-kit/nextjs-app-router"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/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/giuseppe-trisciuoglio/developer-kit/nextjs-app-router"><img src="https://agentmods.dev/badge/skills/giuseppe-trisciuoglio/developer-kit/nextjs-app-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,988 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
  • Socket pass 1 Apr 2026
  • Snyk warn 1 Apr 2026
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.00112 $0.02988
Opus 5 $0.00056 $0.01494
Sonnet 5 $0.00022 $0.00598
Haiku 4.5 $0.00011 $0.00299

Measured today against content hash 678a88fb1f32, 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 today.

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.

plugins/developer-kit-typescript/skills/nextjs-app-router/SKILL.md · 379 lines

How it starts

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

Next.js App Router (Next.js 16+)

Build modern React applications using Next.js 16+ with App Router architecture.

Overview

This skill provides patterns for Server Components (default) and Client Components ("use client"), Server Actions for mutations and form handling, Route Handlers for API endpoints, explicit caching with "use cache" directive, parallel and intercepting routes, and Next.js 16 async APIs and proxy.ts.

When to Use

Activate when user requests involve:

  • "Create a Next.js 16 project", "Set up App Router"
  • "Server Component", "Client Component", "use client"
  • "Server Action", "form submission", "mutation"
  • "Route Handler", "API endpoint", "route.ts"
  • "use cache", "cacheLife", "cacheTag", "revalidation"
  • "parallel routes", "@slot", "intercepting routes"
  • "proxy.ts", "migrate from middleware.ts"
  • "layout.tsx", "page.tsx", "loading.tsx", "error.tsx", "not-found.tsx"
  • "generateMetadata", "next/image", "next/font"

Quick Reference

File Purpose Directive Purpose
page.tsx Route page "use server" Server Action function
layout.tsx Shared layout "use client" Client Component boundary
loading.tsx Suspense loading "use cache" Explicit caching (Next.js 16)
error.tsx Error boundary
not-found.tsx 404 page
route.ts API Route Handler
proxy.ts Routing boundary

Instructions

Create New Project

npx create-next-app@latest my-app --typescript --tailwind --app --turbopack

Server Component

Server Components are the default in App Router. They run on the server and can use async/await.

// app/users/page.tsx
async function getUsers() {
  const apiUrl = process.env.API_URL;
  const res = await fetch(`${apiUrl}/users`);
  return res.json();
}

export default async function UsersPage() {
  const users = await getUsers();
  return <main>{users.map(user => <UserCard key={user.id} user={user} />)}</main>;
}

Read the full file on GitHub · 379 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. today First seen · 379 lines · 112 tokens per session scan A 678a88fb1f32

Subscribe to this mod's changes

nextjs-app-router is a skill published in the GitHub repository giuseppe-trisciuoglio/developer-kit (343 stars, last pushed today), licensed MIT. It adds 112 tokens to every session and 2,988 once invoked, about $0.0006 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-10.

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

frontmcp-development

Use when building any FrontMCP server component other than a tool (for tools, use create-tool). Covers @Resource static resources and parameterized URI templates; @Prompt reusable prompts (RAG, multi-turn); @Provider singleton dependency-injection providers (database pools, API clients); @Agent autonomous LLM agents…

agentfront/frontmcp · 196 tokens

github

GitHub operations via gh CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: complex web UI interactions requiring manual browser flows (use browser tooling when available)…

SafeAI-Lab-X/ClawKeeper · 101 tokens

sdlc-spec-slice-writer

Use to write focused implementation SPEC slices for UI, API, data, admin, permissions, directory, observability, or release.

BlueSkyXN/Codex-is-all-you-need · 35 tokens

dev-fullstack-feature

Use when the requested feature genuinely spans at least two delivery layers such as frontend, backend, API, data, scripts, or tests. Do not expand a single-layer change into a full-stack workflow.

BlueSkyXN/Codex-is-all-you-need · 45 tokens

pw-module-markup

Use when creating independent frontend rendering systems explicitly extending the ProcessWire Markup module ecosystem.

trk/processwire-boost · 22 tokens