You are an expert in TypeScript, Node.
Add this skill
npx mdskills install PatrickJS/cursor-nextjs-react-tailwindComprehensive Next.js/React ruleset with clear conventions and modern best practices
1- You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, and Tailwind and Framer Motion.23- Code Style and Structure45 - Write concise, technical TypeScript code with accurate examples.6 - Use functional and declarative programming patterns; avoid classes.7 - Prefer iteration and modularization over code duplication.8 - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).9 - Structure files: exported component, subcomponents, helpers, static content, types.1011- Naming Conventions1213 - All components should go in src/components and be named like new-component.tsx14 - Use lowercase with dashes for directories (e.g., components/auth-wizard).15 - Favor named exports for components.1617- TypeScript Usage1819 - Use TypeScript for all code; prefer interfaces over types.20 - Avoid enums; use maps instead.21 - Use functional components with TypeScript interfaces.2223- Syntax and Formatting2425 - Use the "function" keyword for pure functions.26 - Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.27 - Use declarative JSX.2829- UI and Styling3031 - Use Shadcn UI, and Tailwind for components and styling.32 - Implement responsive design with Tailwind CSS; use a mobile-first approach.3334- Performance Optimization3536 - Minimize 'use client', 'useEffect', and 'setState'; favor React Server Components (RSC).37 - Wrap client components in Suspense with fallback.38 - Use dynamic loading for non-critical components.39 - Optimize images: use WebP format, include size data, implement lazy loading.4041- Key Conventions4243 - Use 'nuqs' for URL search parameter state management.44 - Optimize Web Vitals (LCP, CLS, FID).45 - Limit 'use client':46 - Favor server components and Next.js SSR.47 - Use only for Web API access in small components.48 - Avoid for data fetching or state management.49 - Follow Next.js docs for Data Fetching, Rendering, and Routing.50 - While creating placeholder images as a part of your seed data, use https://placekitten.com/51 - Place both the /app and /components folders under a /src directory. This organization offers several benefits:52 - It helps maintain a clean and organized project structure.53 - It allows for easier navigation and management of components and pages.54 - It adheres to common industry standards, making it easier for other developers to understand and contribute to the project.55 - It provides a clear separation between application logic (in /src/app) and UI components (in /src/components), improving code readability and reusability.56 - It simplifies the process of creating new pages and components, as you can easily find the corresponding files in the /src directory.57 - It makes the project more modular and easier to scale as the application grows.58 - It adheres to the principle of separation of concerns, where different aspects of the application are handled by different directories.5960## Components Organization6162Within the /src/components folder, consider organizing components by type or feature:6364By Type: Group components like forms, buttons, layout elements, etc.6566By Feature: For larger applications, group components related to specific features or domains6768For example:6970 /src/components71 ├── /ui72 │ ├── /Button73 │ ├── /Modal74 │ └── /Card75 ├── /forms76 │ ├── /TextField77 │ └── /Select78 └── /layout79 ├── /Navbar80 └── /Footer8182- Private Components: For components used only within specific pages, you can create a _components folder within the relevant /app subdirectory.8384- Shared Components: The /src/components folder should contain reusable components used across multiple pages or features.8586- Modular Approach: As your project grows, consider adopting a more modular structure, where each feature or domain has its own folder containing components, hooks, and utilities specific to that feature.8788
Full transparency — inspect the skill content before installing.