UI Spec Skill
Analyze UI screenshots and produce a structured design-to-developer handoff specification with JSONC tokens and an implementation brief.
Invoke with: /ui-spec
Overview
Given one or more screenshots or mockups of a desired UI, this skill produces:
- Design Tokens (JSONC) — A structured JSON document defining colors, typography, spacing, borders, shadows, components, and theme tokens.
- Developer Implementation Brief — A natural-language description of the UI to be built.
Analysis Steps
The skill follows a systematic analysis procedure:
- Screenshot Inventory — Label each screenshot and identify what it contributes
- Layout Structure — Overall page structure, grids, navigation, content areas
- Color Palette — Primary, secondary, and gray scales plus named accents
- Typography — Font families, size scale, weight scale
- Spacing and Sizing — Padding, margin, gap patterns
- Borders, Shadows, Effects — Radius scale, shadows, gradients
- Component Inventory — Every distinct UI component with variants and states
- Light and Dark Mode — Semantic color slots for both modes
- Responsive Behavior — Layout changes at each breakpoint
Output Format
Design Tokens
A JSONC block defining:
- Colors — Full 50-950 scales for primary, secondary, and gray; named accents for success, warning, danger, info
- Typography — Font families, size scale, weight scale
- Spacing — Tailwind-compatible rem values
- Borders — Radius scale and border widths
- Shadows — Named shadow definitions (sm, md, lg, xl)
- Themes — Light and dark mode semantic tokens (background, foreground, card, muted, border, etc.)
- Components — Per-component token usage, variants, and states
- Layout — Structure, sidebar, header, content area definitions
Developer Brief
A markdown document describing:
- What the user sees and how the UI feels
- How the token system works
- Color strategy and theme switching
- Responsive behavior at each breakpoint
- Every page/view and its purpose
- Every component and where it appears
Use with Device UI Skill
The UI Spec skill is typically used as a precursor to the Device UI skill. Generate a design specification from mockups, then use it as the design brief input for the Device UI implementation workflow.
