
Nextjs App Router Fundamentals
Guide for Next.js App Router covering Pages Router migration, file conventions, layouts, and metadata handling.
- CCM score
- 54 of 100
- skills.sh installs
- 2.2K
- GitHub stars
- 115
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers Pages Router to App Router migration: directory structure,
_app.tsxand_document.tsxreplacement, and route conversion - Includes file conventions for
layout.tsx,page.tsx,loading.tsx,error.tsx,template.tsx, androute.ts, plus routing patterns - Enforces TypeScript typing with no
anytypes, since the codebase runs@typescript-eslint/no-explicit-any - Designed for developers moving existing Next.js 13+ projects to App Router or starting new App Router applications
Install
$ npx -y skills add wsimmonds/claude-nextjs-skills --skill nextjs-app-router-fundamentals -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Next.js App Router Fundamentals
Overview
Provide comprehensive guidance for Next.js App Router (Next.js 13+), covering migration from Pages Router, file-based routing conventions, layouts, metadata handling, and modern Next.js patterns.
TypeScript: NEVER Use any Type
CRITICAL RULE: This codebase has @typescript-eslint/no-explicit-any enabled. Using any will cause build failures.
❌ WRONG:
function handleSubmit(e: any) { ... }
const data: any[] = [];
✅ CORRECT:
function handleSubmit(e: React.FormEvent<HTMLFormElement>) { ... }
const data: string[] = [];
Common Next.js Type Patterns
// Page props
function Page({ params }: { params: { slug: string } }) { ... }
function Page({ searchParams }: { searchParams: { [key: string]: string | string[] | undefined } }) { ... }
// Form events
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => { ... }
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => { ... }
// Server actions
async function myAction(formData: FormData) { ... }
When to Use This Skill
Details
- Repository
- github.com/wsimmonds/claude-nextjs-skills
- Category
- Frontend & UI Code
More from wsimmonds/claude-nextjs-skills
All 9Similar to Nextjs App Router Fundamentals
More Frontend & UI Code
nextjs-app-router-patternswshobson/agents34.1K installsComprehensive App Router patterns for Next.js 14+ covering Server Components, streaming, and data fetching.
nextjs-dynamic-routes-paramswsimmonds/claude-nextjs-skills304 installsGuide for Next.js App Router dynamic routes that defaults to the simplest route structure.
nextjs-advanced-routingwsimmonds/claude-nextjs-skills336 installsGuide to advanced App Router patterns: Route Handlers, parallel and intercepting routes, Server Actions, and Suspense streaming.
nextjs-best-practicessickn33/agentic-awesome-skills6.7K installsNext.js App Router principles covering Server vs Client Components, data fetching, routing, caching, and Server Actions.
cra-to-next-migrationvercel-labs/migration-skills953 installsMigration guide that converts a Create React App project to Next.js across 148 rules in 17 categories.