home/common/ai/resources/agents/skills/web-ui-designer/SKILL.md
Design and implement web UIs with a design-system-first approach. Use when building dashboards, admin panels, landing pages, or any web frontend. Covers design tokens, dark/light themes, responsive layouts, chart/data visualization, component architecture, and progressive enhancement. Works with any server-rendered stack (Go/Templ, Python/Jinja, Ruby/ERB, Node/EJS) or client-rendered framework (React, Vue, Svelte). Also use when redesigning existing UIs or adding new pages/views to an existing web app.
npx skillsauth add kamushadenes/nix web-ui-designerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design-system-first approach to web UI implementation. Every visual decision flows from centralized tokens — never scatter styles across components.
Before building, determine the rendering approach:
package.json, go.mod, requirements.txt, Gemfile, or similar. If the project already has a frontend stack, use it.| Backend | Server-Rendered Options | Client-Rendered Options | |-|-|-| | Go | Templ or html/template + Unpoly or HTMX | — | | Python | Jinja2 + HTMX or Unpoly | React/Vue/Svelte via separate frontend | | Ruby | ERB/Slim + HTMX or Turbo | React/Vue via separate frontend | | Node/TS | EJS/Handlebars + HTMX | React/Next, Vue/Nuxt, Svelte/Kit | | Rust | Askama/Tera + HTMX | Leptos, Yew | | Any (static) | Plain HTML + Alpine.js | — |
If the project belongs to a known product with a dedicated design-system skill installed alongside this one, prefer that skill's tokens, typography, spacing, and components as the source of truth instead of the generic tokens below.
Before writing any component, establish CSS custom properties:
:root {
/* Surface hierarchy */
--bg-primary: 222 47% 11%; /* main background */
--bg-secondary: 217 33% 17%; /* cards, panels */
--bg-tertiary: 215 28% 22%; /* hover states, wells */
--bg-elevated: 213 27% 15%; /* modals, dropdowns */
/* Text hierarchy */
--text-primary: 210 40% 98%; /* headings, important */
--text-secondary: 215 20% 65%; /* body text */
--text-muted: 215 16% 47%; /* labels, captions */
/* Accent palette */
--accent: 199 89% 48%; /* primary actions */
--accent-hover: 199 89% 55%;
--success: 142 71% 45%;
--warning: 38 92% 50%;
--danger: 0 84% 60%;
/* Effects */
--shadow-sm: 0 1px 2px hsl(0 0% 0% / 0.3);
--shadow-md: 0 4px 12px hsl(0 0% 0% / 0.4);
--shadow-glow: 0 0 40px hsl(var(--accent) / 0.15);
--gradient-primary: linear-gradient(135deg, hsl(var(--accent)), hsl(var(--accent-hover)));
--radius-sm: 0.375rem;
--radius-md: 0.5rem;
--radius-lg: 0.75rem;
--transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
For light mode, provide a matching set with inverted surface/text values:
:root.light, :root:not(.dark) {
--bg-primary: 0 0% 100%;
--bg-secondary: 210 40% 96%;
--text-primary: 222 47% 11%;
--text-secondary: 215 20% 35%;
--text-muted: 215 16% 53%;
/* accents and effects typically stay the same */
}
Watch for dark/light pitfalls: white text on white backgrounds (or dark text on dark backgrounds) when switching modes. Test both.
<!-- BAD: hardcoded -->
<div class="bg-gray-900 text-white">
<div class="shadow-[0_0_40px_rgba(0,120,255,0.3)]">
<!-- GOOD: token-driven -->
<div class="bg-surface-secondary text-content-primary">
<div style="box-shadow: var(--shadow-glow)">
For Tailwind, extend the config to map tokens — see references/tailwind.md.
Define visual variants through the design system, not inline overrides:
/* Define in your CSS / design system */
.btn-primary { background: hsl(var(--accent)); color: hsl(var(--text-primary)); }
.btn-ghost { background: transparent; color: hsl(var(--text-secondary)); border: 1px solid hsl(var(--text-muted) / 0.2); }
.btn-danger { background: hsl(var(--danger)); color: hsl(var(--text-primary)); }
Use framework-specific variant patterns (CVA for React, template classes for server-rendered) rather than ad-hoc Tailwind class strings scattered across components.
<div class="bg-surface-secondary rounded-lg border border-white/5 p-5">
<div class="flex items-center justify-between mb-2">
<span class="text-content-muted text-sm">Total Requests</span>
<span class="text-emerald-400 text-xs">+12.5%</span>
</div>
<div class="text-3xl font-bold text-content-primary">24,531</div>
<div class="text-content-muted text-xs mt-1">Last 24 hours</div>
</div>
bg-white/[0.02] alternating rowsbackdrop-blur-smhover:bg-white/[0.04]| Library | Best for | Embed? | |-|-|-| | Chart.js | Simple charts, small bundle | CDN or embed | | ECharts | Rich interactive dashboards | CDN | | D3 | Custom, unusual visualizations | CDN | | Lightweight Charts | Financial/time-series | CDN |
See references/chart-patterns.md for specific chart configs.
+--sidebar--+--------main content--------+
| nav | stat cards (3-4 col grid) |
| links |----------------------------|
| | chart row (2 col) |
| |----------------------------|
| | data table (full width) |
+-----------+----------------------------+
grid-template-columns: 240px 1frmax-w-screen-2xl mx-auto px-6 py-6gap-4 for stat cards, gap-6 for chart sectionslg:, hidden at md:Every page follows: Page title + filters > Summary cards > Charts > Detail table/list
md:/lg: for largergrid-cols-1 sm:grid-cols-2 lg:grid-cols-4ring-2 ring-accent ring-offset-2 ring-offset-surface-primary)@media (prefers-reduced-motion: reduce) to disable animationsdata-ai
Show MemPalace status — room counts, storage usage, and palace health.
tools
Search your MemPalace — semantic search across all mined memories, projects, and conversations.
tools
Mine a project or conversation into your MemPalace — extract and store memories for later retrieval.
development
Initialize a new MemPalace — guided setup for your AI memory palace with ChromaDB backend.