一键导入
components
React component patterns — server vs client components, styling with cn(), props interfaces. Use when creating UI or shared components.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
React component patterns — server vs client components, styling with cn(), props interfaces. Use when creating UI or shared components.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Design-token and theming conventions for the Starter — semantic CSS variables in theme.css, Tailwind v4 @theme registration in globals.css, dark mode, and the Figma token-sync flow. Use when extracting repeated design values, adding/editing tokens, theming, or syncing tokens from Figma.
API service layer with ky/apiClient and Next.js API routes with Zod validation. Use when creating services, API endpoints, or HTTP calls.
Project file organization, naming conventions, and import patterns. Use when creating new files, organizing code, or deciding where to place modules.
Conventions when no auth provider is bundled. Use when adding authentication or guarding routes.
Use before writing or referencing any stack library — fetches version-accurate docs via the context7 MCP server so call signatures, hooks, and APIs match what is installed. Invoke on first usage of any non-none slot library, on any non-trivial Next.js API, or when uncertain whether an API is current.
TanStack Query patterns for data fetching — useQuery, useMutation, query keys, cache invalidation. Use when fetching server data or creating data hooks.
| name | components |
| description | React component patterns — server vs client components, styling with cn(), props interfaces. Use when creating UI or shared components. |
| paths | src/components/** |
import { cn } from '@/lib/utils'
interface FeatureCardProps {
className?: string
title: string
}
export function FeatureCard({ className, title }: FeatureCardProps) {
return (
<div className={cn('rounded-lg border p-4', className)}>
<h3>{title}</h3>
</div>
)
}
'use client'
import { useState } from 'react'
import { cn } from '@/lib/utils'
import type { ReactNode } from 'react'
interface AccordionProps {
className?: string
children: ReactNode
}
export function Accordion({ className, children }: AccordionProps) {
const [isOpen, setIsOpen] = useState(false)
return (
<div className={cn('rounded border', className)}>
<button onClick={() => setIsOpen(!isOpen)}>Toggle</button>
{isOpen && children}
</div>
)
}
'use client' only when you need: hooks, event handlers, browser APIs, or real-time state'use client' to page.tsx — push it down to child componentsclassName with cn() from @/lib/utilsany or untyped objectspage.tsx and layout.tsxsrc/components/ui/) must be pure — no business logicsrc/components/shared/) may compose UI components with business logic