Command Palette

Search for a command to run...

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

nextjs-developer

БесплатноЗапускает вложенные скриптыНе проверен

Expert Next.js development with App Router, Server Components, and modern React patterns

greedychipmunkот greedychipmunk★ 24 звезды на GitHub

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

Next.js Developer Skill

Overview

This skill provides comprehensive expertise in building production-ready Next.js applications using the App Router (Next.js 15+). It covers Server Components, React 19 support, data fetching patterns, routing, API routes, caching, and performance optimization.

Core Capabilities

App Router Architecture

  • Server Components: Default rendering model for optimal performance
  • Client Components: Interactive components with "use client" directive
  • Layouts: Shared UI with preserved state across routes
  • Templates: Fresh instances on navigation (no state preservation)
  • Loading UI: Streaming with loading.tsx files
  • Error Handling: Granular error boundaries with error.tsx

Data Fetching

  • Server-side fetching: Direct database/API access in Server Components
  • Caching strategies: Dynamic rendering by default, explicit caching, and incremental regeneration
  • Revalidation: Time-based and on-demand cache invalidation
  • Parallel fetching: Optimized data loading patterns

Routing System

  • File-based routing: Automatic route generation from file structure
  • Dynamic routes: [param] and catch-all [...slug] patterns
  • Route groups: (folder) for organization without URL impact
  • Parallel routes: @slot for simultaneous route rendering
  • Intercepting routes: Modal patterns with (.), (..), (...)

Server Actions

  • Form handling: Progressive enhancement with action attribute
  • Mutations: Server-side data modifications
  • Revalidation: Automatic cache updates after mutations
  • Optimistic updates: Immediate UI feedback patterns

Implementation Patterns

Project Structure

app/
├── layout.tsx          # Root layout
├── page.tsx            # Home page
├── globals.css         # Global styles
├── (auth)/             # Route group
│   ├── login/page.tsx
│   └── register/page.tsx
├── dashboard/
│   ├── layout.tsx      # Dashboard layout
│   ├── page.tsx        # Dashboard home
│   ├── loading.tsx     # Loading UI
│   ├── error.tsx       # Error boundary
│   └── [id]/page.tsx   # Dynamic route
├── api/
│   └── [route]/route.ts # API routes
└── components/         # Shared components

Component Patterns

Server Component (Default)

// app/posts/page.tsx
async function PostsPage() {
  const posts = await db.posts.findMany()

  return (
    <ul>
      {posts.map(post => (
        <li key={post.id}>{post.title}</li>
      ))}
    </ul>
  )
}

export default PostsPage

Client Component

// app/components/counter.tsx
"use client"

import { useState } from "react"

export function Counter() {
  const [count, setCount] = useState(0)

  return (
    <button onClick={() => setCount(c => c + 1)}>
      Count: {count}
    </button>
  )
}

Data Fetching Patterns

Dynamic Rendering (Default)

// In Next.js 15+, fetch is uncached by default (implicit cache: 'no-store')
async function Page() {
  const data = await fetch('https://api.example.com/data')
  return <div>{data}</div>
}

Static Generation (Opt-in)

// Explicitly opt into caching
async function Page() {
  const data = await fetch('https://api.example.com/data', {
    cache: 'force-cache',
  })
  return <div>{data}</div>
}

Time-based Revalidation

async function Page() {
  const data = await fetch('https://api.example.com/data', {
    next: { revalidate: 3600 }, // Revalidate every hour
  })
  return <div>{data}</div>
}

Note: The client router cache is also uncached by default in Next.js 15, replacing the old 30s/5m defaults.

Server Actions

// app/actions.ts
"use server"

import { revalidatePath } from "next/cache"

export async function createPost(formData: FormData) {
  const title = formData.get("title") as string

  await db.posts.create({ data: { title } })

  revalidatePath("/posts")
}
// app/posts/new/page.tsx
import { createPost } from "@/app/actions"

export default function NewPost() {
  return (
    <form action={createPost}>
      <input name="title" required />
      <button type="submit">Create</button>
    </form>
  )
}

Partial Prerendering (PPR)

  • PPR combines a static shell with dynamic streaming in a single HTTP request.
  • It is production-ready in Next.js 15+ and was experimental in Next.js 14.
  • Enable incremental adoption with experimental.ppr: 'incremental' in next.config.js, or use ppr: true when you want full PPR.
  • Use Suspense boundaries to define dynamic holes inside static shells.
  • Adopt PPR route by route so you can gradually expand coverage without rewriting the whole app.
// app/page.tsx — static shell with dynamic hole
export const experimental_ppr = true

export default function Page() {
  return (
    <main>
      <StaticHeader />
      <Suspense fallback={<ProductSkeleton />}>
        <DynamicProductL
Полный SKILL.md на GitHub

Установить nextjs-developer в Claude Code и Claude Desktop

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

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

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

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

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

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

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

resources/api-routes.mdresources/app-router-patterns.mdresources/data-fetching.mdresources/performance-optimization.mdresources/routing-reference.mdresources/server-components.mdresources/testing-patterns.mdscripts/analyze-bundle.shscripts/build-production.shscripts/create-api-route.shscripts/create-component.shscripts/create-page.shscripts/dev-server.shscripts/run-tests.shscripts/setup-testing.shtemplates/api-route.tstemplates/component-client.tsxtemplates/component-server.tsxtemplates/layout.tsxtemplates/middleware.tstemplates/page-client.tsxtemplates/page-dynamic.tsxtemplates/page-server.tsxtemplates/page.test.tsxtemplates/server-action.ts

FAQ

Что делает скилл nextjs-developer?

Expert Next.js development with App Router, Server Components, and modern React patterns

Как установить скилл nextjs-developer?

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

Скилл nextjs-developer запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить nextjs-developer с