Create a new Next.js project with FSD (Feature-Sliced Design) architecture, TypeScript, Tailwind CSS, ESLint (flat config), Prettier, and Husky. Use when user asks to create/scaffold/initialize a Next.js project with FSD architecture, or when they want a production-ready Next.js boilerplate with modern tooling setup.
Scaffolds a production-ready Next.js project with FSD architecture, TypeScript, Tailwind, and modern tooling. Use when users request to create or initialize a Next.js app with Feature-Sliced Design.
/plugin marketplace add rladydqls99/claude-marketplace/plugin install frontend@yongbin-skillThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/configs/CLAUDE.mdassets/configs/eslint.config.mjsassets/configs/globals.cssassets/fsd-structure/app/components/page.tsxassets/fsd-structure/entities/README.mdassets/fsd-structure/entities/_example/index.tsassets/fsd-structure/features/README.mdassets/fsd-structure/features/_example/index.tsassets/fsd-structure/shared/config/size.tsassets/fsd-structure/shared/index.tsassets/fsd-structure/shared/lib/cn.tsassets/fsd-structure/shared/server.tsassets/fsd-structure/shared/ui/badge.tsxassets/fsd-structure/shared/ui/button.tsxassets/fsd-structure/shared/ui/card.tsxassets/fsd-structure/shared/ui/checkbox.tsxassets/fsd-structure/shared/ui/dialog.tsxassets/fsd-structure/shared/ui/icon-button.tsxassets/fsd-structure/shared/ui/input.tsxassets/fsd-structure/shared/ui/password-input.tsxCreate a production-ready Next.js project with FSD architecture and modern tooling.
pnpm create next-app@latest <project-name> --typescript --tailwind --eslint --app --src-dir --import-alias "@/*" --use-pnpm
cd <project-name>
# Dev dependencies
pnpm add -D prettier eslint-config-prettier eslint-plugin-prettier husky lint-staged prettier-plugin-tailwindcss
# ESLint 9 dependencies
pnpm add -D @eslint/js typescript-eslint eslint-plugin-react-hooks @next/eslint-plugin-next eslint-import-resolver-typescript eslint-plugin-import
# React Compiler
pnpm add -D babel-plugin-react-compiler eslint-plugin-react-compiler
# Runtime dependencies
pnpm add date-fns zustand es-toolkit react-hook-form tw-animate-css lucide-react tailwind-merge clsx zod @hookform/resolvers @tanstack/react-query @tanstack/react-query-devtools
# Radix UI primitives
pnpm add @radix-ui/react-dialog @radix-ui/react-popover @radix-ui/react-tooltip @radix-ui/react-select @radix-ui/react-checkbox @radix-ui/react-slot @radix-ui/react-tabs
Update next.config.ts to enable React Compiler:
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
reactCompiler: true,
};
export default nextConfig;
Copy assets/fsd-structure/ to src/ directory. The structure uses .gitkeep files to preserve empty folders in git.
Copy these config files from assets/configs/ to project root:
eslint.config.mjs - ESLint flat config with FSD rules.prettierrc - Prettier config.prettierignore - Prettier ignore patternssrc/app/globals.cssReplace content with assets/configs/globals.css (shadcn-compatible with light/dark mode).
pnpm exec husky init
Replace .husky/pre-commit content with:
pnpm lint-staged
Add these scripts and lint-staged config:
{
"scripts": {
"lint": "next lint",
"lint:fix": "next lint --fix",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
"*.{json,md,css}": ["prettier --write"]
}
}
Copy assets/configs/CLAUDE.md to project root as both CLAUDE.md and AGENT.md.
Ensure these path aliases exist:
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"],
"@/shared": ["./src/shared"],
"@/shared/server": ["./src/shared/server"],
"@/entities/*": ["./src/entities/*"],
"@/features/*": ["./src/features/*"],
"@/widgets/*": ["./src/widgets/*"],
"@/views/*": ["./src/views/*"]
}
}
}
pnpm lint
pnpm format:check
Run the formatter to ensure all generated and copied files follow the project style.
pnpm format
pnpm lint:fix
| Layer | Purpose | Import Rule |
|---|---|---|
views/ | Page-level components | Can import from widgets, features, entities, shared |
widgets/ | Complex UI blocks | Can import from features, entities, shared |
features/ | User interactions | Can import from entities, shared |
entities/ | Business entities | Can import from shared only |
shared/ | Reusable utilities | Cannot import from other layers |
Each slice (entities, features, widgets, views) has the following internal structure:
<slice-name>/
├── index.ts # Public API (barrel file)
├── api/ # API calls, server actions
├── model/ # Types, validation schemas, default values
├── ui/ # React components
├── lib/ # Utilities, custom hooks
└── config/ # Slice-specific configuration
| Directory | Purpose |
|---|---|
api/ | API calls, server actions, data fetching |
model/ | TypeScript types, Zod schemas, default values, constants |
ui/ | React components (presentational and container) |
lib/ | Utility functions, custom hooks |
config/ | Slice-specific settings, feature flags, constants |
shared/
├── index.ts # Main barrel (client-safe exports)
├── server.ts # Server-only exports
├── api/ # Shared API utilities (fetch wrapper, etc.)
├── config/ # Global configuration
├── lib/ # Utilities (cn, formatters, etc.)
├── model/ # Shared types, validation schemas
└── ui/ # Common UI components (Button, Input, etc.)
shared/index.ts - Main barrel for shared (client-safe exports)shared/server.ts - Server-only exports (use "use server" or server components)<layer>/<slice>/index.ts (e.g., features/auth/index.ts)This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.