Command Palette

Search for a command to run...

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

nextjs-app-architecture

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

Build or audit Next.js 16 App Router apps using a next-beats-style React Server Components architecture. Use when scaffolding a new app, adding a feature…

Asymmetric-alот Asymmetric-al★ 354 звезды на GitHub

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

Next.js App Architecture

This repository (Asymmetric-al/core)

Subordinate to installed Next.js docs (apps/<app>/node_modules/next/dist/docs/ or .next-docs/), docs/ai/rules/frontend.md, docs/ai/skills/nextjs-app-router/SKILL.md, docs/ai/skills/cache-components/SKILL.md, and docs/guides/architecture/data-access-boundary.md.

Apply only to the requested scope. An audit does not authorize a repository-wide async-page refactor. Core's Stream / Cache / explicit Block decisions remain controlling; synchronous composition is this skill's default, not a ban on deliberately qualified async routes.

This skill is for page composition, Suspense placement, leaf client boundaries, and feature-owned UI. It is not a license to invent a new app folder scheme or move business database logic.

Repo mapping:

  • Privileged reads, writes, payments, webhooks, and vendor calls stay in packages/api.
  • Browser-visible table data uses @asym/database/hooks only in 'use client' leaves when a collection exists. Async Server Components call published server-read subpaths instead.
  • Shared UI stays in @asym/ui / exact base-maia. Existing apps/*/features/ directories are UI composition, not a new query layer.
  • All apps already run cacheComponents: true and partialPrefetching: true. Do not "enable Cache Components." Follow Instant Navigation (Stream / Cache / explicit Block) in docs/ai/rules/frontend.md.
  • Get API mechanics from the installed Next.js docs, not preview.nextjs.org or remembered APIs.
  • Do not add Zustand. Use the installed TanStack Query / TanStack DB patterns from docs/ai/rules/frontend.md.
  • Do not regenerate or expand the managed root AGENTS.md.

Core remaps — apply these at every numbered step. Upstream file-placement lines are vendor text, not permission to add a query layer.

  • Feature-owned means UI composition only. Server feature components select a published @asym/api/* read; client leaves use approved browser hooks or API routes. A plain server helper is not a callable Server Action. Do not create features/<domain>/<domain>-queries.ts or features/<domain>/<domain>-actions.ts at all.
  • Mutation boundary: A client leaf calls an existing approved hook/API route, or an authenticated 'use server' adapter in an established app boundary that validates input and delegates business work to packages/api. It never directly imports an ordinary API server command.
  • Cache ownership: Server tags and invalidators stay in packages/api/src/shared/cache-tags.ts or their API-owned domain module. Feature-local files own browser query keys/options only; coordinate the two explicitly without an API-to-app import.
  • Prerequisite: Prefer the project's installed Next.js docs (apps/<app>/node_modules/next/dist/docs/ or .next-docs/). Do not create or refresh root AGENTS.md from preview.nextjs.org.

Refresh: references/upstream.md.

A workflow for building and auditing Next.js 16+ App Router apps so they follow one consistent, feature-sliced RSC architecture like next-beats.

Follow the workflow below step by step — apply the Core remaps at each step. Upstream *-queries.ts / *-actions.ts lines are vendor text: CORE: skip file creation. Load the reference a step names for the decision it depends on. Get framework mechanics (API signatures, config options, hook contracts) from the linked docs — don't restate or improvise them.

Prerequisite

Before changing a Next.js app, read version-matched docs from apps/<app>/node_modules/next/dist/docs/ or .next-docs/. Do not create or refresh root AGENTS.md from preview.nextjs.org. Then use this skill for architecture decisions.

Architecture target

Build pages that describe the loading experience, not pages that act like route loaders:

  • app/**/page.tsx and layout.tsx are synchronous composition surfaces: static chrome, section headings, <Suspense> boundaries, error boundaries, and transition wrappers.
  • Feature components own their reads on the server. They receive minimal stable inputs (id, slug, handle, parsed filter values) or already-fetched records, never raw params / searchParams.
  • Queries and actions live in the feature folder. Components import queries; client leaves import actions directly. (CORE: skip file creation. Server components call published API read subpaths; client leaves use approved browser hooks/API routes or authenticated Server Action adapters.)
  • When server tags and client query keys describe the same feature data, a pure feature-local cache contract owns those identities. (CORE: server tags remain API-owned; feature-local contracts own browser keys only, with explicit coordination.)
  • Stable chrome, wrappers, and skeletons preserve layout: cards/panels stay outside Suspense, and fallbacks swap only the data-dependent body.

Invariants (what every change must satisfy)

The non-negotiables. The workflow prod

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

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

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

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

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

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

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

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

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

LICENSEREADME.mdmetadata.jsonreferences/cache-components.mdreferences/components.mdreferences/example.mdreferences/feature-folders.mdreferences/instant-navigation.mdreferences/pages-suspense.mdreferences/queries-actions.mdreferences/single-page-applications.mdreferences/testing.mdreferences/upstream.mdreferences/ux-patterns.md

FAQ

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

Build or audit Next.js 16 App Router apps using a next-beats-style React Server Components architecture. Use when scaffolding a new app, adding a feature, reviewing an existing app, refactoring route-loader-shaped pages into feature-owned async server components, deciding where queries/actions/components live, keeping pages synchronous with `params.then()`, placing Suspense boundaries, choosing the client/server boundary, designing skeletons, preventing CLS, or following Cache Components Instant Navigation. Also use when the user asks about RSC composition, components receiving IDs instead of route params, `'use cache'`, `cacheTag`, `updateTag`, static-shell prerendering, or making an app easier for AI agents to modify.

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

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

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

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

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

Сравнить nextjs-app-architecture с