跳到正文
FunCoding

unprompted-ui

Visual composition, surface hierarchy, spatial rhythm, typography calibration, purposeful motion, and Core Web Vitals rules for web interfaces. Load alongside unprompted whenever designing, styling, or refactoring UI components or pages.

Star
504
许可证
MIT
最近提交
2026年12月2日

skills/unprompted-ui/SKILL.md

在 GitHub 上查看

unprompted-ui — Interface Composition, Motion & Web Vitals

Extends core rules U-01–U-04, U-12–U-21, and U-29–U-34. Do not duplicate core checks; apply the structural engineering rules below whenever building visual interfaces.


1. Check Direction First (U-12)

  1. Look for DESIGN.md at the workspace root (or design tokens already committed in CSS/Tailwind config).
  2. If present, obey its palette, font stack, border radii, and grid proportions strictly.
  3. If absent on a greenfield UI task, either invoke unprompted-direction to establish DESIGN.md with the user, or strip all decorative invention, use a neutral architectural baseline, and mark the Delivery Gate DRAFT (NO DESIGN.MD).

2. Spatial Composition & Anti-Template Choreography (U-04, U-13, U-29, U-31)

Replace Predictable Blocks

  • Hero Sections: Never stack centered badge + centered gradient H1 + centered dual buttons. Choose a layout dictated by the product's primary proof:
    • Asymmetric Split (7fr / 5fr or 8fr / 4fr): Left-aligned statement paired with an interactive product state, live telemetry table, or cropped interface frame.
    • Editorial Masthead: Full-width typographic headline anchored to a crisp 1px top/bottom rule with structured metadata columns underneath.
    • Workspace-First: For tools, calculators, and utilities, open directly into the working instrument with zero marketing preamble.
  • Feature & Capability Sections:
    • Replace 3 equal floating drop-shadow cards (U-13) with a shared-hairline matrix (display: grid; gap: 1px; background: var(--border-hairline)), a sticky-left narrative + scrolling-right proof rail, or a numbered specification index (01, 02, 03).
  • Bento Discipline: Only use multi-span bento cells when each cell renders genuinely heterogeneous data density (e.g., a wide time-series chart beside a narrow latency counter)—never stuff uniform text blurbs into arbitrary col-span-2 boxes.

3. Surface, Border & Chromatic Restraint (U-01–U-03, U-14, U-15, U-30)

  • 90 / 10 Chromatic Budget: >= 90% of viewport area belongs to calibrated neutral surfaces and ink; <= 10% belongs to the primary brand/signal accent.
  • Tonal Separation Over Shadows: Establish depth primarily via subtle surface luminance shifts (--bg-canvas -> --bg-surface -> --bg-subtle) and 1px hairlines (10%–14% foreground alpha) rather than heavy multi-layer drop shadows.
  • Semantic Status Colors: Keep destructive (red), warning (amber), and success (green) tokens reserved strictly for real system states—never spend them as random decorative icon backgrounds.
  • SVG & Icon Restraint (U-37): Most headings and feature descriptions need zero icons. Never hand-write decorative <svg> paths from memory, never use 4-point AI sparkle/rocket/lightning badges, and never repeat w-10 h-10 rounded-xl bg-accent/10 icon boxes across a grid. Use established icon libraries (Phosphor, Radix, Lucide, Tabler) strictly for interactive affordances (16px–20px, uniform stroke width, currentColor).
  • Data-Viz Restraint (U-38): Render charts, progress bars, and allocation breakdowns in neutral ink/surface steps plus at most one accent color—never assign a different neon hue to every row or ring.
  • Concentric Radii (U-30): Outer container radius equals inner child radius plus container padding (R_outer = R_inner + P). Prefer crisp radii (0px–10px) unless DESIGN.md specifies pill/organic geometry.

4. Typographic Mechanics (U-16–U-18, U-33)

  • Role Separation: Assign clear structural roles—Display (headlines), Sans (controls & prose), Monospace (timestamps, IDs, code, metrics). Never set an entire page in weight-600 Inter.
  • Optical Scale:
    • Display (>= 2.5rem): line-height: 1.0–1.08, letter-spacing: -0.028em to -0.04em, text-wrap: balance.
    • Section Title (1.5rem–2.25rem): line-height: 1.12–1.2, letter-spacing: -0.02em.
    • Metadata / Eyebrow (0.72rem–0.78rem): uppercase, letter-spacing: 0.06em–0.1em, zero emojis.
    • Prose (0.95rem–1.06rem): line-height: 1.55–1.68, max-width: 60ch–66ch, text-wrap: pretty.
    • Numeric Values (U-18): font-variant-numeric: tabular-nums lining-nums.

5. Motion & Core Web Vitals (U-19–U-21, U-32, U-34)

  • Compositor-Friendly Motion: Animate transform and opacity (and crisp 120ms–180ms color/border shifts on controls). Use fast-out settling curves (cubic-bezier(0.22, 1, 0.36, 1)).
  • Tactile Feedback (U-32): Buttons and clickable rows need distinct :hover, :active (transform: translateY(1px)), :focus-visible, and :disabled states.
  • Performance Baseline:
    • LCP: Never hide above-the-fold hero copy or primary imagery behind opacity: 0 entrance animations or client-only JS hydration delays; preload or prioritize the hero image (fetchpriority="high"), lazy-load offscreen media (loading="lazy").
    • CLS (U-34): Reserve exact aspect-ratio boxes for every image, icon, font fallback, and async skeleton.
    • INP: Keep click/input handlers free of synchronous layout thrashing; debounce expensive filter/search recalculations.

See deeper examples in ../unprompted/references/typography-and-color-tokens.md and ../unprompted/references/layouts-and-microinteractions.md.

相似的 Skill

prototype

MAmattpocock/skills337k近 7 天新增 4,978 个 star

angular-developer

AFaffaan-m/ECC315k近 7 天新增 4,381 个 star

官方

firecrawl-build-scrape

FIfirecrawl/firecrawl215k近 7 天新增 5,595 个 star

官方

brand-guidelines

ANanthropics/skills203k近 7 天新增 3,265 个 star

精选

frontend-design

为界面确定视觉方向和字体,避免模板化的默认样式。

ANanthropics/skills203k近 7 天新增 3,265 个 star

精选

web-artifacts-builder

用 React、Tailwind 和 shadcn/ui 构建多组件页面。

ANanthropics/skills203k近 7 天新增 3,265 个 star