Agent Skills › mocasus/unprompted › unprompted-ui

unprompted-ui

GitHub

提供Web界面视觉构图、空间节奏、排版校准及Core Web Vitals规范,指导UI组件设计与重构,强调遵循设计规范与克制的美学原则。

skills/unprompted-ui/SKILL.md mocasus/unprompted

触发场景

设计或构建网页界面 对UI组件进行样式调整 重构前端页面布局

安装

npx skills add mocasus/unprompted --skill unprompted-ui -g -y
更多选项

不安装直接使用

npx skills use mocasus/unprompted@unprompted-ui

指定 Agent (Claude Code)

npx skills add mocasus/unprompted --skill unprompted-ui -a claude-code -g -y

安装 repo 全部 skill

npx skills add mocasus/unprompted --all -g -y

预览 repo 内 skill

npx skills add mocasus/unprompted --list

SKILL.md

Frontmatter
{
    "name": "unprompted-ui",
    "license": "MIT",
    "version": "3.2.0",
    "metadata": {
        "author": "mocasus",
        "category": "design",
        "openclaw": {
            "emoji": "📐",
            "requiredBins": [
                "node"
            ]
        },
        "repository": "https:\/\/github.com\/mocasus\/unprompted"
    },
    "description": "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.",
    "compatibility": [
        "windows",
        "macos",
        "linux"
    ]
}

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. Tactile Controls, Spring Motion & Core Web Vitals (U-19–U-21, U-30, U-32, U-34)

  • Machined Button Depth (Never Ship Dead Flat Rectangles):
    • Avoid lifeless single-hex <button style="background:#333"> blocks unless DESIGN.md explicitly mandates stark brutalism (brutalist).
    • Anodized Primary Buttons: Combine a subtle vertical luminance step (linear-gradient(180deg, ...)), a 1px top inner specular highlight (inset 0 1px 0 rgba(255,255,255,0.2)), a crisp 1px outer bezel, and a tight contact shadow (0 2px 4px rgba(0,0,0,0.16)).
    • Ceramic Secondary / Ghost Keycaps: Use a subtle light-catching surface (#FFFFFF -> var(--bg-subtle)), inset 0 1px 0 #FFFFFF, and a 1px hairline ring (0 0 0 1px var(--border-hairline), 0 1px 2px rgba(0,0,0,0.06)).
    • Concentric <kbd> Keycaps (U-30): Nest keyboard hints (⌘K, ↵) inside buttons with concentric radii (R_kbd = R_btn - padding) and subtle keycap lip depth.
  • Physics-Grounded Micro-Interactions:
    • Animate compositor-safe properties (transform, opacity) plus crisp 140ms surface/border transitions on cubic-bezier(0.22, 1, 0.36, 1) or spring curves (cubic-bezier(0.16, 1, 0.3, 1)).
    • Tactile Press & State Morph (U-32): Buttons compress on :active (transform: translateY(1px) scale(0.985)). Async actions morph smoothly in-place (Idle -> 1.5px monochrome spinner -> Confirmed icon crossfade from scale(0.85) blur(2px) to scale(1) blur(0)) instead of flashing jarring full-screen spinners.
    • Sliding Segmented Pills: Give tab/view switchers a recessed track (inset 0 1px 2px rgba(0,0,0,0.06)) and an elevated thumb gliding smoothly via transform: translateX(...).
  • 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.

版本历史

  • 10cd954 当前 2026-12-03 02:10

同 Skill 集合

skills/unprompted-a11y/SKILL.md
skills/unprompted-code/SKILL.md
skills/unprompted-copywriting/SKILL.md
skills/unprompted-direction/SKILL.md
skills/unprompted-mobile/SKILL.md
skills/unprompted/SKILL.md

元信息

文件数
0
版本
10cd954
Hash
602eada9
收录时间
2026-12-03 02:10

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-12-03 06:06
浙ICP备14020137号-1