standards-nextjs

Installation
SKILL.md

Next.js 15 App Router Best Practices

Warning: Next.js 15 has breaking changes from older versions. Before writing non-trivial code, check the relevant docs in node_modules/next/dist/docs/.

Critical Rules

  • Never throw from server actions — return { error: string } so clients handle failures gracefully
  • No waterfall fetches — use Promise.all for independent queries
  • params and searchParams are Promises in Next.js 15+ — always await them before accessing properties

Server vs Client Components

Default to Server Components. Add 'use client' only when you need:

  • useState, useReducer, useEffect, or other React hooks
  • Browser-only APIs (window, document, localStorage)
  • Event handlers (onClick, onChange, etc.)
  • Third-party client libraries that require a browser context
Installs
3
Repository
paulund/ai
GitHub Stars
3
First Seen
May 4, 2026
standards-nextjs — paulund/ai