AGENT SKILL

frontend-design

Use when building, matching, redesigning, auditing, or performance-tuning a web UI. Covers React/Next.js boundaries, mockup/spec implementation, visual-system selection, design-system QA, and selective performance guidance.

License 许可
MIT
最近更新
2026-08-20
Stars
★ 0
Forks
0

01 前言 Front Matter

name
frontend-design
description
Use when building, matching, redesigning, auditing, or performance-tuning a web UI. Covers React/Next.js boundaries, mockup/spec implementation, visual-system selection, design-system QA, and selective performance guidance.

02 资源文件 77

03 SKILL.md 正文

Frontend Design

<HARD-GATE> Before editing, classify exactly one mode: new UI, mockup/spec implementation, existing redesign, post-build audit, or React performance.

  • For an existing redesign, preserve behavior, information architecture, copy, and API contracts unless the user explicitly expands scope. Audit before changing; migrate component-by-component with real data.
  • The explicit user brief chooses the visual grammar. Do not blend aesthetics. If the brief conflicts, ask one targeted question.
  • In React/Next.js, use a server component by default. Add "use client" only for state, effects, events, or browser APIs, and keep that boundary small. </HARD-GATE>

Route to the Smallest Reference

Mode First action Read
New UI Inspect the existing stack and establish tokens/components Relevant references/design/, references/tailwind/, references/shadcn/, or references/animation/ file only
Mockup/spec implementation The design is the spec; extract tokens and identify missing states references/workflows/mockup-to-code.md
Existing redesign Screenshot all states; name what works and what must not change references/workflows/existing-redesign.md
Post-build audit Measure token usage and implementation against the current spec references/workflows/design-system-audit.md
React performance Measure first, then open only the relevant category/rule references/react-performance/overview.md and selected references/react-performance/rules/ file

Choose One Visual Grammar

  • Base/default: typography establishes hierarchy; spacing uses a fixed scale; restrained color and whitespace carry the design. Read references/aesthetics/base.md.
  • High-end: only for an explicit premium/luxury brief. Use real type families, specific photography, generous space, and purposeful motion. Read references/aesthetics/high-end.md.
  • Minimalist: for explicit clean/editorial intent. Warm monochrome, flat bento groupings, minimal decoration. Read references/aesthetics/minimalist.md.
  • Industrial/brutalist: for explicit terminal/raw/utilitarian intent. Mono type, hard edges, hairlines, functional color, and exposed system chrome. Read references/aesthetics/industrial-brutalist.md.

Build and Verify

  1. Inspect repository conventions and dependencies. Reuse existing primitives; use shadcn/ui when present. Ask before installing. Tailwind is an implementation tool, not the visual system.
  2. Define typography, color, spacing, radius, motion, and state tokens. Build typography/layout primitives, then atomic components, composites, sections, and pages.
  3. Preserve accessible semantics, keyboard/focus behavior, responsive layouts, and reduced motion. Cover loading, error, empty, disabled, hover, and focus states.
  4. In React, colocate data with its consumer, avoid useEffect for derived state, and control bundle size through selective imports and code-splitting. Use React.memo only after measurement.
  5. Run behavior tests, compare screenshots to the current spec at representative widths, and verify with real data. Audit findings use severity: BLOCKER, SHOULD-FIX, NIT.

Do not claim completion from aesthetic judgment alone; report the behavior check, visual comparison, accessibility states, and remaining mismatch.

04 同仓库更多 Skills

MinhDuyDEV
MinhDuyDEV/md-pikit

writing-skills

Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization. Includes complete pressure testing methodology.

★ 0
MinhDuyDEV
MinhDuyDEV/md-pikit

verification-before-completion

Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

★ 0
MinhDuyDEV
MinhDuyDEV/md-pikit

typescript-coding-standards

Use when writing, refactoring, or reviewing TypeScript code that needs strong domain modeling, typed errors, schema parsing, safe adapters, test seams, or maintainable module boundaries.

★ 0
MinhDuyDEV
MinhDuyDEV/md-pikit

test-driven-development

Use when implementing a feature, bugfix, or behavior-changing refactor — require a failing behavior test before production code, then make the smallest change that passes.

★ 0
MinhDuyDEV
MinhDuyDEV/md-pikit

source-driven-development

Use when unfamiliar libraries, dependency internals, external APIs, framework behavior, migrations, or current ecosystem guidance require official documentation, version-matched source, read the tests, and cited evidence.

★ 0
MinhDuyDEV
MinhDuyDEV/md-pikit

security-and-hardening

Use when auditing security, implementing authentication or authorization, handling secrets, or validating data across external trust boundaries.

★ 0