Communitygithub.com

lens-ui

>- Use this skill whenever designing, building, auditing, or refactoring light-mode executive dashboards, SaaS workspaces, operations consoles, planning/Gantt views, workflow canvases, or interactive web apps with Lens UI (Liquid Glass design language). Enforces 3-layer optical glass surfaces, 6 WCAG-verified color themes (Citrus Lime, Solar Orange, Glacier Blue, Emerald Mint, Royal Indigo, Graphite Mono), 6 mandatory shared primitives (zero native select/date inputs), an 8-state honest data contract, and automated anti-regression UI guardrails.

¿Qué es lens-ui?

lens-ui is a Claude Code agent skill that >- Use this skill whenever designing, building, auditing, or refactoring light-mode executive dashboards, SaaS workspaces, operations consoles, planning/Gantt views, workflow canvases, or interactive web apps with Lens UI (Liquid Glass design language). Enforces 3-layer optical glass surfaces, 6 WCAG-verified color themes (Citrus Lime, Solar Orange, Glacier Blue, Emerald Mint, Royal Indigo, Graphite Mono), 6 mandatory shared primitives (zero native select/date inputs), an 8-state honest data contract, and automated anti-regression UI guardrails.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Xensail/lens-ui/tree/HEAD/skills/lens-ui

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Lens UI Skill

Build crisp, high-insight, light-only executive web applications with refined Liquid Glass optical surfaces—and keep them regression-free across dozens of Coding Agent iterations.

When to Activate

  • Creating a new dashboard, workbench, admin console, analytics hub, planning/Gantt view, workflow editor, or interactive learning workspace.
  • Refactoring a generic AI-generated frontend ("hollow big-number cards", native <select> dropdowns, rainbow badges, broken CSS) into a disciplined design system.
  • Configuring multi-theme brand accents without leaking company-specific branding or breaking WCAG 2.1 contrast.
  • Locking accepted UI pages against unintended visual regressions during multi-turn Agent coding.

Mandatory 5-Step Workflow

Step 1 — Pick the Theme Accent & Establish the Viewport-Split Shell

  1. Choose one of the 6 WCAG-verified accent themes via data-accent on <html> or the root shell (see Theme Palettes):
    • citrus-lime — Original studio lime-green accent with deep botanical ink (#84cc16 / #46730c).
    • solar-orange — Executive warm ember balanced against cool pearl glass (#ff5a1f / #c2410c).
    • glacier-blue — Crisp sapphire precision (#2563eb / #1d4ed8).
    • emerald-mint — Calm clinical/fintech precision (#10b981 / #047857).
    • royal-indigo — Composed AI & research studio tone (#4f46e5 / #4338ca).
    • graphite-mono — Swiss monochrome boardroom discipline (#181c22).
  2. Wrap the app in a 100dvh Viewport-Split Shell (.lg-shell):
    • Fixed 68px symmetric topbar (14px top/bottom margin + 40px equal-height floating glass controls: left brand pill, center borderless nav capsule with sliding white glass lens, right utility pills).
    • Independent scrolling main viewport (.lg-viewport-scroll) sharing max-width: 1400px and 24px horizontal padding with the topbar for exact 0px vertical edge alignment.
    • Read Design Constitution for the 3-layer optical recipes, typography, and forbidden anti-patterns.

Step 2 — Enforce the 6 Mandatory Shared Primitives

Never hand-roll ad-hoc tables, bare <select> tags, <input type="date">, or inconsistent modals inside page files. Compose from the 6 primitives specified in Primitives Contract:

  1. <DataTable> / <DataTableShell> — Single-layer frosted table card (#f8fafc header, 13px/14px × 16px cell rhythm, 20px outer column edges, sticky header, built-in client pagination).
  2. <CompactInput> / <PopoverSelect> / <CreatableSelect> / <DatePickerPopover> — 34px quiet controls with 14px pure-white Portal popovers (z-index: 9500, smart viewport flip, auto-search when options.length > 8, circular 1:1 calendar grid). Hard ban on raw <select> and type="date".
  3. <ModalShell> / <ModalGrid> — Viewport-centered 22px modal with frosted backdrop, circular close button, 2-column compact form grid, and Portal-safe popover mounting inside <dialog> / modal containers.
  4. <MetricCard> — Tabular numbers + 8-State Honest Data Contract + 3-layer reading path.
  5. <FilterPills> / <SegmentedControl> — Crisp white-glass capsules with deep charcoal active pill (zero rainbow pill strips).
  6. <CleanList> / <CleanListItem> — Minimalist 1px hairline list with quiet status dots.

Step 3 — Apply Honest Data & Chart Semantics

Before rendering any KPI, badge, or chart, consult Data Honesty & Charts:

  • Implement the 8 explicit data states: loading, ready, empty, not_connected, insufficient, error, stale, forbidden.
  • Follow the 3-layer executive reading path: 10-second headline conclusion (question-style title + value + comparison/denominator) → hover breakdown → click-through drilldown.
  • Never fabricate trendlines from single-point snapshots, never fill missing time points with 0, and never render decorative fake sparklines or heartbeat animations.

Step 4 — Select the Right Scenario Pattern

Match your product screen to the proven multi-scenario blueprints in Scenario Patterns:

  • Workspace Home: Neutral concave-notch header card + semi-circular workload gauge + allocation tracks + clean checklist + mini calendar.
  • Executive Overview: 4-up honest KPI strip + 360° Polar Matrix Ring + equal-height Bento Gallery Cards + 3-station Milestone Rail.
  • Planning & Gantt: 58px real-time sticky capacity strip (quiet <80%, highlighted ≥80%) + sleek 21px borderless pastel timeline bars.
  • Workflow & Variant Studio: Orthogonal 2-axis filter bar (Module × Team/Region) + left-striped execution accordion cards + pure-SVG vector export (zero <foreignObject>).

Step 5 — Run the 5-Gate Anti-Regression Guard Before Delivery

Run the bundled zero-dependency verifier to prove zero style pollution, zero native control regressions, and valid WCAG contrast:

node ./scripts/ui-guard.mjs --root . --css dist/lens-ui.css --tokens tokens/tokens.json --src src

If any gate fails, fix the root cause—never disable lint rules, raise !important ceilings, or bypass frozen module locks without explicit user approval.

Skills relacionados