NextJS

Build Next.js 15 apps with App Router, server components, caching, auth, and production patterns.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "NextJS" with this command: npx skills add ivangdavila/nextjs

Setup

On first use, read setup.md for project integration.

When to Use

User needs Next.js expertise — routing, data fetching, caching, authentication, or deployment. Agent handles App Router patterns, server/client boundaries, and production optimization.

Architecture

Project patterns stored in ~/nextjs/. See memory-template.md for setup.

~/nextjs/
├── memory.md          # Project conventions, patterns
└── projects/          # Per-project learnings

Quick Reference

TopicFile
Setupsetup.md
Memory templatememory-template.md
Routing (parallel, intercepting)routing.md
Data fetching & streamingdata-fetching.md
Caching & revalidationcaching.md
Authenticationauth.md
Deploymentdeployment.md

Core Rules

1. Server Components by Default

Everything is Server Component in App Router. Add 'use client' only for useState, useEffect, event handlers, or browser APIs. Server Components can't be imported into Client — pass as children.

2. Fetch Data on Server

Fetch in Server Components, not useEffect. Use Promise.all for parallel requests. See data-fetching.md for patterns.

3. Cache Intentionally

fetch is cached by default — use cache: 'no-store' for dynamic data. Set revalidate for ISR. See caching.md for strategies.

4. Server Actions for Mutations

Use 'use server' functions for form submissions and data mutations. Progressive enhancement — works without JS. See data-fetching.md.

5. Environment Security

NEXT_PUBLIC_ exposes to client bundle. Server Components access all env vars. Use .env.local for secrets.

6. Streaming for Large Data

Use <Suspense> boundaries to stream content progressively. Wrap slow components individually. See data-fetching.md.

7. Auth at Middleware Level

Protect routes in middleware, not in pages. Middleware runs on Edge — lightweight auth checks only. See auth.md.

Server vs Client

Server ComponentClient Component
Default in App RouterRequires 'use client'
Can be asyncCannot be async
Access backend, env varsAccess hooks, browser APIs
Zero JS shippedJS shipped to browser

Decision: Start Server. Add 'use client' only for: useState, useEffect, onClick, browser APIs.

Common Traps

TrapFix
router.push in ServerUse redirect()
<Link> prefetches allprefetch={false}
next/image no sizeAdd width/height or fill
Metadata in ClientMove to Server or generateMetadata
useEffect for dataFetch in Server Component
Import Server→ClientPass as children/props
Middleware DB callCall API route instead
Missing await params (v15)Params are async in Next.js 15

Next.js 15 Changes

  • params and searchParams are now Promise — must await
  • fetch not cached by default — opt-in with cache: 'force-cache'
  • Use React 19 hooks: useActionState, useFormStatus

Related Skills

Install with clawhub install <slug> if user confirms:

  • react — React fundamentals and patterns
  • typescript — Type safety for better DX
  • prisma — Database ORM for Next.js apps
  • tailwindcss — Styling with utility classes
  • nodejs — Server runtime knowledge

Feedback

  • If useful: clawhub star nextjs
  • Stay updated: clawhub sync

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Charging Ledger

充电记录账本 - 从截图提取充电信息并记录,支持按周、月查询汇总。**快速暗号**: 充电记录、充电账本、充电汇总。**自然触发**: 记录充电、查询充电费用、充电统计。

Registry SourceRecently Updated
General

qg-skill-sync

从团队 Git 仓库同步最新技能到本机 OpenClaw。支持首次设置、定时自动更新、手动同步和卸载。当用户需要同步技能、设置技能同步、安装或更新团队技能,或提到「技能同步」「同步技能」时使用。

Registry SourceRecently Updated
General

Ad Manager

广告投放管理 - 自动管理广告投放、优化ROI、生成报告。适合:营销人员、电商运营。

Registry SourceRecently Updated