一键导入
architecture
Project file organization, naming conventions, and import patterns. Use when creating new files, organizing code, or deciding where to place modules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Project file organization, naming conventions, and import patterns. Use when creating new files, organizing code, or deciding where to place modules.
用 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.
React component patterns — server vs client components, styling with cn(), props interfaces. Use when creating page sections or shared components.
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 | architecture |
| description | Project file organization, naming conventions, and import patterns. Use when creating new files, organizing code, or deciding where to place modules. |
| paths | src/** |
src/
├── app/ # Next.js App Router
│ ├── globals.css # Tailwind v4 @theme + angular-clip design system
│ ├── layout.tsx # Root: html/body, providers, metadataBase
│ ├── page.tsx # Redirect-only → /<locale>
│ ├── not-found.tsx
│ ├── robots.ts · sitemap.ts · manifest.ts # SEO surfaces (read site.ts)
│ └── [locale]/ # Locale segment: layout.tsx + page.tsx
├── config/ # site.ts — single source of SEO facts
├── block/ # Page-level sections (PascalCase): Home, About, …
├── components/
│ ├── ui/ # shadcn/ui primitives (generated)
│ └── *.tsx # Shared components (e.g. theme-provider)
├── data/ # Static JSON content keyed to translations
├── i18n/ # next-intl: routing.ts, request.ts, navigation.ts
├── lib/ # utils.ts (cn) and helpers
├── assets/ # Imported image assets
├── styles/ # Extra CSS (e.g. glitch.css)
└── middleware.ts # next-intl locale middleware
There are no services/, types/, lib/store/, lib/api/, or app/api/
directories — the portfolio has no backend, data-layer, or client-store concerns.
| Type | Pattern | Example |
|---|---|---|
| Page section | PascalCase .tsx | Projects.tsx |
| shadcn primitive | kebab .tsx (generated) | components/ui/card.tsx |
| Shared component | kebab-case .tsx | theme-provider.tsx |
| Hook | use + camelCase | useTheme |
| Data file | camelCase .json | project.json |
| Translation key | dot.namespaced | projects.skinbattle.title |
Always use the @/ alias. Group imports: 1) react/next, 2) external libs,
3) internal @/. For navigation, import from @/i18n/navigation (not raw
next/link / next/navigation).
import { useState } from 'react'
import type { Metadata } from 'next'
import { useTranslations } from 'next-intl'
import { Link } from '@/i18n/navigation'
import { cn } from '@/lib/utils'
any, proper interfaces and generics.page.tsx and layout.tsx.const always, let only when reassignment is needed, never var.src/config/site.ts — never hardcode the site URL/locales.tailwind.config.* — the design system is CSS-first in globals.css.