wsimmonds avatar

Nextjs Advanced Routing

This is your goto when you're working with Next.js App Router beyond basic pages. It covers Route Handlers for API endpoints, Server Actions with proper file naming conventions (action.ts vs actions.ts), Parallel and Intercepting Routes for modals and drawers, and streaming with Suspense. The big thing here is it's strict about TypeScript (no any types allowed) and gets the Server Actions return types right, which matters because form actions must return void while useActionState lets you return data. Also handles cookies, error boundaries, and draft mode. Useful when you're building forms, mutations, or complex routing patterns and need the patterns spelled out correctly.

skills.sh installs
336
GitHub stars
110
last updated
Aug 21, 2026

Install

$ npx -y skills add wsimmonds/claude-nextjs-skills --skill nextjs-advanced-routing --agent claude-code

Installs into .claude/skills of the current project.

Files

Next.js Advanced Routing

Overview

Provide comprehensive guidance for advanced Next.js App Router features including Route Handlers (API routes), Parallel Routes, Intercepting Routes, Server Actions, error handling, draft mode, and streaming with Suspense.

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

Sponsors

Details

Repository
github.com/wsimmonds/claude-nextjs-skills
Categories
Frontend Development, Backend & APIs, Documentation, Debugging, Automation & Workflows
First seen
Jun 3, 2026

More from wsimmonds/claude-nextjs-skills

All 9
1secondsky avatarbun-nuxtsecondsky/claude-skillsUse when running Nuxt 3 with Bun runtime, building Vue/Nuxt apps with Bun, or configuring Nuxt projects to use Bun for development and production.323skills.sh installs
2patricio0312rev avatartailwind-gradient-builderpatricio0312rev/skillsCreates modern CSS gradients using Tailwind CSS including linear, radial, conic, mesh gradients, animated gradients, glassmorphism, and gradient text effects. U318skills.sh installs
3patricio0312rev avatarfrontend-refactor-plannerpatricio0312rev/skillsCreates safe refactor plans for messy UI code including component splitting strategies, state simplification, performance optimizations, and accessibility impro317skills.sh installs
4pproenca avatartailwind-refactorpproenca/dot-skillsTailwind CSS code refactoring patterns for v4 migration and anti-pattern cleanup. This skill should be used when refactoring Tailwind utility classes, migrating314skills.sh installs
5wsimmonds avatarnextjs-dynamic-routes-paramswsimmonds/claude-nextjs-skillsGuide for Next.js App Router dynamic routes and pathname parameters. Use when building pages that depend on URL segments (IDs, slugs, nested paths), accessing t304skills.sh installs
6omedia avatardrupal-frontendomedia/drupal-skillDrupal Front End Specialist skill for theme development, Twig templates, and rendering system (Drupal 8-11+). Use when working with Drupal themes, Twig syntax, 300skills.sh installs