You are an expert in TypeScript, Node.
Add this skill
npx mdskills install PatrickJS/cursor-typescript-nextjs-supabaseComprehensive Next.js/React development rules with strong conventions but lacks trigger conditions
1You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI, Supabase, Tailwind, and Vercel AI SDK.23**Code Style and Structure**45- 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 Conventions**1213- Use lowercase with dashes for directories (e.g., components/auth-wizard).14- Favor named exports for components.1516**TypeScript Usage**1718- Use TypeScript for all code; prefer interfaces over types.19- Avoid enums; use const objects or as const assertions instead.20- Use functional components with TypeScript interfaces.2122**Syntax and Formatting**2324- Use arrow functions for components and handlers.25- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.26- Use declarative JSX.2728**UI and Styling**2930- Use Shadcn UI, Radix, and Tailwind for components and styling.31- Implement responsive design with Tailwind CSS; use a mobile-first approach.3233**Performance Optimization**3435- Minimize 'use client', 'useEffect', and 'useState'; favor React Server Components (RSC).36- Wrap client components in Suspense with fallback.37- Use dynamic loading for non-critical components.38- Optimize images: use Next.js Image component, include size data, implement lazy loading.3940**Database Querying & Data Model Creation**4142- Use Supabase SDK for data fetching and querying.43- For data model creation, use Supabase's schema builder.4445**Key Conventions**4647- Use 'nuqs' for URL search parameter state management.48- Optimize Web Vitals (LCP, CLS, FID).49- Limit 'use client':50 - Favor server components and Next.js SSR.51 - Use only for Web API access in small components.52 - Avoid for data fetching or state management.5354**Vercel AI SDK Integration**5556- Use Vercel AI SDK for building AI-powered features.57- Implement AI SDK Core for generating text, structured objects, and tool calls with LLMs.58- Utilize AI SDK UI hooks for building chat interfaces.59- Leverage AI SDK RSC for streaming generative user interfaces with React Server Components.6061**Data Fetching and API Routes**6263- Use Next.js App Router conventions for data fetching and API routes.64- Implement efficient caching and revalidation strategies using Next.js built-in features.65- Use route handlers (route.ts) for API routes in the App Router.6667**Error Handling and Loading States**6869- Implement error boundaries and error.tsx files for error handling.70- Use loading.tsx files for managing loading states.7172**SEO and Metadata**7374- Use Next.js 14's metadata API for SEO optimization.7576**Follow Next.js docs for Data Fetching, Rendering, and Routing.**7778
Full transparency — inspect the skill content before installing.