next-server-patterns
Installation
SKILL.md
Instructions
When to Use
- Use for RSC, Server Actions, Route Handlers, and client boundaries.
- Prefer
server-caching-handbookfor stampede/tag details. - Prefer
next-architecturefor whole-app layering decisions.
Guide Next.js App Router layout: Server Components by default, Client only where hooks, browser APIs, or event handlers require it.
Placement cheat sheet
| Concern | Put it in |
|---|---|
| Data read for a page | Server Component / fetch |
| UI event handlers | Client island ('use client') |
| Same-origin mutation | Server Action (forms-and-validation) |
| External HTTP API | Route Handler (api-handbook) |
| Cache invalidation design | server-caching-handbook |