Frontend Design
Adapted for ApexCluster from anthropics/skills (skills/frontend-design, Apache-2.0).
Purpose
Produce cohesive, high-craft web interfaces and interactive prototypes rather than generic, boilerplate AI layouts. Pair deliberate visual direction with clean, maintainable, accessible frontend code.
Step 1: Establish Design Direction Before Coding
Define four concrete choices before writing markup or styles:
- Purpose & Audience: Identify the primary user action, viewport priorities (desktop vs. mobile), and real domain content. Avoid hollow placeholder copy.
- Aesthetic Thesis: Commit to one coherent visual direction (for example: editorial publication, precision technical console, warm tactile studio, Swiss minimalist grid, or architectural dark deck) instead of mixing clashing motifs.
- Typography & Hierarchy: Pick expressive display and readable body font stacks with clear scale contrast, tight display tracking, generous body line-height, and tabular numerals (
font-variant-numeric: tabular-nums) for metrics and tables. - Color & Surface Tokens: Define CSS custom properties for background canvas, elevated surfaces, primary/secondary ink, hairline borders, and one dominant accent plus semantic status tones. Verify WCAG AA contrast (
>= 4.5:1for body text,>= 3:1for large text and UI controls).
Step 2: Layout, Rhythm & Component Craft
- Spatial Hierarchy: Lead with one clear focal point per viewport. Use deliberate asymmetric grids, generous negative space, and consistent spacing scales rather than cramming uniform cards everywhere.
- Responsive Architecture: Design fluid layouts that adapt cleanly across desktop, tablet, and narrow mobile viewports without horizontal overflow or clipped controls.
- Interactive States: Implement explicit hover, focus-visible, active, loading, empty, and error states for every interactive control. Keyboard navigation and semantic landmarks (
header,main,nav,section,button) are mandatory. - Purposeful Motion: Prefer CSS transitions on
transformandopacityfor orchestrated page entry reveals and state feedback. Respectprefers-reduced-motion: reduce.
Step 3: Anti-Slop Guardrails
- Avoid overused cliché palettes (generic purple-on-white gradients), monotonous three-card SaaS hero templates, and gratuitous decorative badges that carry no information.
- Avoid heavy runtime dependencies when semantic HTML, modern CSS (Grid, Flexbox, Container Queries, Custom Properties), or the project's existing UI framework suffices.
- Keep component boundaries modular so visual prototypes can transition cleanly into production code.
Step 4: Verification & Delivery
- Verify rendered layout, responsive breakpoints, focus rings, and zero console/build errors using the workspace's build or browser inspection tools when available.
- Report exact files created/updated, design tokens chosen, and any remaining visual polish items requiring user review.


