Provides core UI design patterns for components and app screens: tokens, visual hierarchy, interactive states, forms, navigation, feedback, accessibility, and responsive rules. Activates on general UI design requests.
Ships in designskills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
.agents/design-context.md (written by the design-context skill). If it is missing, look for tokens in tailwind.config.* or :root CSS variables. If nothing exists, use the defaults (Primary #2563EB, Secondary #7C3AED, Accent #F59E0B, Tailwind gray neutrals, Inter for headings and body, Minimal style) and tell the user defaults were used — suggest running design-context.--color-primary, --color-primary-light, --color-primary-dark, --color-secondary, --color-accent, --color-neutral-50…--color-neutral-900, --color-success/-warning/-error, --font-heading, --font-body, --font-mono, --radius, and the 4px-base spacing scale.theme.extend, v4 @theme) as primary, primary-light, primary-dark, secondary, accent, neutral-*, font-heading, font-body. The indigo-* / gray-* classes in the examples below are placeholders for these tokens.get_design_context, get_screenshot) and match it; it overrides the context file for that design.Build UI in layers. Never start with a full page — start with the smallest pieces.
Card with children beats a Card with 15 props./* Token layer — values come from .agents/design-context.md (defaults shown) */
:root {
--color-primary: #2563EB;
--color-surface: #FFFFFF;
--radius-md: 0.75rem;
--shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.05);
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-6: 1.5rem;
--space-8: 2rem;
--space-12: 3rem;
--space-16: 4rem;
}
Canonical spacing scale (all UI skills): 4px base — 4, 8, 12, 16, 24, 32, 48, 64px (Tailwind 1, 2, 3, 4, 6, 8, 12, 16). Don't use off-scale values.
Control where the eye goes. Rank every element by importance and apply these levers:
| Lever | High Emphasis | Medium Emphasis | Low Emphasis |
|---|---|---|---|
| Size | 2rem+ heading | 1rem body | 0.75rem caption |
| Weight | 700–800 bold | 500 medium | 400 regular |
| Color | Primary or high-contrast text | Muted text (neutral-600) | Subtle text (neutral-500 — lightest gray that still passes 4.5:1 on white) |
| Spacing | More whitespace around it | Standard spacing | Tighter spacing |
| Position | Top-left or center | Mid-page | Bottom or sidebar |
Blur your eyes or zoom out to 25%. If you can still identify the primary action and main heading, your hierarchy works.
<!-- High emphasis -->
<h1 class="text-4xl font-extrabold tracking-tight text-gray-950">
Ship faster with AI
</h1>
<!-- Medium emphasis -->
<p class="mt-4 text-lg text-gray-600 max-w-2xl">
Build production-ready components in minutes, not hours.
</p>
<!-- Low emphasis -->
<span class="text-xs text-gray-500 uppercase tracking-wide">
Updated 2 hours ago
</span>
Every interactive element needs all five states. No exceptions.
.btn-primary {
/* Default */
background: var(--color-primary);
color: white;
border-radius: var(--radius-md);
padding: var(--space-2) var(--space-4);
font-weight: 600;
transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, filter 150ms ease;
/* Hover — subtle lift or brightness shift */
&:hover {
filter: brightness(1.1);
box-shadow: 0 4px 12px oklch(0% 0 0 / 0.15);
transform: translateY(-1px);
}
/* Active — pressed feel */
&:active {
transform: translateY(0);
filter: brightness(0.95);
box-shadow: var(--shadow-sm);
}
/* Focus — visible ring for keyboard users */
&:focus-visible {
outline: 2px solid var(--color-primary);
outline-offset: 2px;
}
/* Disabled — dimmed, no hover/active effects (don't add pointer-events: none — it hides the not-allowed cursor) */
&:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
box-shadow: none;
filter: none;
}
}
<button class="bg-indigo-600 text-white px-4 py-2 rounded-lg font-semibold
hover:bg-indigo-500 hover:-translate-y-0.5 hover:shadow-lg
active:translate-y-0 active:bg-indigo-700
focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600
disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none
transition-all duration-150">
Click me
</button>
motion-safe:animate-pulse on placeholder blocks, and mark the region aria-busy="true" with an sr-only "Loading…" label.<!-- Skeleton card -->
<div class="motion-safe:animate-pulse space-y-3" aria-busy="true">
<span class="sr-only">Loading…</span>
<div class="h-48 bg-gray-200 rounded-xl"></div>
<div class="h-4 bg-gray-200 rounded w-3/4"></div>
<div class="h-4 bg-gray-200 rounded w-1/2"></div>
</div>
role="status" (polite live region). Auto-dismiss after 5+ seconds, and never auto-dismiss messages that contain an action.role="alert" for errors that appear after submit.<div class="text-center py-16">
<svg class="mx-auto h-12 w-12 text-gray-400" aria-hidden="true"><!-- inbox icon --></svg>
<h3 class="mt-4 text-lg font-semibold text-gray-900">No messages yet</h3>
<p class="mt-2 text-sm text-gray-500">Start a conversation to see messages here.</p>
<button type="button" class="mt-6 bg-indigo-600 text-white px-4 py-2 rounded-lg">
New message
</button>
</div>
aria-current="page".md breakpoint.role="tablist"/role="tab" with aria-selected and arrow-key navigation (or plain links if each tab is its own URL)./ or > separator.<div class="space-y-1.5">
<label for="email" class="block text-sm font-medium text-gray-700">
Email address
</label>
<input
type="email"
id="email"
class="block w-full rounded-lg border border-gray-300 px-3 py-2
text-gray-900 placeholder:text-gray-400
focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20
transition-colors"
placeholder="[email protected]"
autocomplete="email"
aria-describedby="email-error"
/>
<!-- On error: remove `hidden` and set aria-invalid="true" on the input -->
<p id="email-error" class="text-sm text-red-600 hidden">Please enter a valid email address.</p>
</div>
Accessibility is not an afterthought. It is a design constraint applied from the start.
outline without replacing it.focus-visible (not focus) to avoid showing rings on mouse click.scroll-padding-top equal to the header height.<h1> per page.h1 > h2 > h3). Never skip levels.<nav>, <main>, <aside>, <footer> landmarks.<div onclick>.aria-label on icon-only buttons.@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
| Name | Width | Target |
|---|---|---|
sm | 640px | Large phones landscape |
md | 768px | Tablets |
lg | 1024px | Small laptops |
xl | 1280px | Desktops |
2xl | 1536px | Large screens |
md+.md.text-2xl md:text-4xl lg:text-5xl.p-4, tighten on desktop: lg:p-2..card-container {
container-type: inline-size;
}
@container (min-width: 400px) {
.card {
display: grid;
grid-template-columns: 200px 1fr;
}
}
.glass {
background: oklch(100% 0 0 / 0.1);
backdrop-filter: blur(16px) saturate(180%);
border: 1px solid oklch(100% 0 0 / 0.15);
border-radius: 1rem;
}
Glass only works over a busy background — check text contrast against the lightest area behind it, and give a solid fallback: @supports not (backdrop-filter: blur(1px)) { .glass { background: oklch(20% 0.02 265 / 0.9); } }.
.bento {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: minmax(200px, auto); /* fixed 200px rows clip long content */
gap: 1rem;
}
@media (max-width: 767px) { .bento { grid-template-columns: 1fr; } .bento .featured { grid-column: auto; grid-row: auto; } }
.bento .featured {
grid-column: span 2;
grid-row: span 2;
}
.aurora {
background: linear-gradient(135deg, oklch(85% 0.15 280), oklch(80% 0.2 320), oklch(75% 0.18 200));
background-size: 400% 400%;
animation: aurora-shift 8s ease infinite;
}
@keyframes aurora-shift {
0%, 100% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
}
:has() — Parent Selector/* Highlight form group when input is focused */
.form-group:has(input:focus-visible) {
background: oklch(97% 0.01 265);
border-color: var(--color-primary);
}
/* Card changes layout when it contains an image */
.card:has(img) {
grid-template-rows: 200px 1fr;
}
.card-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.5rem;
}
.card {
display: grid;
grid-template-rows: subgrid;
grid-row: span 3; /* header, body, footer align across cards */
}
/* Progressive enhancement: only where supported and motion is OK */
@supports (animation-timeline: view()) {
@media (prefers-reduced-motion: no-preference) {
.fade-in {
animation: fade-in linear both;
animation-timeline: view();
animation-range: entry 0% entry 100%;
}
}
}
@keyframes fade-in {
from { opacity: 0; transform: translateY(2rem); }
to { opacity: 1; transform: translateY(0); }
}
Don't hand over code you haven't looked at. After generating it:
npx playwright screenshot --full-page --viewport-size=390,844 file://$PWD/index.html mobile.png, then again with --viewport-size=1440,900 (or point at the dev server URL).Before shipping any UI component, verify:
prefers-reduced-motionWhat SKILL.md sets; muted values are Claude Code's defaults
/designskills:ui-designfrom designskills
npx claudepluginhub arnavpuri/designskills --plugin designskills28 skills in this plugin
/ad-creative-designPaid advertising creative: IAB display banners (300x250, 728x90, etc.), Google Display and Performance Max assets, and paid social ads (Meta, LinkedIn, X), via Gemini 3.1 Flash image generation, HTML/CSS, or HTML5 animated ads. Covers exact-size cropping, CTA design, value proposition hierarchy, A/B variations, and platform ad specs. Use whenever the creative will be bought as ad inventory; for organic posts use social-media-graphic, for on-site hero or email banners use banner-design. Trigger phrases: "design an ad", "create a banner ad", "display ad", "ad creative", "Google Display ad", "Meta ad", "ad banner", "create ad variations", "HTML5 ad".
/banner-designBanner graphics for owned channels: website hero/section banner images, email header images, event and conference banners, sidebar house promos, and announcement bars, via Gemini 3.1 Flash image generation (default) or HTML/CSS. Covers standard sizes, Gemini ratios and cropping, CTA placement, responsive art direction, and email constraints. For paid display/IAB ads use ad-creative-design; for a coded above-the-fold section use hero-section; for a full email template use email-design. Trigger phrases: "design a banner", "create a website banner", "hero banner image", "email header", "event banner", "promotional banner", "web banner", "sidebar banner", "announcement bar", "Eventbrite banner".
Other plugins' skills for the same job