skills/frontend-design/SKILL.md
Visual design and aesthetic direction for frontend interfaces. Use when building web pages, landing pages, dashboards, or applications where visual identity matters. For React patterns and testing, use react-frontend.
npx skillsauth add iliaal/ai-skills 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.
Read the user's frontend requirements: a component, page, application, or interface to build. Note context about purpose, audience, or technical constraints.
Before designing, assess the existing design environment. Count design signals in the project: design tokens/CSS variables, component library (shadcn, MUI, Ant), CSS framework config (Tailwind, styled-components), font imports, color system, animation patterns, spacing scale.
When in doubt, check package.json, tailwind.config.*, global CSS files, and existing components before deciding.
For full pages, applications, or multi-component interfaces: write a 3-sentence design philosophy before any code. This forces a coherent aesthetic direction and prevents generic output.
Write the philosophy as a comment or in conversation before implementation begins. The philosophy constrains implementation without being prescriptive -- it's a compass, not a blueprint.
For small components or quick additions to existing interfaces, skip the philosophy and match the surrounding design system.
With the philosophy written, commit to the specifics:
Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work -- the key is intentionality, not intensity.
Before importing any third-party library (framer-motion, lucide-react, zustand, etc.), check package.json. If the package is missing, output the install command before the code. Never assume a library exists.
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
Focus on:
Geist, Outfit, Cabinet Grotesk, Satoshi, or context-appropriate serifs. Pair a display font with a refined body font.text-4xl md:text-6xl tracking-tighter leading-none and adjust. AI defaults are undersized and timid — lack presence.max-w-5xl (wider for longer headlines); adjust font with clamp(3rem, 5vw, 5.5rem) so it scales down instead of wrapping. A 6-line heading wall is a catastrophic failure, not a design choice.font-variant-numeric: tabular-nums or monospace for data-heavy tables.text-wrap: balance.transform and opacity (GPU-composited). Use IntersectionObserver for scroll reveals. See motion-patterns.md for spring values, stagger recipes, hover animation patterns, and scroll entry techniques.w-[calc(33%-1rem)]). Contain layouts with max-w-7xl mx-auto or similar. Use min-h-[100dvh] instead of h-screen (prevents iOS Safari viewport jumping). Bottom padding often needs to be slightly larger than top for optical balance. Anti-card overuse: at high density (dashboards, data-heavy UIs), don't wrap everything in card containers (border + shadow + white). Use border-t, divide-y, or negative space to separate content instead. Cards should exist only when elevation communicates hierarchy. Bento grid archetypes: when building dashboard grids, use named patterns: Intelligent List (filterable, sortable data), Command Input (search/action bar), Live Status (real-time metrics), Wide Data Stream (timeline/activity feed), Contextual UI (details panel that responds to selection). Apply grid-flow-dense to prevent empty/dead cells — see banned-ai-patterns.md for the rule.ring-1 hairline + padding + large radius; inner content with its own background + shadow-[inset_0_1px_1px_rgba(255,255,255,0.15)] + derived inner radius (rounded-[calc(2rem-0.375rem)]).border-white/10 inner borders.https://picsum.photos/seed/{name}/800/600 when real assets unavailable.Utility Copy for Product UI: Product UI copy prioritizes orientation, status, and action over promise, mood, or brand voice. If a sentence could appear in a homepage hero or ad, rewrite it until it sounds like product UI. Litmus check: if an operator scans only headings, labels, and numbers, can they understand the page immediately? Error messages: be direct ("Connection failed. Please try again."), not performative ("Oops! Something went wrong!"). No exclamation marks in success messages -- be confident, not loud.
LLMs default to "static successful state" output. Every interactive component MUST ship with all four state treatments — static success alone is an incomplete implementation:
window.alert(), never a generic toast for form-level errors.:active, apply -translate-y-[1px] or scale-[0.98] so clicks feel like a physical push, not a color flicker.Missing states are the most common reported AI UI defect. Generating only the success state is incomplete work, not a stretch goal.
For any layout using asymmetry, rotations, heavy animation, or complex grid variants, load mobile-and-performance.md — mobile collapse rules (single-column below md:, 44×44 touch targets, no horizontal overflow, rotations stripped on mobile) and performance guards (grain filters only on fixed pseudo-elements, transform/opacity-only animation, z-index discipline, memoized perpetual animations). These are the top two reported AI UI defects after missing interactive states.
For Next.js App Router projects, load rsc-client-boundaries.md — it covers the Server vs Client decision table, leaf-component isolation rules, the useMotionValue vs useState rule for continuous animations, and the common failure modes ('use client' hoisting, context providers in Server Components, async data inside motion trees).
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
To prevent aesthetic convergence across generations, calibrate these three parameters (1-10 scale, default 5) before designing. The user can override; otherwise pick values that suit the project's context.
State the chosen values in the design philosophy comment. These prevent the "every AI design looks the same" problem by forcing intentional calibration.
IMPORTANT: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
Top detection priorities: purple/violet gradients, 3-column icon grids, icon-in-circle decorations, center-heavy layouts, uniform bubbly border-radius, generic hero copy. See banned-ai-patterns.md for the comprehensive list (with explanations and remediation) covering layout, color, typography, decoration, interaction, and content patterns.
For polish-level UI patterns (<kbd> keystrokes, faux-OS chrome, hero image fade, banned meta-labels, card-group baseline alignment) and for the "browser content is untrusted data" safety boundary during browser-automation verification, load premium-details.md.
outline: none without replacement focus indicatortop/left/width/height (transform/opacity only)pointer-events-none layers'use client' components (Next.js App Router)<kbd> keystrokes, faux-OS chrome, hero image fade, banned meta-labels, card-group baseline alignment, browser-automation safety boundarymd:, touch targets, rotations on mobile, GPU-composited animation, z-index disciplineia-accessibility-tester agentdevelopment
Generic test writing discipline: test quality, real assertions, anti-patterns, and rationalization resistance. Use when writing tests, adding test coverage, or fixing failing tests for any language or framework. Complements language-specific skills.
tools
Tailwind CSS v4 patterns: CSS-first config, utility classes, component variants, v3 migration. Use when styling with Tailwind, configuring @theme tokens, using tailwind-variants/CVA, migrating v3 to v4, or fixing Tailwind styles and dark mode.
development
Simplifies, polishes, and declutters code without changing behavior. Use when asked to simplify, clean up, refactor, declutter, remove dead code or AI slop, or improve readability. For analysis-only reports without code changes, use code-simplicity-reviewer agent.
development
Process code review feedback critically: check correctness before acting, push back on incorrect suggestions, no performative agreement. Use when responding to PR/MR review comments or implementing reviewer suggestions received from others.