frontend-dev-guidelines
應用 Next.js 和 React 前端開發指南
Également disponible depuis: Dimon94,sickn33,DojoCodingLabs,0Chan-smc,diet103,BrianDai22,0Chan-smc
此技能提供使用 Next.js、React 19 和 shadcn/ui 構建現代前端應用程式的全面指南。涵蓋包括 Server Components、資料獲取、表單、樣式設計和效能優化等重要模式。
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez à utiliser
Tester
Utilisation de "frontend-dev-guidelines". How do I create a new page in Next.js App Router?
Résultat attendu:
- 預設將 app/[route]/page.tsx 建立為 Server Component
- 直接在元件中獲取資料(不需要 hooks)
- 新增 loading.tsx 以實現基於 Suspense 的載入狀態
- 新增 error.tsx 以處理錯誤邊界
- 匯出 metadata 以優化 SEO
- 使用 Tailwind CSS 進行所有樣式設計
Utilisation de "frontend-dev-guidelines". When should I use Server vs Client Components?
Résultat attendu:
- 預設使用 Server Components 以獲得更好的效能
- 僅在需要時才新增 'use client' 指令:
- - React hooks (useState, useEffect, useContext)
- - 事件處理器 (onClick, onChange)
- - 僅瀏覽器 APIs
- 將昂貴的計算保留在伺服器端以減少客戶端套件大小
Utilisation de "frontend-dev-guidelines". How do I style components with shadcn/ui?
Résultat attendu:
- 從 @/components/ui/[component] 匯入元件
- 使用 cn() 工具函式處理條件式類別
- 直接將 Tailwind 類別應用於元素
- 透過元件 props 自訂變體
- 利用 Radix UI 基礎元件實現無障礙功能
Audit de sécurité
SûrThis skill is pure documentation containing markdown files with frontend development guidelines. All 628 static findings are false positives - the scanner detected patterns in documentation (markdown backticks, TypeScript code examples, file path references) that were misidentified as security risks. The skill contains no executable code, no network calls, no file system operations, and no command execution.
Facteurs de risque
⚙️ Commandes externes (480)
⚡ Contient des scripts (19)
📁 Accès au système de fichiers (33)
Score de qualité
Ce que vous pouvez construire
構建 Next.js 應用程式
獲得使用 App Router、Server Components 和現代 React 模式構建 Next.js 應用程式的指導。
學習元件模式
了解何時使用 Client 與 Server Components,以及如何使用 Suspense 實作延遲載入。
整合 Supabase
學習用於身份驗證和資料獲取的伺服器端和客戶端 Supabase 整合模式。
Essayez ces prompts
Show me how to create a new Server Component with shadcn/ui and Tailwind CSS in Next.js App Router
How do I fetch data from Supabase in a Server Component and handle loading states?
Create a login form with React Hook Form and Zod validation using shadcn/ui components
How do I lazy load a heavy DataGrid component with React.lazy and Suspense?
Bonnes pratiques
- 從 Server Components 開始,僅在需要 React hooks 或事件處理器時才新增 'use client'
- 使用 shadcn/ui 元件搭配 Tailwind CSS 以獲得一致且具無障礙性的 UI
- 為每個路由區段實作 loading.tsx 和 error.tsx 檔案
Éviter
- 避免為每個元件新增 'use client' - 這會削弱伺服器渲染的優勢
- 在有 Tailwind CSS 可用時不要使用行內樣式
- 避免在 Client Components 中直接查詢資料庫 - 應改用 Server Components 或 Server Actions