UX/UI Studio

Inspecteur en direct du DOM/WCAG en pixels pour Chromium CDP sans dépendance, outil d’annotation visuelle des écarts pour écrans Retina 2x et suite de compétences de conception UX/UI composée de 10 modules pour agents de codage.

Documentation

UX/UI Studio: Give your coding agent a senior designer's eye

CI Status Live Showcase BlackOwl242/uxui-studio MCP server v1.3.0 TypeScript MCP Server 10 skills 1,010 rules Zero dependencies MIT License

Why this exists · How it works · Live Redline · Install & MCP · GitHub Action · 10 skills · Tiếng Việt


Why this exists

Ask a coding agent for a settings page, a checkout flow, or a confirmation modal with no design guidance. The TypeScript compiles, the tests pass, and you still end up fixing the same twenty things by hand at midnight:

  • Cards nested inside cards inside cards, with a 24px inner corner pinched up against a 24px outer corner.
  • A purple-to-indigo badge floating above a centered four-line paragraph in low-contrast gray.
  • A 14px input with no label (just a placeholder that vanishes on click) that forces Safari on iOS to zoom the whole page.
  • Nine slightly different shades of gray competing on one screen, and dark mode built by dumping black drop shadows onto #000000.
  • A destructive dialog that asks "Are you sure?" with [Yes] and [No] given the exact same visual weight.

Experienced product designers don't fix those by "making it pop." They work from concrete numbers and habits: concentric corner math (R_outer = R_inner + padding), one filled primary button per view, left-aligned body copy capped around 65ch, three deliberate ink weights, dark surfaces that step up in lightness as they come closer to you, and 44pt hit targets in the thumb zone.

UX/UI Studio gives your coding agent that eye. One command (/uxui), ten focused skills underneath, 1,010 concrete rules across 142 product design topics, and a zero-dependency static linter that checks your UI files before you open the browser.

Without /uxuiWith /uxui
Storefront built without /uxui: centered purple pill badge, nested card borders, ALL CAPS heading, .00 price, hidden select dropdown, competing purple buttons, and three identical icon-tile cardsStorefront built with /uxui: asymmetric editorial layout, full-bleed lead sofa photo with two material detail crops, 1-tap upholstery swatches, 4-column dimension strip, single primary CTA, and concrete delivery window

Same brief: a furniture storefront page for the Calder 3-Seat Sofa. Left to itself, an unguided build reaches for the familiar template: a centered purple pill badge, cards nested inside cards, ALL CAPS title, .00 price clutter, five fabric colors hidden inside a <select> dropdown, two competing purple buttons, and three identical icon-tile boxes underneath. With /uxui, a lead gallery photo is paired with two material detail crops, fabric colors become 1-tap visual swatches, dimensions split into a scannable 4-column strip, Add to bag stands alone as the primary action, and delivery states a concrete window (Arrives Dec 3–6).


How it works

You don't need to memorize ten skill names. Put /uxui in front of what you're already asking your agent to do:

/uxui build a team billing page with plan switching and invoice history
/uxui audit src/components
/uxui redesign src/features/checkout
/uxui system apps/web
/uxui copy src/auth

Or skip the slash command altogether. Because each skill has scoped routing triggers, touching a navbar, form, design token file, or empty state automatically pulls in the matching playbook.

ModeWhen to reach for it
/uxui <request>Building a new screen or component from scratch. Chains UX psychology and state planning, 8pt grid layout, typography and color tokens, component anatomy, and a 6-point pre-ship check.
/uxui audit [path]Reviewing existing UI. Scores hierarchy, spacing, contrast, and hit targets, then runs audit_ui_tokens.mjs on your source files.
/uxui redesign [target]Cleaning up a cluttered screen. Strips redundant card borders, promotes what matters, fixes form flow, and tightens alignment.
/uxui system [target]Setting up Primitive -> Semantic -> Component tokens (Light + Dark surface elevation) and six-state atomic components.
/uxui copy [target]Fixing vague labels, empty states, 404s, permission prompts, and error messages (what happened + why + next step) in your target language.

Narrow targets produce sharper work: /uxui redesign the pricing cards will always beat "redesign my whole app."


What it catches

Most prompt snippets stop at "use clean modern styling." UX/UI Studio gives your agent hard constraints it can verify:

  • Geometry that lines up optically. Nested corners follow R_outer = R_inner + padding. Spacing runs on 8n px (8, 16, 24, 32, 48, 64px) with 4px optical steps for tight icon-and-label pairs, keeping internal padding smaller than external gaps so related items stay grouped. Mobile layouts respect 375×812pt safe zones and the bottom Home Indicator.
  • All six states, never just the populated screenshot. Every interactive control accounts for default, hover, focus-visible, active, loading, and disabled. Data views ship with real empty states (what this space is + why it's empty + one clear action), skeleton loaders, and recovery paths when requests fail.
  • Dark mode built on surface luminance. No pure #000000 canvas, no neon accents vibrating on OLED, and no heavy black shadows on dark cards. Depth comes from progressive lighter surfaces (#121212 base -> #1E1E1E card -> #2C2C2C floating menu) paired with desaturated accents.
  • Typography that holds up outside English. Body copy stays left-aligned at 45–75ch (1.4–1.6 line-height) with Three-Ink contrast (#1F2328 / #59636E / #818B98 on light). Line-height and container width leave room for stacked Vietnamese diacritics (ệ, ử, ẫ), +35% German/French text expansion, CJK rhythm, and logical CSS properties (ps-*, pe-*) for RTL.
  • Static + Live Browser DOM auditing (zero npm dependencies). Static source scans catch bad hex values, missing focus-visible rings, 100vh mobile traps, and sub-16px inputs across React, Vue, Svelte, Astro, CSS, Flutter, SwiftUI, and Compose. Point the same CLI at a running dev server (localhost:3000) and it attaches to your local Chrome or Edge over DevTools Protocol to measure real rendered pixels: 44×44pt hit boxes, computed WCAG 2.1 contrast ratios, pinched nested border radii, unlabeled inputs, horizontal overflow, and cramped Vietnamese diacritic line-heights:
npx github:BlackOwl242/uxui-studio init --preset saas --hooks                  # scaffold uxui-tokens.css, DESIGN.md & Stop hook
npx github:BlackOwl242/uxui-studio audit ./src                                 # static source scan
npx github:BlackOwl242/uxui-studio audit http://localhost:3000 --annotate      # live DOM audit + 2x Retina redline PNG
npx github:BlackOwl242/uxui-studio audit http://localhost:3000 --matrix        # 4-state Light/Dark x Mobile/Desktop Quad-Grid PNG
npx github:BlackOwl242/uxui-studio audit ./src --sarif > ui.sarif              # GitHub Actions code scanning

Animated terminal loop: live Chromium CDP audit catches 19 pixel defects, /uxui repairs the sheet, and re-audit passes with 0 issues

Visual Redline Critique (--annotate)

Pass --annotate to draw numbered callout pins directly onto a 2x Retina screenshot over raw Chromium DevTools Protocol (node:http, zero npm packages), giving multimodal coding agents exact visual + coordinate feedback:

Live Redline on Default AI Output (19 findings)Rebuilt with /uxui (0 issues · WCAG AA Pass)
Mobile checkout screen annotated with 6 redline callout pins catching 1.91:1 low contrast, 1.04 clipped Vietnamese line-height, and 34px inputsRebuilt mobile checkout screen verified at 0 issues across 21 DOM elements

4-State Matrix Inspection (--matrix) & True Backdrop Contrast

In v1.3.0, --matrix sweeps Mobile Light (375×812), Mobile Dark, Desktop Light (1440×900), and Desktop Dark plus real CDP Tab focus-ring checks in a single headless Chrome session (~2.5s), while two-pass <canvas> p20 backdrop sampling (TRUE_PIXEL_CONTRAST) measures actual rendered contrast over photos, gradients, and backdrop-filter: blur() glass alongside DOM aesthetic geometry (GRAY_SOUP_DETECTED, PROXIMITY_VIOLATION, ALIGNMENT_DRIFT):

4-State Matrix Inspection comparing Mobile Light, Mobile Dark, Desktop Light, and Desktop Dark in a single 2x Retina studio board


Supported tools & stacks

24 supported AI coding agents, design tools, and UI frameworks

Works wherever your agent reads plugin.json or SKILL.md files: Google Antigravity, Claude Code, Cursor, OpenAI Codex, GitHub Copilot, VS Code, Windsurf, and Zed, generating and auditing UI across Figma, Framer, Storybook, Penpot, React, Next.js, Vue, Nuxt, Svelte, Astro, Tailwind CSS (v3 & v4), shadcn/ui, Radix UI, Flutter, SwiftUI, and Jetpack Compose.


Installation

One-line install for any coding agent (npx)

Auto-detects your project or global setup across Google Antigravity, Claude Code, Cursor, OpenAI Codex, GitHub Copilot, VS Code, Windsurf, and Zed with zero external dependencies:

# Install into the current project (.agents/skills, plus .claude / .cursor if present)
npx github:BlackOwl242/uxui-studio install

# Or install globally across every coding agent detected on your machine
npx github:BlackOwl242/uxui-studio install --global

Target specific harnesses or verify your environment at any time:

npx github:BlackOwl242/uxui-studio install --global --agents claude,cursor,codex
npx github:BlackOwl242/uxui-studio doctor

Native Antigravity CLI & skills.sh

# Google Antigravity native plugin CLI
agy plugin install https://github.com/BlackOwl242/uxui-studio

# Or via the skills.sh ecosystem
npx skills add BlackOwl242/uxui-studio

Zero-Dependency MCP Server (uxui-studio mcp)

Expose uxui_audit_live, uxui_audit_static, uxui_list_skills, and uxui_read_skill directly to any MCP-compatible agent over stdio so it inspects its own live localhost renders automatically after editing CSS:

# Claude Code
claude mcp add uxui-studio -- npx -y github:BlackOwl242/uxui-studio mcp

Or add to mcp_config.json / .cursor/mcp.json:

{
  "mcpServers": {
    "uxui-studio": {
      "command": "npx",
      "args": ["-y", "github:BlackOwl242/uxui-studio", "mcp"]
    }
  }
}

Try & Inspect on Glama

You can also view the BlackOwl242/uxui-studio MCP server listing on Glama to:

  • browse the server's tools (uxui_audit_live, uxui_audit_static, uxui_list_skills, uxui_read_skill) and check its quality score
  • test the server online using MCP Inspector

GitHub Action

Gate pull requests against WCAG contrast regressions, removed focus rings, cramped hit targets, and pinched radii with action.yml:

- name: Audit UI & Accessibility
  uses: BlackOwl242/uxui-studio@v1
  with:
    target: ./src
    sarif-file: uxui-results.sarif

For live rendered checks against a preview server or built HTML page:

- name: Live Chromium Redline Check
  uses: BlackOwl242/uxui-studio@v1
  with:
    target: http://localhost:3000
    live: "true"
    viewport: "mobile"
    annotate-file: artifacts/uxui-redline.png

What's inside

Dumping a megabyte of design rules into a system prompt wrecks both latency and instruction following. UX/UI Studio splits the knowledge into three layers: ~3 KB of YAML headers at startup, 4–6 KB when a skill activates, and 1.25 MB of deep reference manuals pulled in only for the specific problem in front of your agent.

SkillWhat your agent learns from itReference manual
uxuiMaster /uxui router, 4-phase build order, and core UI math cheatsheetmaster-cheatsheet-and-index.md
uxui-laws-and-psychology14 UX laws (Fitts, Hick, Jakob, Miller 7±2, Proximity, Von Restorff, Peak-End, Tesler, Doherty <400ms) and multi-state planningmodule-01-laws-and-glossary.md (15 topics)
uxui-grid-layout-spacing4/8/12 column grids, 8pt spacing, concentric radii, 375×812pt iOS safe areas, stripping container clutter, bento grids, and 15 hero layoutsmodule-02-grids-layouts-spacing.md (13 topics)
uxui-typography-and-colorLeft-aligned readability, vetted UI fonts, i18n diacritic/CJK/RTL rules, Three-Ink hierarchy, 60-30-10 color balance, and #121212 -> #383838 dark modemodule-03-typography.md · module-04-color-and-dark-mode.md (15 topics)
uxui-components-buttons-cardsS/M/L button anatomy (2:1 padding, one primary CTA, 6 states), 44×44pt thumb targets, 5-tier segmented controls, 6 icon laws, and clean card densitymodule-05-core-components.md (14 topics)
uxui-navigation-and-patternsTopbars (<=6–8 items), mega menus, collapsible SaaS sidebars, mobile tab bars (3–5), search UX, and choosing between modals, sheets, grids, carousels, radios, and dropdownsmodule-06-navigation-search-patterns.md (12 topics)
uxui-forms-states-uxwritingSingle-column forms, >=16px inputs, #79747E (>=3:1) borders, (Optional) vs *, empty states, skeletons, optimistic UI, and Bad -> Good -> Great UX copymodule-07-forms-and-states.md · module-08-ux-writing.md (13 topics)
uxui-clean-polish-qa35 side-by-side Do vs Don't UI fixes, the Squint Test, gray-count discipline, hairline vs shadow calibration, and audit_ui_tokens.mjsmodule-09-clean-ui-qa-checklist.md (35 topics)
uxui-redesign-figma-systems7 full before/after product redesign teardowns, 3-tier W3C design tokens, modern visual directions, and step-by-step Figma progressive blur, glow, and 3D glass recipesmodule-10-redesign-case-studies.md · module-11-figma-systems-trends.md (17 topics)
uxui-portfolio-and-resourcesOutcome-driven senior case study structure, free vs paid design tool matrices, and a curated directory of 150+ typography, color, icon, 3D, and motion sitesmodule-12-portfolio-and-resources.md (8 topics)

Tiếng Việt

Nhờ AI dựng giao diện thì nhanh, nhưng gần như lần nào mở trình duyệt lên bạn cũng phải tự ngồi dọn lại một đống lỗi quen mặt: thẻ lồng trong thẻ ba bốn lớp, góc bo trong cấn vào góc bo ngoài, đoạn văn bốn dòng căn giữa lởm chởm, ô nhập 14px không có nhãn làm Safari trên iPhone tự phóng to màn hình, chữ tiếng Việt như ể, ệ, ẫ bị xén mất dấu vì line-height quá khít, hay hộp thoại xoá dữ liệu chỉ hỏi cụt lủn "Bạn có chắc không? [Có] [Không]".

Designer cứng tay không sửa những chỗ đó bằng cảm tính. Họ làm theo con số và nguyên tắc rõ ràng: góc bo đồng tâm (R_ngoài = R_trong + padding), nhịp khoảng cách 8pt, mỗi màn hình chỉ giữ một nút chính tô đặc, chữ nội dung căn trái trong khoảng 45–75 ký tự với ba sắc độ chữ tách bạch, vùng chạm tối thiểu 44pt, và chế độ tối nâng lớp bằng độ sáng bề mặt (#121212 -> #1E1E1E -> #2C2C2C) thay vì đổ bóng đen lên nền #000000.

UX/UI Studio đưa trực tiếp con mắt nghề đó vào coding agent của bạn (Google Antigravity, Claude Code, Cursor, OpenAI Codex, GitHub Copilot, VS Code, Windsurf, Zed). Bộ công cụ viết bằng TypeScript thuần không phụ thuộc thư viện ngoài, gồm 10 skill, 1.010 quy tắc thực chiến trải trên 142 chủ đề thiết kế (song ngữ Anh - Việt, hỗ trợ sẵn Tiếng Việt, Anh, Nhật/Hàn/Trung, Đức/Pháp và RTL), đi kèm trình kiểm tra 2 tầng: quét mã nguồn tĩnh và mở thẳng trình duyệt ẩn đo pixel thật trên localhost (đo hộp chạm 44×44pt, tính độ tương phản WCAG thực tế, bắt góc bo lệch tâm và phát hiện cắt dấu tiếng Việt).

Cài đặt 1 dòng cho mọi công cụ

# Cài cho dự án hiện tại (.agents/skills, .claude, .cursor)
npx github:BlackOwl242/uxui-studio install

# Cài toàn cục cho mọi AI Agent đang có trên máy (Antigravity, Claude, Cursor, Codex, Windsurf...)
npx github:BlackOwl242/uxui-studio install --global

# Hoặc cài trực tiếp qua Antigravity CLI
agy plugin install https://github.com/BlackOwl242/uxui-studio

Cách gọi

Bạn không cần nhớ tên từng skill lẻ. Gõ /uxui trước yêu cầu (hoặc cứ mô tả bình thường, agent sẽ tự khớp skill phù hợp):

/uxui dựng trang thanh toán gói Pro có đổi chu kỳ tháng/năm và lịch sử hoá đơn
/uxui audit src/components
/uxui redesign src/features/checkout
/uxui system apps/web
/uxui copy src/auth

Local development

npm run build                                    # compile src/*.ts -> dist/*.mjs (zero dependencies)
npm run validate                                 # check plugin.json, 10 SKILL.md headers, and links
npm run doctor                                   # inspect detected agents and local headless browser
npm run audit:ui -- ./src                        # static source scan
npm run audit:ui -- http://localhost:3000        # live Chromium CDP pixel & WCAG contrast audit
npm run sync                                     # build, validate, and sync into Google Antigravity

License

MIT