Command Palette

Search for a command to run...

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

nextjs-ops

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

Next.js App Router operations - the server/client boundary, the two caching models, Server Actions security, streaming, proxy.ts and deployment. Use for…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

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

Next.js Operations

The App Router as an operational surface: what crosses the server/client boundary, which caching model the app is actually on, why a response is stale, and what a Server Action really is on the wire. React itself belongs to react-ops; styling to tailwind-ops; the CMS above to payloadcms-ops; the Workers runtime below to cloudflare-ops / hono-ops. This skill is the framework.

Verified against Next.js 16.x (2026-08-30) — [email protected], docs snapshot 2026-08-25, React 19. Semantics changed materially at 15.0 (fetch uncached by default, request APIs async) and again at 16.0 (Cache Components, proxy.ts, revalidateTag signature). Establish the app's version before answering any caching question — the right answer for 14 is the wrong answer for 16.

Staleness check: python scripts/check-nextjs-facts.py --offline asserts the version-bearing facts are still named in the prose and that the currency note above matches the catalog; --live confirms each package's npm major. Catalog: assets/nextjs-facts.json.

Orient first: which model is this app on?

Three greps, before any advice. Getting this wrong is the single largest source of confidently-wrong Next.js answers.

node -p "require('next/package.json').version"          # the major decides everything
grep -rn "cacheComponents" next.config.*                # Cache Components on/off
ls proxy.* middleware.* src/proxy.* src/middleware.* 2>/dev/null
Signal Model in force Read
cacheComponents: true Cache Components — nothing cached unless 'use cache' says so; PPR is the default rendering references/cache-components.md
No cacheComponents (16.x default) Previous model — fetch uncached by default, route-segment config, unstable_cache references/caching-model.md
Next.js ≤ 14 Legacy — fetch cached by default; most "why is this stale" bugs live here references/caching-model.md

Decision Tree

What are you doing with Next.js?
│
├─ "It's serving stale data" / "my change doesn't appear"
│  └─ Orient (above) → references/caching-model.md (debug ladder)
│
├─ Deciding what to cache, for how long, and how to bust it
│  └─ references/cache-components.md (use cache, cacheLife, cacheTag)
│     or references/caching-model.md if cacheComponents is off
│
├─ "use client" errors, serialization failures, context, env leaks
│  └─ Below + references/server-client-boundary.md
│
├─ Mutations: Server Action vs Route Handler, auth, validation
│  └─ Below + references/server-actions.md
│
├─ Data fetching, waterfalls, Suspense/loading.tsx, what streams
│  └─ references/data-fetching-streaming.md
│
├─ Routes, async params, layouts, parallel/intercepting routes, metadata
│  └─ references/routing-and-rendering.md
│
├─ proxy.ts (formerly middleware.ts), matchers, edge vs Node runtime
│  └─ references/proxy-and-runtimes.md
│
├─ Shipping it: self-host, Docker, multi-instance, CDN, Cloudflare
│  └─ references/deployment.md
│
├─ Upgrading 14/15 -> 16, or Pages Router -> App Router
│  └─ references/upgrading.md
│
├─ Fonts, scripts, images, bundle size, build speed
│  └─ references/optimization.md
│
├─ Testing it (and what simply cannot be unit-tested)
│  └─ references/testing.md
│
└─ Auditing an existing app for the known footguns
   └─ python scripts/audit-app-router.py <project-root>

The boundary is a module graph, not a folder

'use client' marks an entry point into the client module graph. Everything that file imports — and everything those files import — is bundled for the browser, whether or not it carries the directive. Components passed through as children or props are not imported by it, so they stay on the server and arrive as already-rendered output.

That single asymmetry explains most boundary design:

// ❌ marking the layout client pulls the whole tree into the bundle
'use client'
export default function Layout({ children }) { /* ... */ }

// ✅ keep the layout on the server; make only the interactive leaf a client entry
export default function Layout({ children }) {
  return <nav><Logo /><Search /></nav>   // Search is the 'use client' file
}

A serialization error at the boundary is the real error. Props crossing server → client are serialized into the RSC payload; a class instance, a function, a URL, a Symbol or a Date-bearing ORM row cannot make the trip. The fix is almost never "wrap it in a Client Component" — it is to stop sending the un-serializable thing and send the shape the UI renders. That is also the security fix: returning a raw database row to the client publishes every column on it.

Two more rules that fall out of the same graph:

  • Providers wrap {children}, not the tree. A 'use client' provider that accepts children keeps the subtree on the server. Render it as deep as it can go so the static parts stay static.
  • Environment poisoning is silent. Only `NEXT_PUB
Полный SKILL.md на GitHub

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

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

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

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

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

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

Read
Write
Bash
Grep
Glob

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

assets/next.config.template.tsassets/nextjs-facts.jsonreferences/cache-components.mdreferences/caching-model.mdreferences/data-fetching-streaming.mdreferences/deployment.mdreferences/optimization.mdreferences/proxy-and-runtimes.mdreferences/routing-and-rendering.mdreferences/server-actions.mdreferences/server-client-boundary.mdreferences/testing.mdreferences/upgrading.mdscripts/audit-app-router.pyscripts/check-nextjs-facts.py

FAQ

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

Next.js App Router operations - the server/client boundary, the two caching models, Server Actions security, streaming, proxy.ts and deployment. Use for: next.js, nextjs, app router, use cache, cacheComponents, Cache Components, cacheLife, cacheTag, revalidateTag, updateTag, revalidatePath, unstable_cache, PPR, partial prerendering, stale data in production, use client, use server, server actions, RSC payload, serialization boundary, next/headers, async params, cookies not awaited, loading.tsx, Suspense boundary, generateStaticParams, ISR, proxy.ts, middleware.ts deprecated, edge runtime, next build vs next start, self-hosting Next.js, standalone output, Failed to find Server Action, upgrade to Next.js 16, Pages Router to App Router, force-static, force-dynamic, next/font, next/script, bundle size, testing server components.

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

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

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

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

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

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