1---2name: frontend3description: Context-led frontend design. Derives art direction from product, audience, brand, content, and the existing system; avoids generic defaults. Triggers: frontend, UI, CSS, styling, visual, theme, component, layout, responsive, accessibility, design system, aesthetic, animation, motion, abyss, spatial, verdant, substrate, ember, arctic, void, patina, signal, kinetic-type, haunted-machine, cursor-field, real-weight, one-surface, liquid-material, held-breath, grand-tour.4---56<skill id="frontend">78<purpose>9Make interfaces feel intentional because their visual choices fit the actual product.10Distinctiveness is not a pile of effects. It is a coherent point of view with fewer11unexamined defaults.12</purpose>1314<context-fit>15Before styling, recover the evidence already present in the task and repository:16171. Product: what the interface does and which action matters most.182. Audience and use context: device, environment, familiarity, urgency, accessibility needs.193. Brand: existing tokens, logo, type, imagery, voice, screenshots, and reference qualities.204. Content: real density, length, hierarchy, empty/error/loading states, and localization risk.215. Technical constraints: current stack, component library, performance budget, supported browsers.2223Preserve and extend the existing design system when one exists. Do not replace a coherent24brand because a variant or personal preference is louder. If the evidence is incomplete,25make the smallest reversible assumption and state it; ask only when the answer changes the26product direction.27</context-fit>2829<art-direction>30Write a tiny direction before implementation:3132- desired feeling in 2-3 plain words;33- one dominant visual idea;34- typography, color, layout, imagery, and motion choices tied to evidence;35- 2-3 defaults to avoid for this specific project.3637No choice is universally premium. A system font can be correct for speed or platform38familiarity. Symmetry can communicate calm. Flat color can be the strongest choice. Huge39type, gradients, glass, noise, asymmetry, and animation are tools—not proof of taste.40</art-direction>4142<variants>43Optional lenses: abyss, spatial, verdant, substrate, ember, arctic, void, patina, signal.44Load `variants/{name}.md` when the user names one or when exploration genuinely benefits.45Variants describe mood, never mandatory components, fonts, palettes, effects, or layouts.46</variants>4748<motion-languages>49Optional motion lenses, orthogonal to mood variants: kinetic-type, haunted-machine,50cursor-field, real-weight, one-surface, liquid-material, held-breath, grand-tour.51Load `motion/{name}.md` when the user names one, when animation is central to the ask, or52when exploration genuinely benefits. A motion language defines how the page moves — its53dominant idea, signature move families, prohibitions, and reduced-motion degrade — never54specific components, libraries, durations, or easing values.5556Compose freely: any mood x any motion language, either alone, or neither. Context-fit57always wins over any lens; a lens bends to the content, never the reverse. Each language's58prohibition list is binding while that language is active — bans differentiate more than59moves do. All languages inherit the reduced-motion hard bar: every design must survive60with its motion stripped.61</motion-languages>6263<exploration>64When the brief is open and distinctiveness matters, run a small tournament: generate 2-365divergent interpretations of the same mood x motion pick (or different picks), compare66rendered results, fork the winner. A lens is a direction vector, not a template — two runs67of the same pick on different products should rhyme, never match.68</exploration>6970<hard-bars>71- Hierarchy: the primary action and reading order are obvious without explanation.72- Responsive: content fits and remains usable at the project breakpoints; touch targets are73 at least 44px where touch is expected.74- Accessible: semantic structure, keyboard operation, visible focus, useful labels/alt text,75 AA contrast, reduced-motion support, and no meaning encoded by color alone.76- Content-real: test realistic long/short copy plus empty, error, loading, and disabled states77 when the interface has them.78- Performance: avoid decorative weight that delays the main content; size images, subset or79 avoid webfonts, and use JavaScript only for behavior that needs it.80- System-fit: reuse the repository's components, tokens, naming, and state patterns unless the81 task explicitly includes changing the system.82</hard-bars>8384<implementation>85Use the smallest structure the product needs. Reusable components should follow the existing86stack; a one-off static section does not need a component framework. Centralize repeated87visual decisions in tokens. Prefer CSS for presentation, semantic HTML for structure, and88progressive enhancement for interaction.8990Motion must explain change, guide attention, or provide feedback. If it does none of those,91remove it. Decorative texture, depth, and unusual composition need the same justification.92</implementation>9394<anti-convergence>95Generic output usually comes from an unexamined default, not from a forbidden ingredient.96Before finishing, name the most dominant visual decision and ask:97981. What evidence caused this choice?992. Is it inherited from the product, or copied from recent model habits?1003. Would removing it make the interface clearer or more specific?101102Common warning signs—not automatic bans—include purple gradient startup pages, identical103rounded cards, default component-library styling, ornamental dashboards, centered-everything104layouts, decorative blobs, fake testimonials, and a fashionable font with no brand reason.105Change a warning sign when it is unexamined; keep it when the context earns it.106</anti-convergence>107108<verification>109Do visual QA on rendered output, not source alone. Inspect screenshots at the task's target110sizes (for a general web page, start with 375, 768, and 1440 widths), then exercise keyboard,111focus, hover/touch, overflow, and reduced motion. Fix the largest hierarchy or usability112problem first and re-check. Never claim visual completion without seeing the rendered result.113</verification>114115<reference>116Read `skills/frontend/reference/design-research.md` when deeper rationale is useful.117Read `skills/frontend/reference/component-sources.md` before pulling any third-party118animated component or effect: it lists vetted open-source libraries, per-library licenses,119a do-not-use ledger, and the binding rule — pull the primitive, restyle it to the active120direction, never ship it stock.121</reference>122123<on_complete>124Report the art direction, evidence behind the dominant choices, sizes/states visually checked,125and any accessibility or performance bar not verified.126</on_complete>127128</skill>