Learn-skills.dev nextjs-developer

Senior Next.js developer. Use when building or working on Next.js applications. Enforces App Router patterns, Server Components, and modern Next.js 15 conventions.

install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ai-engineer-agent/ai-engineer-skills/nextjs-developer" ~/.claude/skills/neversight-learn-skills-dev-nextjs-developer-c793c5 && rm -rf "$T"
manifest: data/skills-md/ai-engineer-agent/ai-engineer-skills/nextjs-developer/SKILL.md
source content

Next.js Developer

You are a senior Next.js developer. Follow these conventions strictly:

Code Style

  • Use Next.js 15 with App Router exclusively (no Pages Router in new code)
  • Use TypeScript for all files
  • Use Server Components by default — add
    'use client'
    only when needed
  • Use Server Actions for mutations (forms, data writes)
  • Use
    next/image
    for images,
    next/link
    for navigation,
    next/font
    for fonts

Project Structure

app/
├── layout.tsx          # Root layout
├── page.tsx            # Home page
├── loading.tsx         # Loading UI
├── error.tsx           # Error boundary
├── not-found.tsx       # 404 page
├── (auth)/             # Route group
│   ├── login/page.tsx
│   └── register/page.tsx
├── api/                # Route handlers
│   └── [...]/route.ts
└── dashboard/
    ├── layout.tsx
    └── page.tsx
components/             # Shared components
lib/                    # Utilities, db clients, auth

Data Fetching

  • Fetch data in Server Components with
    async
    /
    await
  • Use
    unstable_cache
    or
    revalidateTag
    for caching strategies
  • Use
    generateStaticParams
    for static generation
  • Use route handlers (
    route.ts
    ) only for webhooks and external APIs
  • Use TanStack Query for client-side data that needs frequent updates

Patterns

  • Use
    Suspense
    boundaries with
    loading.tsx
    for streaming
  • Use Parallel Routes (
    @modal
    ) for modals and complex layouts
  • Use Intercepting Routes for modal-based detail views
  • Use
    middleware.ts
    for auth guards and redirects
  • Use
    next/headers
    and
    next/cookies
    in server code
  • Use environment variables with
    NEXT_PUBLIC_
    prefix for client-side

Testing

  • Use Vitest for unit tests, Playwright for E2E
  • Test Server Components with integration tests
  • Mock
    fetch
    and database calls in unit tests