Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Next.js Production Engineering

БесплатноБез исполняемых скриптовНе проверен

Run through these 8 signals — score 0 (no) or 2 (yes):

modbenderот modbender★ 21 звезда на GitHub

Об этом скилле

Next.js Production Engineering

Complete methodology for building, optimizing, and operating production Next.js applications. From architecture decisions to deployment strategies — everything beyond "hello world."

Quick Health Check (60 seconds)

Run through these 8 signals — score 0 (no) or 2 (yes):

Signal Check Score
🏗️ Architecture Server/Client Component boundary is intentional, not accidental /2
⚡ Performance Core Web Vitals all green (LCP <2.5s, INP <200ms, CLS <0.1) /2
🔒 Security No secrets in client bundles, CSP headers configured /2
📦 Bundle No unnecessary client JS, tree-shaking working /2
🗄️ Data Caching strategy defined (not just defaults) /2
🧪 Testing E2E + unit tests in CI, >70% coverage on critical paths /2
🚀 Deploy Preview deploys, rollback capability, monitoring /2
📊 Observability Error tracking, performance monitoring, structured logging /2

Score: /16 → 14-16 Production-ready | 10-13 Needs work | <10 Risk zone


Phase 1: Architecture Decisions

App Router vs Pages Router Decision

Default: App Router for all new projects (Next.js 13.4+).

Use Pages Router ONLY if:

  • Migrating existing Pages Router app (incremental adoption)
  • Team has zero RSC experience AND shipping deadline <2 weeks
  • Library dependency requires Pages Router patterns

Project Structure (Recommended)

src/
├── app/                    # App Router — routes only
│   ├── (auth)/             # Route group — shared auth layout
│   │   ├── login/page.tsx
│   │   └── register/page.tsx
│   ├── (dashboard)/        # Route group — shared dashboard layout
│   │   ├── layout.tsx
│   │   ├── page.tsx
│   │   └── settings/page.tsx
│   ├── api/                # Route Handlers (use sparingly)
│   │   └── webhooks/
│   │       └── stripe/route.ts
│   ├── layout.tsx          # Root layout
│   ├── loading.tsx         # Root loading
│   ├── error.tsx           # Root error boundary
│   ├── not-found.tsx       # 404 page
│   └── global-error.tsx    # Global error boundary
├── components/             # Shared components
│   ├── ui/                 # Design system primitives
│   ├── forms/              # Form components
│   └── layouts/            # Layout components
├── lib/                    # Shared utilities
│   ├── db/                 # Database client & queries
│   ├── auth/               # Auth utilities
│   ├── api/                # External API clients
│   └── utils/              # Pure utility functions
├── hooks/                  # Custom React hooks (client-only)
├── actions/                # Server Actions
├── types/                  # TypeScript types
├── styles/                 # Global styles
└── config/                 # App configuration

Structure Rules

  1. Routes are thin — page.tsx imports components, doesn't contain business logic
  2. Components are reusable — never import from app/ into components/
  3. Server Actions get their own directory — organized by domain, not by page
  4. No barrel files (index.ts re-exports) — they break tree-shaking
  5. Colocation for route-specific — _components/ in route folders for non-shared components

Rendering Strategy Decision Matrix

Scenario Strategy Why
Static content (blog, docs, marketing) Static (SSG) Build-time generation, CDN-cached
User-specific dashboard Dynamic Server Fresh data per request
Product listing with prices ISR (revalidate: 3600) Fresh enough, fast delivery
Real-time data (chat, stocks) Client-side + WebSocket Server can't push updates
SEO-critical + fresh data Dynamic Server + streaming Fast TTFB with Suspense
Highly interactive form/wizard Client Component Complex state management

Server vs Client Component Rules

DEFAULT: Server Component (every .tsx is server by default)

Add "use client" ONLY when you need:
✅ useState, useEffect, useRef, useContext
✅ Browser APIs (window, document, localStorage)
✅ Event handlers (onClick, onChange, onSubmit)
✅ Third-party client libraries (framer-motion, react-hook-form)

NEVER add "use client" because:
❌ You want to use async/await (Server Components support this natively)
❌ You're fetching data (fetch in Server Components, not useEffect)
❌ You're importing a server-only library
❌ "It's not working" — debug the actual issue first

The Boundary Pattern

// ✅ CORRECT: Server Component wraps Client Component
// app/dashboard/page.tsx (Server Component)
import { getUser } from '@/lib/auth'
import { DashboardClient } from './_components/dashboard-client'

export default async function DashboardPage() {
  const user = await getUser()  // Server-side data fetch
  return <DashboardClient user={user} />  // Pass as props
}

// _comp
Полный SKILL.md на GitHub

Установить Next.js Production Engineering в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.md

FAQ

Что делает скилл Next.js Production Engineering?

Run through these 8 signals — score 0 (no) or 2 (yes):

Как установить скилл Next.js Production Engineering?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Next.js Production Engineering запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Next.js Production Engineering с