Command Palette

Search for a command to run...

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

nextjs

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

Next.js 16 App Router performance, caching, server components, server actions, routing, and codebase-hygiene best practices — plus a category-major…

pproencaот pproenca★ 231 звезда на GitHub

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

Next.js 16 App Router Best Practices

Comprehensive Next.js 16 App Router guide for AI agents. Contains 45 rules across 9 categories, prioritized by impact from critical (build optimization, caching strategy) through to cross-cutting codebase hygiene (dedup, dead routes, boundary coherence). Reflects Next.js 16 changes: 'use cache' directive replacing implicit caching, revalidateTag(tag, cacheLife) requirement, proxy.ts replacing middleware.ts, Turbopack persistent caching, App Router conventions.

Rule files describe pattern shapes (not API names) and open with a "Shapes to recognize" section listing 2–4 syntactic disguises the same break can wear. Selected high-value rules (those whose disguises are most common in practice — 'use cache', parallel-fetching, dynamic-imports, server-action-forms, client-boundary, server-vs-client-fetching) include an extra concrete "In disguise" incorrect/correct example pair to teach pattern detection beyond the grep-friendly cases.

When to Apply

  • Writing new Next.js 16 App Router code
  • Auditing or modernizing a Next.js codebase — single file, PR, or whole repo (see references/_review-algorithm.md)
  • Migrating from Next.js 15 to 16 (implicit caching → 'use cache', middleware.ts → proxy.ts, revalidateTag single-arg → with cacheLife)
  • Configuring caching strategies with 'use cache', unstable_cache, revalidateTag, revalidatePath
  • Implementing Server Components and parallel/colocated data fetching
  • Setting up parallel routes, intercepting routes, prefetching, proxy.ts
  • Creating Server Actions for form handling and mutations
  • Tuning 'use client' boundaries to minimize client bundle
  • Finding codebase-level issues that single-file rules can't see: duplicated server fetchers, near-duplicate routes/layouts, dead routes, 'use client' propagation across the route tree, prop-shape drift (see Category 9)

How to Review or Refactor a Codebase

When the user asks to review, refactor, modernize, or audit Next.js code — single file or whole repo — follow references/_review-algorithm.md. Do not improvise.

Four non-negotiables from that doc:

  1. Two modes — never refuse a whole-repo audit. Pick Mode A (scoped, ≤~20 files) or Mode B (whole-tree: inventory pass + targeted sweeps + full Category 9).
  2. Judgment over grep. Each rule names a pattern shape, not a syntactic marker. Read each rule's Shapes to recognize section before sweeping — grep finds the easy violations and misses the high-value ones (a layout marked 'use client' for one button; TanStack Query fetching initial page data; a route handler doing the work of a Server Action; a hand-rolled cache layer mimicking 'use cache'; sequential fetches hidden across parent/child Server Components).
  3. Category-major, not file-major — with forcing functions. Sweep one category at a time across all in-scope files in priority order (CRITICAL → … → CROSS-CUTTING). The algorithm requires a scope declaration, per-category progress lines, and a final coverage table (category × file/bucket, cells ∈ {clean, N findings, n/a}). A missing category in the output is immediately visible.
  4. Codebase-level findings come from Category 9. Single-file rules can't tell you "these two routes should be one" or "this server action is dead." Category 9 (Codebase Hygiene) sweeps the full inventory at the end and produces remove / dedup / reuse / consolidate findings.

Single-file ad-hoc questions ("is this caching strategy right?") can go straight to the relevant rule. The algorithm exists for the multi-file and whole-repo cases.

Rule Categories

# Category Impact Rules Key Topics
1 Build & Bundle Optimization CRITICAL 5 Turbopack, optimizePackageImports, dynamic imports, barrel files, serverExternalPackages
2 Caching Strategy CRITICAL 6 'use cache', revalidateTag+cacheLife, fetch options, segment config
3 Server Components & Data Fetching HIGH 6 Parallel fetching, streaming, colocation, preload, no-client-fetch, error handling
4 Routing & Navigation HIGH 5 Parallel routes, intercepting routes, prefetching, proxy.ts, notFound()
5 Server Actions & Mutations MEDIUM-HIGH 5 Server actions, useFormStatus, action-result errors, useOptimistic, revalidation
6 Streaming & Loading States MEDIUM 5 Suspense placement, loading.tsx, error.tsx, skeleton matching, nested Suspense
7 Metadata & SEO MEDIUM 4 generateMetadata, sitemap.ts, robots.ts, opengraph-image.tsx
8 Client Components LOW-MEDIUM 4 'use client' boundary, children pattern, hydration mismatch, next/script
9 Codebase Hygiene LOW-MEDIUM 5 **Dedup server fetchers, route consolidation, dead routes/actions, 'use client' propagatio
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

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

AGENTS.mdREADME.mdassets/templates/_template.mdmetadata.jsonreferences/_review-algorithm.mdreferences/_sections.mdreferences/action-error-handling.mdreferences/action-optimistic-updates.mdreferences/action-pending-states.mdreferences/action-revalidation.mdreferences/action-server-action-forms.mdreferences/build-barrel-files.mdreferences/build-dynamic-imports.mdreferences/build-external-packages.mdreferences/build-optimize-package-imports.mdreferences/build-turbopack-config.mdreferences/cache-fetch-options.mdreferences/cache-react-cache.mdreferences/cache-revalidate-path.mdreferences/cache-revalidate-tag.mdreferences/cache-segment-config.mdreferences/cache-use-cache-directive.mdreferences/client-children-pattern.mdreferences/client-hydration-mismatch.mdreferences/client-third-party-scripts.mdreferences/client-use-client-boundary.mdreferences/cross-boundary-coherence.mdreferences/cross-component-consolidation.mdreferences/cross-dead-code.mdreferences/cross-extract-shared-logic.mdreferences/cross-prop-shape-drift.mdreferences/meta-generate-metadata.mdreferences/meta-opengraph-images.mdreferences/meta-robots.mdreferences/meta-sitemap.mdreferences/route-intercepting-routes.mdreferences/route-not-found.mdreferences/route-parallel-routes.mdreferences/route-prefetching.mdreferences/route-proxy-ts.md

FAQ

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

Next.js 16 App Router performance, caching, server components, server actions, routing, and codebase-hygiene best practices — plus a category-major review/refactor algorithm with codebase-level (remove/dedup/reuse) findings. This skill should be used when writing Next.js 16 App Router code, configuring caching with 'use cache', building Server Components, setting up parallel/intercepting routes, configuring next.config.js OR proxy.ts, OR auditing/refactoring a Next.js codebase (single file or whole repo). This skill does NOT cover generic React 19 patterns (use react skill) or non-Next.js server rendering.

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

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

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

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

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

Сравнить nextjs с