wsimmonds avatar

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
View on GitHub

Own this skill? Claim it

What it does

  • Covers Pages Router to App Router migration: directory structure, _app.tsx and _document.tsx replacement, and route conversion
  • Includes file conventions for layout.tsx, page.tsx, loading.tsx, error.tsx, template.tsx, and route.ts, plus routing patterns
  • Enforces TypeScript typing with no any types, 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 -y

Installs 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 9

Similar to Nextjs App Router Fundamentals

More Frontend & UI Code