ワンクリックで
frontend-architecture-nextjs
App Router, Server/Client Components, Server Actions, and Tailwind tokens for Next.js
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
App Router, Server/Client Components, Server Actions, and Tailwind tokens for Next.js
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Syncs Telegram supergroup topics into local task files and GitHub issues, using embedded Python scripts for deterministic JSON state management. Preserves raw bilingual messages verbatim, injects refactored prompts, and correlates codebase context.
100% Jetpack Compose, MVI (UDF), Hilt, and SQLDelight for token-efficient, zero-hallucination Android development.
NestJS, Prisma ORM, Vertical Slice Architecture, and Strict TypeScript for zero-hallucination backend development.
Expo Managed Workflow, Expo Router, NativeWind, and Strict TypeScript for zero-hallucination cross-platform apps.
Automatically generates decentralized task files based on manager instructions.
Idiomatic Go, Clean Architecture, and Gin routing best practices
| name | frontend-architecture-nextjs |
| description | App Router, Server/Client Components, Server Actions, and Tailwind tokens for Next.js |
"use server") instead of manual API routes for mutations. This keeps the AI's context localized to the component/action pair, eliminating network fetching boilerplate."use client"). Keep them as leaf nodes to prevent passing complex state across the network boundary, which confuses the AI.h-[13px]). Rely on predefined tailwind.config.ts tokens to ensure visual consistency across AI generations.Scaffold Next.js single-page or hybrid apps using these principles:
app/ directory (layout.tsx, page.tsx)."use client" at the top. Use them only for user interactivity (hooks, event handlers, local states). Keep them at leaf-level."use server" directive. Banned: setting up custom API routes for simple form handling.h-[12px]) or inline styles. Declare custom scales inside tailwind.config.ts and refer to them.<header>, <main>, <footer/>) and next/image alt tags.src/
├── app/ # App Router (Next.js 13+)
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ ├── (auth)/ # Route group: auth pages
│ │ ├── login/
│ │ │ ├── page.tsx
│ │ │ └── login-form.tsx # Client component
│ │ └── register/
│ │ └── page.tsx
│ ├── dashboard/
│ │ ├── layout.tsx # Dashboard-specific layout
│ │ ├── page.tsx
│ │ └── settings/
│ │ └── page.tsx
│ └── api/ # API route handlers (if needed)
│ └── users/
│ └── route.ts
├── components/ # Shared components
│ ├── ui/ # Primitive UI components (Button, Input)
│ └── features/ # Feature-specific components
│ └── auth/
│ └── AuthGuard.tsx
├── lib/ # Shared utilities, API clients, DB
│ ├── db.ts
│ └── utils.ts
├── actions/ # Server Actions
│ └── auth.actions.ts
└── styles/
└── globals.css # Tailwind directives & custom CSS
| Artifact | Convention | Example |
|---|---|---|
| Directories (routes) | kebab-case | /user-settings/ |
| Components | PascalCase | UserAvatar.tsx |
| Utilities / libs | camelCase | formatDate.ts |
| Server Actions | kebab-case with .action suffix | auth.actions.ts |
| CSS classes | Tailwind utility classes (prefer inline) | "flex items-center gap-2" |
| Tailwind custom tokens | kebab-case in tailwind.config | brand-primary |
app/ Directory)app/ directory. The legacy pages/ directory is deprecated.(group-name) to organize routes without affecting the URL path.page.tsx (and optionally layout.tsx, loading.tsx, error.tsx)."use client" at the top. Keep them as leaf components — do not fetch data directly; receive it as props from a parent server component.Server Component (fetches data) → passes data as props → Client Component (renders + interactivity)
src/actions/."use server" at the top of the action file (or inline with "use server" in a function).useActionState (or useFormState) for progressive enhancement.tailwind.config.ts — do not use raw CSS values.style props unless dynamic values are required.aria-label, or aria-labelledby).<nav>, <main>, <button>, <a>) instead of <div> soup.<label> or aria-label.next/image for images (provides alt enforcement).@axe-core/react or the Lighthouse a11y audit on every page.| Layer | Test Type | Framework | File Naming |
|---|---|---|---|
| Utility functions | Unit | Vitest | utils.test.ts |
| Client components | Component | Vitest + Testing Library | UserAvatar.test.tsx |
| Server Actions | Integration | Vitest | auth.actions.test.ts |
| Page rendering | E2E | Playwright | login.spec.ts |
@testing-library/react with Vitest for component tests — test behavior, not implementation.msw (Mock Service Worker) to mock API routes in tests.jest-axe or Playwright's built-in a11y snapshot.