agentskills.codes

Next.js 15 App Router patterns for EaseUI. Server/Client Components, data fetching, caching, server actions.

Install

mkdir -p .claude/skills/nextjs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13869" && unzip -o skill.zip -d .claude/skills/nextjs && rm skill.zip

Installs to .claude/skills/nextjs

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Next.js 15 App Router patterns for EaseUI. Server/Client Components, data fetching, caching, server actions.
108 charsno explicit “when” trigger

About this skill

Next.js 15 — EaseUI Patterns

EaseUI runs on Next.js 15 App Router. Server Components by default, client only when interactive.

Server vs Client Decision Tree

Does it need...?
├── useState, useEffect, event handlers → Client Component ('use client')
├── Direct data fetching, no interactivity → Server Component (default)
└── Both? → Split: Server parent + Client child

Workflow: Adding a New Route

Step 1: Choose Route Location

  • Input: feature area
  • Action: Place in correct route group:
Route GroupPurpose
app/(editor)/Canvas editor routes
app/(dashboard)/Dashboard routes
app/api/API route handlers
app/(marketing)/Landing pages
  • Output: page.tsx in correct directory

Step 2: Data Fetching Strategy

  • Input: what data does this page need?
  • Action: Pick strategy:
NeedPattern
Database readsServer Component fetch + Supabase
Real-time datano-store or SWR client-side
Cached datarevalidate: 60
MutationsServer Actions ('use server')
  • Output: data flowing into components

Step 3: Caching Layer

  • Input: performance requirements
  • Action: Configure cache:
LayerControl
Requestfetch() options
DatarevalidatePath() / revalidateTag()
Full routedynamic = 'force-static' or 'force-dynamic'
  • Output: optimized data loading

File Conventions

FilePurpose
page.tsxRoute UI
layout.tsxShared layout
loading.tsxLoading state (Suspense fallback)
error.tsxError boundary
not-found.tsx404 page

Route Organization

PatternUse
Route groups (name)Organize without URL
Parallel routes @slotMultiple same-level pages
Intercepting (.)Modal overlays

Metadata

TypeUse
Static exportFixed metadata
generateMetadataDynamic per-route

Essential: title (50-60 chars), description (150-160 chars), Open Graph, canonical URL.

Server Actions

  • Mark with 'use server'
  • Validate all inputs with Zod
  • Return typed responses
  • Handle errors gracefully

Hard Gate (Before Submitting)

  • loading.tsx tồn tại cho route mới (Suspense fallback)
  • Dynamic import cho heavy components (next/dynamic)
  • Route group (()) đúng — editor vs dashboard vs marketing
  • Không getServerSideProps — chỉ App Router patterns
  • Server Actions validate input bằng Zod

Done Condition

Route renders đúng + loading state hiện + cache strategy configured + tất cả gate items ✅

Search skills

Search the agent skills registry