web-design-guidelines
Use this skill whenever a layout, type system, color choice, spacing decision, or visual hierarchy is being made or evaluated. Apply when something on a page feels off but it isn't clear why — when a section is technically rendered but the eye can't find what to look at first, when type sizes feel arbitrary, when colors feel mismatched, when spacing reads as either too crammed or too empty. Especi
Front matter
name: web-design-guidelines
description: Use this skill whenever a layout, type system, color choice, spacing decision, or visual hierarchy is being made or evaluated. Apply when something on a page feels off but it isn't clear why — when a section is technically rendered but the eye can't find what to look at first, when type sizes feel arbitrary, when colors feel mismatched, when spacing reads as either too crammed or too empty. Especially relevant on first-draft layouts where the structure is set but the visual decisions haven't been calibrated against universal usability principles (Fitts, Hick, Gestalt, type pairing, color theory, spacing scales). Treat as the first-principles audit you run BEFORE applying any specific aesthetic.
license: MITweb-design-guidelines — universal design principles for web surfaces
When this skill activates, audit the work against the 10 universal-design-principles checklist below. Surface 1-3 concrete fixes per principle when violations are found.
1. Visual hierarchy (Gestalt + Z-pattern)
- One primary focal point per screen — the eye should know where to go first. Test: blur the screen and squint; is there a clear anchor?
- Secondary elements support the primary, do not compete. Use size, weight, color, and positional hierarchy in that order of strength.
- F-pattern for text-heavy pages; Z-pattern for marketing/landing pages.
2. Spacing scale (8-point grid by default)
- Use a consistent spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128. Avoid 5, 7, 13, 17, etc.
- Internal padding < external margin (a button's internal padding < space between adjacent buttons).
- Whitespace is a design element, not absence of one. Cramped sections fail.
3. Type system (max 2 typefaces, deliberate scale)
- 1-2 typefaces total. Pair a display/heading face with a body face if using two; never three.
- Type scale follows a ratio (1.125 minor second, 1.25 major third, 1.333 perfect fourth, 1.5 perfect fifth, 1.618 golden). Pick one, apply throughout.
- Line height: 1.4-1.6 for body, 1.1-1.3 for headings.
- Line length: 50-75 characters for readable body text. Wider = harder to scan.
4. Color system (60-30-10 rule)
- 60% neutral, 30% secondary, 10% accent. Never let accent become the dominant color.
- Define color tokens: 1 background, 1 surface, 1 text-primary, 1 text-secondary, 1-2 accents, 4 semantic (success/warning/error/info).
- Use OKLCH or HSL for tokens to allow consistent saturation/lightness adjustments.
5. Fitts's Law — make important things big and reachable
- Primary CTA is the largest interactive element on the surface (or visually dominant via color contrast).
- Place primary actions where the cursor naturally lands (right side for forms, bottom-center for mobile).
- Touch targets >= 44×44 px on mobile.
6. Hick's Law — fewer choices = faster decisions
- Cap top-nav items at 5-7. Use grouping if more.
- Cap CTAs per screen at 1 primary + 1-2 secondary.
- Progressive disclosure: hide advanced options until the user signals readiness.
7. Gestalt grouping
- Proximity: related items closer than unrelated ones.
- Similarity: same-purpose items share visual style.
- Closure: forms feel complete via consistent field heights and shared backgrounds.
- Continuity: align elements on shared invisible axes (the grid).
8. Alignment + grid
- Every element aligns to a grid (12-col most common for web). Misaligned elements look broken.
- Optical alignment trumps mathematical alignment for icons and rounded shapes.
9. Contrast + breathing room
- Strong contrast between layout zones (hero / content / footer have distinct visual treatment).
- Negative space around primary content. Crowded layouts feel cheap.
10. Slop-pattern avoidance
Before declaring done, check for these AI-default failures:
- Three identical feature cards in a row with center-aligned icon + heading + body. (Generic.)
- Gradient hero background that fades top-to-bottom with one floating headline. (Generic.)
- "Trusted by" logo strip below the fold. (Add only if logos are real and recognizable.)
- Symmetrical two-column "everything pairs visually" layouts. (Asymmetry adds interest.)
- Default system fonts on a section that wants to feel premium. (Pick a specific face.)
Canonical references
- Universal Principles of Design by Lidwell/Butler/Holden — the 125-principles book this skill distills
- Refactoring UI by Adam Wathan + Steve Schoger — refactoringui.com
- Material Design 3 — m3.material.io
- Apple Human Interface Guidelines — developer.apple.com/design/human-interface-guidelines
- Practical Typography by Matthew Butterick — practicaltypography.com
- web.dev/design patterns — web.dev/learn/design
When NOT to apply
Doesn't apply to non-visual work (logic, data, API contracts). Applies the moment a layout, color, type, or spacing decision is being made — even on internal dashboards. Internal ≠ ugly.
Compose with
- For motion, also load
design-motion-principles+emil-kowalski-design. - For final-pass slop check, also load
taste-skill. - For accessibility floor, also load
web-accessibility. - For framework-level composition, also load
frontend-design(Anthropic flagship).
Source: written by One Giant Leap.
Related entries
- responsive-design - detailed patterns and worked examples
- web-accessibility
- visual-design-foundations
- Theming Architecture
- Research Poster Design Principles (latex posters) (Claude Code templates (davila7))
- Slide Design Principles for Scientific Presentations (scientific slides) (Scientific agent skills)
There are more like this in the members library
The Claude Code library holds 13,843 entries. Members can search all of them by meaning and read every one in full.