npx claudepluginhub juliusbrussee/cavekitThis skill uses the workspace's default tool permissions.
> If a DESIGN.md exists at the project root, its tokens and specifications override all defaults in this skill. This skill provides sensible defaults for when no design system exists, and implementation guidance that applies regardless.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
If a DESIGN.md exists at the project root, its tokens and specifications override all defaults in this skill. This skill provides sensible defaults for when no design system exists, and implementation guidance that applies regardless.
For deep dives on any section, see the reference files in this skill's
references/directory.
Taste is trained, not innate. Study why great interfaces feel right. Deconstruct apps you admire — the spacing, the timing, the weight of a shadow. The gap between "fine" and "exceptional" is built from hundreds of micro-decisions that users feel but never consciously notice.
Unseen details compound. A single rounded corner, a single eased transition, a single well-chosen shadow — none of these matter alone. Together they become "a thousand barely audible voices singing in tune." The cumulative effect is what separates craft from output.
Beauty is leverage. Polish is not vanity. Good defaults, considered typography, and intentional motion are real differentiators. Users trust interfaces that feel cared for. Investors notice. Competitors can't easily replicate taste.
Intentionality over intensity. Both bold maximalism and refined minimalism work — what fails is the absence of a clear point of view. Every visual decision should trace back to a deliberate conceptual direction. If you can't articulate WHY a choice was made, reconsider it.
Choose a direction and execute with precision. Don't hedge between styles. A brutalist page committed fully will always outperform a page that's "a little bit of everything." Commit, then refine.
NEVER produce generic "AI slop" aesthetics. No gratuitous gradients on white backgrounds. No cookie-cutter hero sections with stock illustrations. No safe, forgettable layouts that could belong to any product. Every interface should have a point of view that makes it recognizable.
When implementing UI, work through these priorities in order. Higher priorities are non-negotiable; lower priorities are polish that compounds quality.
| Priority | Level | What It Means |
|---|---|---|
| Accessibility | CRITICAL | Contrast 4.5:1, keyboard nav, ARIA semantics, visible focus rings. Ship nothing that excludes users. |
| Performance | HIGH | WebP/AVIF images, lazy loading below fold, CLS < 0.1, transform-only animations on the compositor thread. |
| Typography | HIGH | Font smoothing, text-wrap balance/pretty, tabular-nums for data, 65ch max line length. |
| Layout & Spatial | HIGH | 4/8px grid, concentric border radius, optical alignment over geometric. |
| Color & Theme | MEDIUM | HSL custom properties, semantic tokens, dark mode pairs tested separately. |
| Motion & Interaction | MEDIUM | Frequency-based animation decisions, 150-300ms durations, ease-out default. |
| Polish & Details | LOW | Layered shadows over borders, press feedback on buttons, staggered enter animations. |
Never skip a CRITICAL/HIGH item to chase a LOW item. A beautifully animated button that fails keyboard navigation is a net negative.
Before writing a single line of CSS, commit to a bold aesthetic direction. The most common failure mode in AI-generated UI is convergence on the same safe, forgettable look.
Choose one and commit fully:
Maximalist design demands elaborate code — layered backgrounds, complex grid structures, multiple font stacks. Minimalist design demands surgical precision — every pixel of spacing matters more when there's nothing to hide behind.
When building without an existing design system, avoid these overused defaults that signal "AI-generated":
Vary between light and dark themes, different font pairings, different aesthetic directions. Never converge on the same choices across projects.
Add depth through: gradient meshes, noise/grain overlays (filter: url(#noise)), layered transparencies, subtle background patterns, duotone image treatments.
DESIGN.md overrides this entire section. If DESIGN.md specifies Inter, use Inter. If it specifies purple gradients, use them. The ban list only applies when no design system exists and you're making aesthetic choices from scratch.
Typography is the single highest-leverage design element. Get it right and mediocre layouts still feel good. Get it wrong and nothing else saves it.
html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
Apply font smoothing to the root layout. On macOS, the default sub-pixel rendering makes text appear heavier than the designer intended.
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}
p, li, dd, blockquote {
text-wrap: pretty;
}
balance distributes heading lines evenly. pretty avoids orphaned words in body text.
.data-value, .price, .counter, [data-numeric] {
font-variant-numeric: tabular-nums;
}
Use tabular-nums for any number that updates dynamically — prices, counters, table columns. Without it, layout shifts as digit widths change.
max-width: 65ch for body text. Long lines destroy readability.Pair a distinctive display font with a refined body font. The display font carries personality; the body font carries readability. Use font-weight for hierarchy within a family:
Always include font stack fallbacks:
--font-display: "Instrument Serif", "Georgia", serif;
--font-body: "Söhne", "Helvetica Neue", sans-serif;
--font-mono: "JetBrains Mono", "Fira Code", monospace;
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--border: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--radius: 0.5rem;
}
Define semantic tokens: primary, secondary, destructive, muted, accent, background, foreground. Reference colors by semantic name — never hardcode hex values in components.
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
/* ... desaturated, lighter tonal variants — NOT simply inverted */
}
Dark mode is not "invert colors." Use desaturated, lighter tonal variants. Backgrounds go dark but not pure black (#000). Text goes light but not pure white (#fff). Test contrast separately for dark mode — what passes in light may fail in dark.
Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Pick one or two hero colors and let the rest of the palette recede. A confident palette has clear hierarchy; an uncertain palette spreads color evenly and feels flat.
This is the single most common thing that makes nested UI elements feel "off":
outer_radius = inner_radius + padding
/* Correct: concentric */
.card { border-radius: 16px; padding: 8px; }
.card-inner { border-radius: 8px; } /* 16 - 8 = 8 */
/* Wrong: same radius on parent and child */
.card { border-radius: 12px; }
.card-inner { border-radius: 12px; } /* Looks bloated */
When geometric centering looks off, align optically. Play/pause icons, dropdown carets, and asymmetric glyphs often need 1-2px manual nudges to look centered.
Layer multiple transparent box-shadow values for natural depth instead of using borders:
.elevated {
box-shadow:
0 1px 2px rgba(0, 0, 0, 0.04),
0 2px 4px rgba(0, 0, 0, 0.04),
0 4px 8px rgba(0, 0, 0, 0.04);
}
Multiple shadows at different spreads mimic how light works. A single hard shadow looks artificial.
Add a subtle inset outline to images and media for consistent depth against varied backgrounds:
img, video {
outline: 1px solid rgba(0, 0, 0, 0.06);
outline-offset: -1px;
}
Use a 4px / 8px base incremental system. Every spacing value should be a multiple of 4:
4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128
Minimum 44x44px for all interactive elements. If the visual element is smaller, extend the hit area with a pseudo-element:
.small-button::before {
content: "";
position: absolute;
inset: -8px;
}
Define a layered scale and never use arbitrary values:
--z-base: 0;
--z-dropdown: 10;
--z-sticky: 20;
--z-overlay: 40;
--z-modal: 100;
--z-toast: 1000;
This is the most important mental model for animation decisions:
| Frequency | Examples | Animation |
|---|---|---|
| 100+ times/day | Keyboard shortcuts, command palette actions, tab switches | None. Zero animation. Instant. |
| Tens of times/day | Hover effects, list item navigation, toggles | Remove or drastically reduce. 50-100ms max. |
| Occasional | Modals, drawers, toasts, page transitions | Standard animation. 150-300ms. |
| Rare / first-time | Onboarding, celebrations, empty states | Can add delight. 300-500ms, more elaborate. |
High-frequency animations feel sluggish. Low-frequency animations without motion feel jarring. Match the animation budget to usage frequency.
Built-in CSS easings (ease, ease-in-out) are too weak. Define custom curves:
:root {
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
| Element | Duration |
|---|---|
| Buttons, toggles | 100-160ms |
| Tooltips | 125-200ms |
| Dropdowns, popovers | 150-250ms |
| Modals, drawers | 200-500ms |
| Page transitions | 250-400ms |
UI animations should stay under 300ms. Never use ease-in for UI animations — it front-loads the pause and feels sluggish.
Exits should be softer and faster than enters. An enter animation at 250ms should have its exit at 150-200ms.
When multiple elements enter the viewport, stagger them by semantic chunks with ~50-100ms delay:
.stagger-item {
animation: fadeSlideIn 300ms var(--ease-out) both;
}
.stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-item:nth-child(2) { animation-delay: 60ms; }
.stagger-item:nth-child(3) { animation-delay: 120ms; }
Never animate from scale(0). Start from scale(0.9) or higher, combined with opacity:
@keyframes scaleIn {
from { opacity: 0; transform: scale(0.95); }
to { opacity: 1; transform: scale(1); }
}
Every pressable element should scale down slightly on :active:
button:active {
transform: scale(0.97);
}
Use CSS transitions (not keyframe animations) for interactive state changes. Transitions can be interrupted mid-way; keyframes cannot. This matters for hover states, toggles, and any element the user might interact with rapidly.
Make popovers transform-origin aware — they should grow from their trigger element, not from center. Exception: modals always originate from center.
Skip the tooltip delay on subsequent hovers. If the user has already waited for one tooltip, show the next one immediately.
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
Respect prefers-reduced-motion. Reduce animations — don't eliminate opacity and color transitions entirely, as those provide important feedback.
Gate hover animations behind a media query so touch devices don't trigger stuck hover states:
@media (hover: hover) and (pointer: fine) {
.card:hover { transform: translateY(-2px); }
}
Reference
references/animation-playbook.mdfor deep dives on spring physics, gesture-driven animation, and complex choreography.
Use Radix UI primitives for accessible, unstyled foundations. Use CVA (class-variance-authority) for type-safe component variants:
import { cva } from "class-variance-authority";
const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
outline: "border border-input hover:bg-accent hover:text-accent-foreground",
ghost: "hover:bg-accent hover:text-accent-foreground",
},
size: {
sm: "h-9 px-3 text-sm",
default: "h-10 px-4 py-2",
lg: "h-11 px-8 text-lg",
},
},
defaultVariants: { variant: "default", size: "default" },
}
);
transform: scale(0.97) on :active)outline: none without replacement)opacity: 0.5 with pointer-events: nonetranslateY(-1px) + shadow increase)transform-origin: center, fade + scale enter animationaria-modal="true", role="dialog", aria-labelledbyaria-live="polite" for screen readersUse shadcn CSS variable pattern (HSL format) for all component colors. Wrap client-interactive components in server components for Next.js App Router compatibility.
Reference
references/component-patterns.mdfor the full component catalog with copy-paste implementations.
Use <button>, <nav>, <main>, <header>, <footer>, <article>, <section> before reaching for ARIA. A <button> gives you keyboard handling, focus management, and screen reader semantics for free. A <div onClick> gives you none of that.
outline: none without a replacementfocus-visible to show rings only for keyboard users, not mouse clicks::focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
aria-label for icon-only buttons: <button aria-label="Close menu">X</button>aria-labelledby to associate headings with sectionsaria-describedby to link help text or error messages to inputsaria-live="polite" for dynamic content updates (toast messages, form errors)aria-hidden="true" for decorative elements (icons next to text labels)aria-expanded for toggleable elements (dropdowns, accordions)alt text for meaningful images: alt="Dashboard showing 23% revenue growth"alt="" for purely decorative images<a href="#main-content" class="sr-only focus:not-sr-only">
Skip to main content
</a>
<h1> per page.Reference
references/accessibility-checklist.mdfor the full audit guide with pass/fail criteria.
Run through this checklist before considering any UI implementation complete:
-webkit-font-smoothing: antialiased)text-wrap: balancefont-variant-numeric: tabular-numstransition: all anywhere — specific properties onlyprefers-reduced-motion respectedoutline: none without replacement)aria-live on dynamic content updatesReference
references/review-checklist.mdfor the extended 30-item checklist with severity ratings and automated testing commands.