Skills

Claude Code skills that route UI design tasks to specialized audit, ideate, and overhaul agents.

Skills are SKILL.md files that extend Claude Code with structured workflow logic. The ui-lab skill intercepts front-end design requests and routes them to the right sub-agent — keeping design feedback focused, consistent, and grounded in the UI Lab design system.

Install the skill by placing the skills/ui-lab/ directory in your project root, then invoke it with /ui-lab in Claude Code.

How invocation works

1

Trigger

Type /ui-lab followed by your request in Claude Code. The skill activates whenever you're working on UI design — auditing existing components, ideating new layouts, or migrating to UI Lab.

/ui-lab audit the navbar component in src/components/Navbar.tsx
2

Route

Claude reads SKILL.md (120 lines) and matches your intent to a sub-agent. Routing is keyword-driven: "audit", "what's wrong", "violations" → audit agent; "what should this have", "what am I missing" → ideate agent; "overhaul", "migrate", "swap to UI Lab" → overhaul agent.

3

Load context

The routed sub-agent reads its workflow file and any reference documents it needs. An audit loads ~950 lines across 5 files before touching any code.

4

Query the registry

The agent makes targeted MCP calls to validate components and discover patterns live:

search_components("button")
→ Button — interactive, pressable button element

get_component("button", detail="api")
→ onPress: (e) => void
   isDisabled: boolean
   variant: "filled" | "outlined" | "ghost"

search_components("input")
→ Input — text input field with label support

Native HTML elements found in the code are checked against this registry to produce CRITICAL adherence violations with specific replacement instructions.

5

5. Return structured output

The audit agent returns a star-rated report for all 6 pillars. The ideate agent returns a structured design brief. The overhaul agent presents a plan and waits for confirmation before touching any files.

Scenarios

Auditing an existing UI

You have a component that grew organically — Tailwind everywhere, a few <button> elements, some hex colors. You want to know exactly what's wrong before touching it.

Say: "Audit this component" · "What's wrong with this design?" · "Check for design system violations"

Claude reads workflows/audit.md, loads the three reference files, then validates every component against the registry via MCP. The output is a star-rated report across 6 pillars — no code generated, just specific violations with exact fix instructions.

## DESIGN AUDIT REPORT

### 1. Design System Adherence
■□□□□
Native elements and raw Tailwind throughout; design system effectively bypassed.
- `<button>` (Save, Cancel): [CRITICAL] Native button → replace with `<Button>`
- `onClick` on button: [CRITICAL] React DOM handler → use `onPress` (React Aria)
- `bg-white`: [WARNING] Raw neutral → `bg-background-950`
- `text-gray-900`: [WARNING] Tailwind neutral → `text-foreground-300`

### 2. Layout & Spacing
■■■■□
Minor inconsistency.
- Toolbar: [SUGGESTION] gap-2 between controls → increase to gap-3 for breathing room

...

## Summary
**Overall:** Design system bypassed at the component level; replace native elements first.
**Total violations:** 8 (2 critical, 4 warnings, 2 suggestions)
**Priority focus:** Adherence (native elements), then token migration.

Getting holistic design feedback

You're designing a new screen or questioning whether an existing layout is right. You want to know what the UI should contain, not what's wrong with what's there.

Say: "What am I missing in this layout?" · "What should this screen have?" · "Design critique on this component"

Claude reads workflows/ideate.md, reasons about the domain context, then runs 3–5 MCP search queries to discover relevant patterns and elements before inventorying what's present, what's absent, and what should be removed.

DESIGN BRIEF

DOMAIN CONTEXT
This is a data filtering interface for a developer-focused admin dashboard.
Users arrive here mid-task, expecting minimal friction to narrow a dataset.
They're in a focused, goal-directed mindset — every extra decision costs attention.

ELEMENT INVENTORY
Search input        | Text filter          | Load-bearing: YES  | Value: HIGH
Status select       | Lifecycle filter     | Load-bearing: YES  | Value: HIGH
Drafts checkbox     | Boolean toggle       | Load-bearing: NO   | Value: MEDIUM
[ABSENT] Clear all  | Reset filters        | Load-bearing: YES  | Value: HIGH
[ABSENT] Filter row | Shows active filters | Load-bearing: YES  | Value: HIGH

GAPS
CRITICAL:
- No clear filters: users can't reset without manually unsetting each control

LAYOUT COHERENCE:
- Search and filters are vertically stacked; should be horizontal toolbar
  (→ Filter Toolbar pattern shows grouped control arrangement)

TOP 5 SUGGESTIONS
1. Group search + filters in a horizontal toolbar (Group component)...

Migrating to UI Lab

You have an existing project using raw HTML and Tailwind. You want the UI Lab component layer without redesigning anything or touching product logic.

Say: "Overhaul our project UI with UI Lab components" · "Swap the UI to UI Lab" · "Migrate project UI"

Claude reads workflows/overhaul.md, determines scope, confirms UI Lab is set up (or helps set it up via search_guides), then presents a full replacement report and waits for your confirmation before changing a single file.

## Phase 1: Replacement Report

**Scope:** src/components/, src/pages/ (excluding tests, fixtures)

**Replacements:**
| Current | UI Lab target | Confidence | Files |
|---------|--------------|------------|-------|
| <button> (62 instances) | <Button> | High | 18 files |
| <input type="text"> | <Input> | High | 7 files |
| <div className="flex"> | <Flex> | High | 31 files |
| <a href={...}> | <Anchor> | High | 9 files |
| CustomModal | <Modal> | Medium | 3 files |

**Skipped (no clear match):** AnimatedCounter, ChartWrapper

Ready to proceed? Any Low-confidence items to skip or defer?

Context budget

What gets added to Claude's context window per invocation.

FileLinesauditideateoverhaul
SKILL.md120
workflows/audit.md360
workflows/ideate.md134
workflows/overhaul.md96
references/core-pillars.md169
references/design-system.md165
references/slop-patterns.md118
MCP resultsvaries

An audit invocation adds ~950 lines of skill context before any code or MCP results. Ideate and overhaul are lighter — ~250 lines each, with MCP queries adding 0.5–2K tokens per call depending on the component.

Skill files

Next steps

  • Workflows — how agents query components, patterns, and design tokens
  • MCP Installation — connect the MCP server to Claude Desktop or Cursor