nextjs-app-router
Next.js 15 App Router architecture, Server Actions, Route Handlers, parallel routes, and ISR caching.
SKILL.mdskills/nextjs-app-router/SKILL.md
GitHubNext.js App Router Architecture Protocol
Leverage Next.js App Router idioms safely and efficiently.
1. Server Actions & Mutations
- Mark mutation files or functions with
'use server'. - Always validate input arguments inside Server Actions using Zod before mutating databases.
- Trigger cache revalidation using
revalidatePath()orrevalidateTag()after successful mutations.
2. Layouts, Loading & Error Boundaries
- Co-locate
loading.tsxfor Suspense streaming. - Co-locate
error.tsxas client error boundaries with retry triggers. - Use Route Handlers (
app/api/.../route.ts) for webhook receivers and non-browser consumers.