look-before-you-leap/skills/frontend-design/SKILL.md
Create distinctive, production-grade frontend interfaces with intentional design direction — landing pages, portfolios, dashboards, marketing sites, pricing pages, sign-up flows, blog templates, documentation sites, product pages, or any web UI where visual quality matters. Make sure to use this skill whenever the user asks to build, design, or redesign a website, web page, or UI component — especially when they mention wanting it to look 'modern', 'polished', 'premium', 'beautiful', 'professional', 'clean', or 'fresh', or when they care about typography, color palette, visual hierarchy, or design systems. Also trigger when the user says 'make it look good', 'needs a visual refresh', 'feels dated', or 'doesn't stand out'. Covers greenfield (new designs) and integration (extending existing design systems) with framework-specific guidance for HTML/CSS, React, Vue, Svelte, Tailwind, and shadcn/ui. Do NOT use when: fixing a CSS bug with no design change, making backend-only changes, or building WebGL/Three.js/shader/scroll-driven immersive experiences (use immersive-frontend instead). When brainstorming preceded this skill, skip Phases 1-2 and start at Phase 3.
npx skillsauth add miospotdevteam/claude-control frontend-designInstall 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.
Build frontend interfaces that are distinctive, intentional, and production-grade. This skill replaces vague "be creative" advice with a structured process that produces consistently high-quality results while preventing the generic aesthetic convergence that plagues AI-generated UIs.
Announce at start: "I'm using the frontend-design skill to guide the design and implementation."
This skill operates within the conductor's Step 1-3:
discovery.md.writing-plans when creating the masterPlan.After brainstorming: If brainstorming ran first and produced a
design.md with visual direction (typography, colors, layout choices):
skip Phases 1-2 entirely. Use the approved design and proceed to
Phase 3. If the design includes a Creative Brief, its Visual
Direction informs the Decision Matrix scores if Phase 2 still runs, and
its Copy Voice section guides all text content decisions (headlines,
CTAs, microcopy, empty states, error messages) during implementation.
After immersive-frontend request: If immersive-frontend invoked
this skill for design direction only, run Phase 2 (Design Direction) and
return the approved choices. Do NOT proceed to Phase 3 — immersive-frontend
handles implementation.
Standalone: If neither preceded this skill, run the full flow (Phases 1-4) with the user approval checkpoint in Phase 2.
Design already decided: If the user's request is purely "build this mockup/design" (design already decided): skip Phase 2, proceed to Phase 3.
Determine the operating mode before making any design decisions.
Greenfield mode — you have full creative freedom:
tailwind.config custom theme, no CSS variables, no component library,
no theme filesIntegration mode — you work within an existing system:
Note these before proceeding:
Read these before proceeding:
tailwind.config / CSS variables / theme files — extract the token systemIn integration mode, also read:
references/ui-consistency-checklist.md — consistency rulesreferences/ui-consistency-guide.md — design token disciplineBoth modes: Write findings to discovery.md as part of the conductor's
Step 1 exploration.
Failure path: If the project has no discernible design system and isn't greenfield (e.g., inconsistent styles, no tokens), treat it as greenfield with the constraint of matching existing code conventions.
Score each axis on a 1-5 scale based on the project context. The combination narrows the aesthetic space before any visual decisions are made.
| Axis | 1 | 5 | |---|---|---| | Audience | Technical / developer | General public / consumer | | Formality | Corporate / institutional | Casual / personal | | Energy | Calm / restrained | Dynamic / energetic | | Density | Spacious / minimal | Dense / information-rich | | Era | Classic / timeless | Contemporary / trendy | | Temperature | Warm (organic, rounded) | Cool (geometric, precise) |
Example: A developer documentation site — Technical (5), Formal (3), Calm (4), Dense (4), Contemporary (4), Cool (5) — narrows to: monospace-influenced typography, cool neutral palette with one accent, generous line-height but compact layout, subtle animations, geometric shapes.
Example: A children's educational app — General (5), Casual (5), Energetic (5), Spacious (2), Contemporary (4), Warm (5) — narrows to: rounded display font, bright primary palette, generous whitespace, bouncy animations, organic shapes.
Example: A creative design agency — General (4), Casual (4), Moderate (3), Spacious (2), Contemporary (4), Warm (2) — narrows to: light cream/warm background (warm + casual = light, NOT dark), editorial display font paired with clean body sans, warm accent color (burnt orange, terracotta, coral), generous whitespace, grain/noise texture for craft feel, asymmetric layouts that showcase creative confidence.
Before choosing colors, decide the base theme. This is not a stylistic preference — it's a brand decision driven by the axes:
| Choose light when | Choose dark when | |---|---| | Temperature 1-3 (warm) | Temperature 4-5 (cool) AND Audience 1-2 (technical) | | Formality 3-5 (casual to corporate) | The product is a dev tool, dashboard, or code-adjacent | | The brand is warm, friendly, creative, or approachable | The user explicitly requests dark mode | | It's a creative agency, portfolio, lifestyle, food, fashion, education | It's a terminal, IDE, analytics tool, or night-use app |
Dark mode is not "more premium." A creative agency on a dark background looks like a developer tool. A warm brand on dark looks cold. Match the theme to what the brand actually is, not to what feels technically impressive. When in doubt, choose light — it's harder to make dark feel warm and inviting, and getting it wrong alienates the audience.
If the user asks for dark mode support (toggle), still choose the default theme based on the brand, and make dark mode the alternative.
After scoring the axes, pick ONE unexpected element to anchor the design. This prevents convergence — it's the memorable thing that makes this design THIS design, not a generic template.
The seed must serve the brand, not just surprise. A chartreuse accent on a dark background is unexpected, but if the brand is a warm creative agency, it's the wrong kind of unexpected — it makes the brand feel technical and cold. Ask: "Would the brand's target audience find this element delightful or alienating?"
Good creative seeds (matched to context):
Bad creative seeds (overused or context-blind):
With the axes scored, theme selected, and creative seed chosen, select:
references/frontend-design-guide.md for sourcing)references/color-palettes.md and pick the palette that matches
your Temperature axis and brand context:
@radix-ui/colors), Open Color (open-color), or Palx
(palx) — all installed globally. See
references/frontend-design-guide.md § Pre-built Palette Libraries.
If generating manually, use HSL shift, OKLCH, or complementary methods
(see § Palette Generation Methods). State which source/method you used.Present all choices to the user before proceeding. Walk through the axis
scores, creative seed, and concrete selections. When offering alternatives
or asking the user to choose between options, use the AskUserQuestion
tool for a structured selection UI rather than listing choices in plain text.
Do NOT proceed to Phase 3 until the user approves the direction. If the
user disagrees, iterate on the specific choices they reject.
Document all approved choices in the masterPlan before writing code.
Based on the Energy axis score and the user's vision, classify the motion needs:
| Tier | Signals | Implementation |
|---|---|---|
| Standard | Energy 1-3, CSS transitions, hover states, simple page transitions | This skill (Phase 3) |
| Enhanced | Energy 3-4, scroll-driven reveals, parallax, text choreography, GSAP-level animation | immersive-frontend (Motion-Enhanced tier) |
| Immersive | Energy 5, WebGL, 3D scenes, custom shaders, canvas experiences, Awwwards-style | immersive-frontend (WebGL-Lite or Full Immersive tier) |
If the motion tier is Enhanced or Immersive: this skill's job ends
after the user approves the design direction. Write the handoff document
to discovery.md or design.md using this structure, then invoke
immersive-frontend:
## Design Handoff → immersive-frontend
- **Axis scores**: [all 6 scores]
- **Creative seed**: [description]
- **Typography**: [display + body fonts, weights, scale]
- **Color system**: [primary, secondary, accent, neutrals with hex/oklch]
- **Dark mode**: [yes/no, if yes: adaptation notes]
- **Animation philosophy**: [key moments, easing, duration scale]
- **Motion tier**: [Enhanced / Immersive]
- **Scope**: [full-page / hybrid section — if hybrid, which sections]
immersive-frontend will consume this and handle technical architecture
and implementation.
For projects with both standard UI and immersive sections, this skill and
immersive-frontend split ownership:
| Aspect | frontend-design owns | immersive-frontend owns |
|---|---|---|
| Design direction | All design decisions (both skills) | — |
| Standard UI pages | Implementation + verification | — |
| Immersive sections | — | Implementation + verification |
| Shared design tokens | Defines tokens | Consumes tokens |
| Transition zones | Provides CSS for entering/exiting | Provides canvas setup |
If the motion tier is Standard: proceed to Phase 3 in this skill.
When working within an existing system, creativity operates WITHIN the constraints:
The goal is not to redesign the system but to raise the quality bar for the new work within its vocabulary.
Every design decision must be intentional. These patterns signal generic, unconsidered output — avoid them:
| Category | Avoid | Use instead |
|---|---|---|
| Fonts | Inter, Roboto, Arial, system-ui as display | Satoshi, General Sans, DM Sans, Outfit, Manrope |
| Colors | Purple-to-blue gradient on white | Start from Temperature axis; use OKLCH palette from brand color |
| Colors | Pure black on pure white (#000/#fff) | Near-black on near-white (#1a1a2e / #fafaf9) |
| Layout | Symmetric 3-card grid with identical shadows | Bento, masonry, asymmetric splits, varied card sizes |
| Animation | Fade-in-up on every scroll section | Animate 2-3 key moments; leave the rest static |
| Patterns | Glassmorphism with no purpose | Solid surfaces with texture (grain, noise) or accent borders |
| Theme | Dark bg for warm/creative/casual brands | Light theme for warm brands; dark only for tech/dev/night-use |
| Theme | Neon/fluorescent accent on non-tech brand | Accent color that matches the brand's warmth and personality |
The full blacklist is in references/frontend-design-guide.md § Anti-Slop
Blacklist. Also read references/anti-slop.md for the shared cross-skill
banlist covering typography, color, layout, animation, illustration, and copy.
The default instinct is to wrap every content group in a bordered, shadowed, background-colored card. Resist it. Most content groups don't need a container — they need whitespace, typography hierarchy, and subtle dividers to establish visual separation.
When a container IS warranted:
When a container is NOT needed:
<hr> or subtle bordersAlternatives to containers:
1px border or <hr> between
groups is cleaner than wrapping each in a card--surface-0 and --surface-1) to group content without bordersWhen you do use containers, vary them: not every card needs the same border, shadow, and padding. Feature the important one, mute the rest.
Whitespace is not just "empty space" — it's a design tool. Bad whitespace is wasted space that makes a page feel unfinished. Good whitespace creates rhythm, directs attention, and makes content breathe.
@keyframes, transition)font-display: swap and system font fallbacks<header>, <nav>, <main>, <section>, <article>)clamp() for fluid typographymotion/react) for orchestrated animationsnext/font (Next.js) or @fontsource (other React)prefers-reduced-motion media query respected in all animationstailwind.config for custom tokens — don't fight the systemtext-[17px]) only when no token exists@apply sparingly — prefer utility classes in markupConsult references/frontend-design-guide.md for the full font sourcing
protocol. Quick reference:
| Source | When | How |
|---|---|---|
| Google Fonts | Default for web | <link> tag, font-display: swap |
| @fontsource | React/Next.js | npm install @fontsource/font-name |
| next/font | Next.js | Built-in optimization, auto subset |
| Variable fonts | When available | Single file, font-variation-settings |
| System fonts | Fallbacks only | Font stack with system-ui |
When the design supports dark and light themes:
--surface, --on-surface,
--muted, --border, --ring etc. as CSS variables. Toggle them via a
class (.dark) or prefers-color-scheme.#0f0f12, not #000)#e0e0e0 on dark, not pure white--surface-0 (darkest), --surface-1, --surface-2 (lightest).dark: variant with darkMode: 'class' in config.
Vanilla CSS: use [data-theme="dark"] or .dark class on <html>.See references/frontend-design-guide.md § Dark Mode Color Adaptation for
the full adaptation rules.
Purposeful micro-interactions make interfaces feel alive. Add them to the moments that matter, not everywhere.
| Interaction | Pattern | Timing |
|---|---|---|
| Hover lift | transform: translateY(-2px) + shadow increase | 200ms ease-out |
| Button press | transform: scale(0.97) on :active | 100ms ease-in |
| Focus ring | box-shadow: 0 0 0 3px var(--ring) on :focus-visible | instant (no transition on focus) |
| Toggle switch | Thumb slides with transform: translateX() + bg color transition | 200ms ease |
| Dropdown open | transform: scaleY(0→1) from transform-origin: top + opacity | 150ms ease-out |
| Card hover | Border color shift or subtle glow, not just shadow lift | 200ms ease |
| Link underline | Width grows from left via background-size or clip-path | 250ms ease-out |
Rules:
transition for user-triggered interactions, @keyframes for
entrance choreography:focus-visible for keyboard usersprefers-reduced-motion (disable or
simplify)Define scales for the building blocks so components compose consistently:
Spacing scale (padding/gap inside components):
compact: px-2 py-1 (8px / 4px) — tags, badges, dense tables
default: px-4 py-2 (16px / 8px) — buttons, inputs, cards
spacious: px-6 py-3 (24px / 12px) — hero sections, feature cards
Border radius scale:
none: 0 — tables, full-bleed sections
sm: 4px — inputs, small buttons
md: 8px — cards, modals, standard buttons
lg: 12-16px — feature cards, large containers
full: 9999px — pills, avatars, toggle tracks
Shadow scale (elevation tiers):
sm: 0 1px 2px rgba(0,0,0,0.05) — subtle lift
md: 0 4px 6px -1px rgba(0,0,0,0.07) — cards, dropdowns
lg: 0 10px 15px -3px rgba(0,0,0,0.08) — modals, popovers
xl: 0 20px 25px -5px rgba(0,0,0,0.1) — large modals, hero elements
In Tailwind, extend these in tailwind.config. In vanilla CSS, define as
custom properties. Shadows need adaptation for dark mode (reduce opacity,
increase blur).
Maximalist designs need elaborate code: extensive animations, layered textures, complex compositions. Minimalist designs need restraint and precision: careful spacing, typography refinement, subtle details. The implementation must match the aesthetic — don't write minimal code for a maximalist vision or bloated code for a minimal one.
Run the references/frontend-design-checklist.md checklist. The key
domains:
Accessibility:
prefers-reduced-motion respectedResponsive:
Performance:
font-display: swap or optionaltransform and opacity (GPU-composited)Coherence:
Run the project's own commands first (check package.json, Makefile,
CLAUDE.md). Supplement with:
tsc --noEmit (or project equivalent)eslint, biome, or project linteraxe-core / @axe-core/cli if installedThis skill produces:
discovery.md or design.md (Phase 2) — axis
scores, creative seed, typography, color, motion, layout, texture choices| Situation | Read / Invoke |
|---|---|
| Choosing a color palette | references/color-palettes.md — curated CSS variable sets |
| Working within existing design system | references/ui-consistency-checklist.md + references/ui-consistency-guide.md |
| Adding font/animation dependencies | references/dependency-checklist.md |
| User input rendered in UI | references/security-checklist.md |
| Testing UI components | references/testing-checklist.md |
| Design calls for SVG illustrations, patterns, or textures | Invoke svg-art — pass design direction (palette, temperature) |
| Motion tier is Enhanced or Immersive | Invoke immersive-frontend — pass design direction |
For the full font sourcing protocol, aesthetic axis deep-dives, animation
patterns, color systems, and the extended anti-slop blacklist, read
references/frontend-design-guide.md.
development
Use after discovery to write implementation plans with TDD-granularity steps. Produces plan.json (immutable definition, frozen after approval), progress.json (mutable execution state), and masterPlan.md (user-facing proposal for Orbit review). Every step is one component/feature; TDD rhythm (test, verify fail, implement, verify pass, commit) lives in its progress items. Consumes discovery.md from exploration phase. Make sure to use this skill whenever the user says discovery is done, exploration is finished, discovery.md is ready, or asks to write/create/draft the implementation plan — even if they don't mention plan.json or masterPlan.md by name. Also use when the user references completed exploration findings, blast radius analysis, or consumer mappings and wants them converted into actionable steps. Do NOT use when: the user says 'just do it' or 'no plan', resuming or executing an existing plan, during exploration or brainstorming (discovery not yet complete), debugging, or code review.
tools
End-to-end webapp testing with Playwright MCP integration. Use when: writing Playwright tests, E2E testing, browser testing, webapp testing, visual regression testing, accessibility testing with axe-core, testing user flows through a web UI, verifying frontend behavior in a real browser. Integrates with test-driven-development skill for test-first browser tests and engineering-discipline for verification. Do NOT use when: unit tests only (no browser UI involved), API tests without UI, mobile native testing (use react-native-mobile), testing CLI tools, or writing backend-only integration tests.
development
Test-Driven Development workflow enforcing red-green-refactor cycles. Use when writing new features, adding behavior, or implementing functions where tests should drive design. Requires explicit test-first prompting because Claude naturally writes implementation first. Integrates with writing-plans (TDD rhythm in Progress items) and engineering-discipline (verification). Do NOT use when: fixing a bug in existing tested code (use systematic-debugging), writing tests for existing untested code (characterization tests are a different workflow), refactoring without behavior change (use refactoring), or the project has no test infrastructure.
development
Use when encountering any bug, test failure, or unexpected behavior. Enforces root cause investigation before fixes. Four phases: investigate, analyze patterns, form hypotheses, implement. Prevents guess-and-check thrashing. Use ESPECIALLY when under pressure or when 'just one quick fix' seems obvious. Do NOT use for: learning unfamiliar APIs (use exploration), performance optimization without a specific regression, or code review without a reported bug.