nextjs-developer

SKILL.md

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
Weekly Installs
4
First Seen
Feb 24, 2026
Installed on
opencode4
gemini-cli4
claude-code4
codex4
kiro-cli4
cursor4