一键导入
frontend-ui-engineering
Build production-quality UI that is accessible, performant, and consistent with the design system. Not AI-generated-looking.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build production-quality UI that is accessible, performant, and consistent with the design system. Not AI-generated-looking.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Evaluate code changes across five dimensions before merge. Approve changes that improve overall code health, even if not perfect.
Reduce complexity while preserving identical behavior. The goal is comprehension speed, not line reduction.
Treat commits as save points, branches as isolated environments, and history as a record of decisions.
Search tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns. Trigger immediately for: - UI/Layout: Modals, dialogs, popovers, Glassmorphism/backdrop-filters, anchor positioning, container queries, `:has()`, `:user-valid`. - Scroll/Motion: View Transitions, Scroll-driven animations, scroll parallax/reveals. - Performance: CWV (LCP, INP), content-visibility, Fetch Priority, image optimization. - System/APIs: Local filesystem access, WebUSB, WebSockets sync, WebAssembly widgets. - Frameworks: Adapting layout/styles in React, Vue, Angular. - General Frontend: Forms, autofill, advanced inputs, custom scrollbars, modern component states, etc. DO NOT trigger for: - Backend: Database SQL, ORMs, Express API routes. - Pipelines: CI/CD deployment, Docker, Actions. - Generic: Local scripts (Python/Go tools), ESLint, Git.
Measure before optimizing. Performance work without measurement is guessing.
Decompose work into small, verifiable, dependency-ordered tasks. Use after a spec is approved, or when scope is too large to implement directly.
| name | frontend-ui-engineering |
| description | Build production-quality UI that is accessible, performant, and consistent with the design system. Not AI-generated-looking. |
| when-to-use | Any time you are creating or modifying UI components or sections. |
Build UI "that looks like it was built by a design-aware engineer at a top company — not like it was generated by an AI." Adhere to the actual design system rather than defaulting to generic AI patterns.
Colocate related files — Keep tests, hooks, and types near the component they belong to.
Composition over configuration — Build flexible components through composition, not a growing list of props.
Separate concerns — Data fetching belongs in hooks or server components, not in the render tree of presentational components.
Single responsibility — Each component does one thing. If a component is hard to name, it's doing too many things.
Is this UI-only state? ──────────────────────────────→ useState
Do siblings need it? ────────────────────────────────→ lift state
Is it theme, locale, or auth (read-heavy)? ──────────→ Context
Does it belong in the URL (filter, page, sort)? ─────→ URL state
Is it remote server data? ───────────────────────────→ SWR / React Query
Is it complex client state with many writers? ───────→ Zustand / Redux
Do not default to:
Reference the actual design system (this project uses a green-400 → sky-500 gradient palette, Tailwind with custom utilities in globals.css, and Inter/Calistoga fonts).
alt text (or alt="" for decorative images)Test at these breakpoints: 320px, 768px, 1024px, 1440px.
Apply mobile-first: write base styles for mobile, layer up with md: and lg: prefixes.
Before marking a UI task complete:
prefers-reduced-motionThis is a Next.js 15 + React 19 + Tailwind portfolio. Key patterns:
cn() from @/utils/helpers for conditional Tailwind classessrc/app/globals.css (.gradient-text, .gradient-bg, .hero-glow-ring, .center-abs-obj, etc.)@svgr/webpack; append ?url for a URL stringfont-sans (Inter) and font-serif (Calistoga)motion (Motion for React) — mark the component 'use client' when using hooks or motion