Nextjs App Router Fundamentals
Guide for working with Next.js App Router (Next.js 13+). Use when migrating from Pages Router to App Router, creating layouts, implementing routing, handling metadata, or building Next.js 13+ applications. Activates for App Router migration, layout creation, routing patterns, or Next.js 13+ development tasks.
Install
npx skills add wsimmonds/claude-nextjs-skills --skill nextjs-app-router-fundamentalsgit clone --depth 1 https://github.com/wsimmonds/claude-nextjs-skills.git /tmp/claude-nextjs-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-nextjs-skills/nextjs-app-router-fundamentals ~/.claude/skills/nextjs-app-router-fundamentalsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# 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:**
```typescript
function handleSubmit(e: any) { ... }
const data: any[] = [];
```
**✅ CORRECT:**
```typescript
function handleSubmit(e: React.FormEvent<HTMLFormElement>) { ... }
const data: string[] = [];
```
### Common Next.js Type Patterns
```typescript
// 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
Use this skill when:
- Migrating from Pages Router (`pages/` directory) to App Router (`app/` directory)
- Creating Next.js 13+ applications from scratch
- Working with layouts, templates, and nested routing
- Implementing metadata and SEO optimizations
- Building with App Router routing conventions
- Handling route groups, parallel routes, or intercepting routes basicsDetails
- Skill name
nextjs-app-router-fundamentals- Repository
- wsimmonds/claude-nextjs-skills
- Path
nextjs-app-router-fundamentals/SKILL.md- License
- MIT
- Repo updated
- 24 October 2025
FAQ
What does the Nextjs App Router Fundamentals skill do?
Guide for working with Next.js App Router (Next.js 13+). Use when migrating from Pages Router to App Router, creating layouts, implementing routing, handling metadata, or building Next.js 13+ applications. Activates for App Router migration, layout creation, routing patterns, or Next.js 13+ development tasks.
How do I install the Nextjs App Router Fundamentals skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add wsimmonds/claude-nextjs-skills --skill nextjs-app-router-fundamentals. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Nextjs App Router Fundamentals popular?
It lives in wsimmonds/claude-nextjs-skills, which has 115 GitHub stars and 22 forks.
Related skills
Nextjs Advanced Routing
115wsimmonds/claude-nextjs-skills
Guide for advanced Next.js App Router patterns including Route Handlers, Parallel Routes, Intercepting Routes, Server Actions, error boundaries, draft mode, and streaming with Suspense. CRITICAL for server actions (action.ts, actions.ts files, 'use server' directive), setting cookies from client components, and form handling. Use when requirements involve server actions, form submissions, cookies, mutations, API routes, `route.ts`, parallel routes, intercepting routes, or streaming. Essential for separating server actions from client components.
Nextjs Anti Patterns
115wsimmonds/claude-nextjs-skills
Identify and fix common Next.js App Router anti-patterns and mistakes. Use when reviewing code for Next.js best practices, debugging performance issues, migrating from Pages Router patterns, or preventing common pitfalls. Activates for code review, performance optimization, or detecting inappropriate useEffect/useState usage. CRITICAL: For browser detection, keep the logic in the user-facing component (or a composed helper that it renders) rather than isolating it in unused files.
Nextjs Client Cookie Pattern
115wsimmonds/claude-nextjs-skills
Pattern for client components calling server actions to set cookies in Next.js. Covers the two-file pattern of a client component with user interaction (onClick, form submission) that calls a server action to modify cookies. Use when building features like authentication, preferences, or session management where client-side triggers need to set/modify server-side cookies.
Nextjs Dynamic Routes Params
115wsimmonds/claude-nextjs-skills
Guide for Next.js App Router dynamic routes and pathname parameters. Use when building pages that depend on URL segments (IDs, slugs, nested paths), accessing the `params` prop, or fetching resources by identifier. Helps avoid over-nesting by defaulting to the simplest route structure (e.g., `app/[id]` instead of `app/products/[id]` unless the URL calls for it).
Nextjs Pathname Id Fetch
115wsimmonds/claude-nextjs-skills
Focused pattern for fetching data using URL parameters in Next.js. Covers creating dynamic routes ([id], [slug]) and accessing route parameters in server components to fetch data from APIs. Use when building pages that display individual items (product pages, blog posts, user profiles) based on a URL parameter. Complements nextjs-dynamic-routes-params with a simplified, common-case pattern.
Generative UI
207Owl-Listener/ai-design-skills
Designing interfaces where AI generates UI components dynamically.
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.