一键导入
components
React component patterns — server vs client components, styling with cn(), props interfaces. Use when creating page sections or shared components.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
React component patterns — server vs client components, styling with cn(), props interfaces. Use when creating page sections or shared components.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
next-intl i18n conventions for the portfolio — locale routing, message catalogs (3 locales), translation helpers, locale switcher, and middleware locale detection. Use when adding or translating pages, adding message keys, or touching anything under src/i18n or messages.
Create a new page section/block component for this Next.js + next-intl portfolio, following the project's Server/Client split, i18n, and angular-frame design conventions. Use when asked to "add a section", "new block", "create a component for the page", "add About/Projects/Skills-style section", or build any new piece of the portfolio UI.
Add or use shadcn/ui components in this Next.js portfolio (New York style, Tailwind v4). Use when asked to "add a button/dialog/table/form", "install a shadcn component", "use a UI primitive", or build UI from shadcn components. Trigger on "shadcn", "ui component", "add a <component>".
Add or update internationalized (i18n) copy across all locales in this next-intl portfolio. Use whenever introducing or changing any user-facing string, label, section title, or data key. Trigger on "add text", "new copy", "translate", "add a key", "update wording", "i18n", "new section title", or any task that surfaces visible text.
Project file organization, naming conventions, and import patterns. Use when creating new files, organizing code, or deciding where to place modules.
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 stack library, on any non-trivial Next.js API, or when uncertain whether an API is current.
| name | components |
| description | React component patterns — server vs client components, styling with cn(), props interfaces. Use when creating page sections or shared components. |
| paths | src/components/**, src/block/** |
import { getTranslations } from 'next-intl/server'
import { cn } from '@/lib/utils'
interface FeatureCardProps {
className?: string
}
export async function FeatureCard({ className }: FeatureCardProps) {
const t = await getTranslations('Feature')
return (
<div className={cn('angular-tl-br-lg border-border border bg-background p-4', className)}>
<h3 className="text-highlight">{t('title')}</h3>
</div>
)
}
'use client'
import { useState } from 'react'
import { useTranslations } from 'next-intl'
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)
const t = useTranslations('Accordion')
return (
<div className={cn('border-border rounded border', className)}>
<button onClick={() => setIsOpen(!isOpen)}>{t('toggle')}</button>
{isOpen && children}
</div>
)
}
'use client' only for: hooks, event handlers, browser APIs, or
real-time state. Never on a page.tsx — push it into child components.className with cn() from @/lib/utils.any.page.tsx / layout.tsx).src/components/ui/ stay pure — no business logic; do
not hand-edit them unless intentionally customizing.src/block/ (PascalCase) and compose primitives + data
design-tokens skill).getTranslations server / useTranslations client).next/image Image component for images.