skills/designing-frontend/SKILL.md
Guides creation of high-quality frontend interfaces using proven design principles for color, typography, spacing, layout, depth, animation, and UX. Covers both building new UIs and auditing existing ones. Use when creating web components, pages, or applications, or when reviewing frontend code for design quality
npx skillsauth add riccardogrin/skills designing-frontendInstall 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.
A comprehensive design knowledge base for building polished, professional frontends. Apply these principles when creating new interfaces or auditing existing ones. Framework-agnostic: the principles work with any CSS approach (vanilla, Tailwind, CSS modules, etc.).
| File | Read When |
|------|-----------|
| references/color-and-theming.md | Choosing colors, building palettes, implementing dark/light mode |
| references/typography-and-spacing.md | Setting type scales, font choices, spacing systems |
| references/layout-and-responsiveness.md | Building layouts with flexbox/grid, making designs responsive |
| references/depth-and-visual-hierarchy.md | Adding shadows, depth, borders, establishing visual hierarchy |
| references/animation-and-motion.md | Adding transitions, animations, scroll effects, SVG animation |
| references/ux-and-components.md | Designing user flows, building dashboards, planning interaction states (empty/loading/error), building reusable components, onboarding patterns, choosing native HTML elements |
Before starting, classify the task to avoid over-engineering:
Always match the scope of your design work to the scope of the user's request. A request to modify one component does not warrant project-wide changes to color systems, spacing tokens, or theme infrastructure. If the project has an existing design system, follow it. These guidelines apply when building from scratch or when the project has no established patterns.
These cross-cutting principles apply to every frontend task. Reference files contain the specific techniques and values.
Good design is as little design as possible. More design almost always results in uglier design. Simple does not mean minimal to the point of uselessness — all essential elements must be present. The biggest visual payoff comes from taking an average design to "good" — pushing from good to great yields diminishing returns.
Users scan, they don't read. Emphasize what users look for first using size, weight, and color. De-emphasizing secondary elements is often more effective than making the primary element bigger or bolder. Always zoom out to verify scannability.
All spacing, sizing, padding, and margin values should be divisible by 4 (converted to rem by dividing by 16). Elements need more spacing than you think — start generous, reduce until it feels right when viewed as a whole. Use Gestalt proximity: spacing between elements signals grouping.
A complete UI needs only: neutral background/text shades, a brand/primary color, and a few semantic state colors. Use HSL or OKLCH (not hex/RGB) — they map directly to design decisions. Create 3-4 shades per color by adjusting lightness in consistent increments.
Users should understand what to do instantly without thinking. Stick to established UI patterns (nav at top, buttons look like buttons, magnifying glass = search). Deviating from conventions forces thought. Following conventions is good design, not boring design.
Always sketch or plan the UI before coding, even if rough. Gather inspiration from real sites, Figma Community, Dribbble, or Mobbin. Identify the repeated patterns — most sites use only 2-3 core component types with variations.
Every product has a personality — discover it before building. A financial dashboard feels different from a creative portfolio, which feels different from a developer tool. Ask: if this product were a person, how would they dress? How would they speak? Ask: what makes this design unforgettable? What's the one thing someone will remember after closing the tab?
Commit to a clear aesthetic direction. Some flavors to consider: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian. These are starting points — the right direction comes from the product's purpose and audience.
Generic AI-generated frontends have tells: perfectly centered layouts, blue-to-purple gradients, identical card grids, rounded-everything, stock illustrations, polished but soulless. The antidote is intentional character — expressed through color boldness, type choices, copy tone, spacing rhythm, and interaction style.
Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations, textures, and effects. Minimalist designs need restraint, precision, and careful attention to spacing and typography. Bold maximalism and refined minimalism both work — the key is intentionality, not intensity.
Don't limit character to color and typography. Consider spatial composition (asymmetry, overlap, diagonal flow, grid-breaking elements) and atmospheric details (noise textures, gradient meshes, grain overlays, layered transparencies, custom cursors). These are tools, not requirements — use them when they serve the vision.
Before building, identify at least one distinguishing trait: a bold color, an unusual type pairing, a distinctive interaction pattern, a specific tone of voice, or a deliberate layout choice that makes this product feel like this product and not a template.
Load references/ux-and-components.md for detailed guidance on design personality.
When creating new frontend interfaces, follow this sequence. Load relevant reference files based on which phases apply to your task.
Phase 0: User Flows → Map core journeys, identify edge cases, document in project
Phase 1: Structure → Identify components, sketch layout hierarchy
Phase 2: Layout → Build with flexbox/grid, plan responsive behavior
Phase 3: Typography → Set type scale, font family, line heights
Phase 4: Color → Apply palette, ensure contrast, handle dark/light mode
Phase 5: Spacing → Apply consistent spacing system (multiples of 4)
Phase 6: Depth → Add shadows, borders, elevation where needed
Phase 7: Hierarchy → Verify visual hierarchy — zoom out, check scanning
Phase 8: Animation → Add transitions and motion where they aid UX
Phase 9: Polish → Responsive testing, native HTML elements, image optimization
Not every task requires all phases. A small component may only need phases 1-5. A full page build benefits from the complete sequence.
Before building any UI, map the user's journey through the feature or page.
docs/user-flows.md documenting each core user flow as a numbered step sequence (entry point → intermediate steps → goal achieved)Load references/ux-and-components.md for detailed user flow guidance.
Skip Phase 0 for isolated component changes, targeted fixes, or tasks where the user flow is self-evident.
Only create docs/user-flows.md when building a new feature with multiple screens or a multi-step interaction.
For smaller tasks, describe flows in your response rather than creating files.
Before writing HTML, create a mental model of the component tree. Every element is a box — responsive design is dynamically moving boxes into rows and columns. Identify repeated patterns and build them as reusable components. Most well-designed sites use surprisingly few unique component types — often just 2-3 core patterns with different props.
Load only the reference files relevant to your current phase:
| Phase | Reference File |
|-------|---------------|
| 2. Layout | references/layout-and-responsiveness.md |
| 3. Typography | references/typography-and-spacing.md |
| 4. Color | references/color-and-theming.md |
| 5. Spacing | references/typography-and-spacing.md |
| 6. Depth | references/depth-and-visual-hierarchy.md |
| 7. Hierarchy | references/depth-and-visual-hierarchy.md |
| 8. Animation | references/animation-and-motion.md |
| 9. Polish | references/layout-and-responsiveness.md + references/ux-and-components.md |
When reviewing existing frontend code, check these areas. Load the relevant reference file for detailed criteria on any failing item.
clamp(), flex ratios) over hardcoded pixels@media (hover: hover) for touch safety<picture> or srcset where appropriatelinear)prefers-reduced-motion media query@media (hover: hover)dialog, details, datalist)| Avoid | Do Instead |
|-------|------------|
| Hardcoded hex colors scattered throughout | Define color tokens as CSS variables |
| Random spacing values (13px, 17px, 22px) | Use multiples of 4: 12px, 16px, 24px |
| Multiple font families without clear purpose | One family, vary weight and size |
| Pure white (#fff) text on dark backgrounds | Slightly off-white (95-97% lightness) |
| Center-aligned body text | Left-align paragraphs, center only short headings |
| position: absolute for layout | Flexbox or Grid for layout, absolute only for overlays |
| Uniform shadows on every element | 3 shadow levels (sm, md, lg) applied by context |
| Animations on everything | Animate only what aids comprehension or feedback |
| Custom JS for modals, accordions, tooltips | Native <dialog>, <details>, <datalist> first |
| Serving full-size images to mobile | <picture> + <source> with media queries |
| Ignoring touch devices | @media (hover: hover) for hover-dependent interactions |
| Over-designing | The simplest solution that works is the best solution |
| Designing only the happy path | Map user flows first; design for empty, error, loading, and unauthorized states |
| Inconsistent terminology ("Delete" vs "Remove") | Standardize action labels and button names project-wide |
| Mixing icon styles (fill + outline + varying weights) | Use one icon library consistently (Lucide, Phosphor, etc.) |
| Stacking multiple effects (gradient + shadow + glow) | Pick one subtle effect or none; less is almost always better |
| No feedback after user actions | Gray out buttons on click, show loading indicators, use toasts for confirmation |
| Over-designed charts (rounded bars, missing axes) | Simple charts with clear axes, labels, and hover states showing values |
| No empty state design | Design intentional empty states with guidance on what to do next |
| Using Lorem Ipsum in prototypes | Use real or realistic content to catch layout and flow issues early |
For frontend code architecture decisions (rendering strategies, state management, component file organization, MVC/MVVM patterns), see the architecting-frontend skill (if available).
This skill focuses on visual design and UX — how the interface looks, feels, and behaves.
data-ai
Downloads YouTube videos, transcribes audio via OpenAI Whisper, and produces summaries stored locally. Covers yt-dlp download, audio extraction, transcription, caching, and summarization. Use when a YouTube link is shared and the user wants a transcript or summary
development
Runs an adversarial code review loop that spawns independent reviewer and fixer subagents, iterating until only nitpicks remain. Scores findings by confidence, fixes real issues, and re-reviews with fresh eyes — all internal, no GitHub comments. Use when asked to review code, self-review, adversarial review, or polish code before pushing
development
Creates implementation-ready plans through discovery interviews, external research, and codebase analysis. Covers requirements, competitor research, architecture decisions, and change sequencing. Use when planning features, roadmaps, specs, or any work that needs discovery before coding
development
Generates an autonomous game design loop that iteratively expands a game concept into a comprehensive vision and implementation plan across multiple sessions. Covers mechanic exploration, system design, competitor research, and plan generation. Use when developing a game idea from seed concept to full implementation plan