agentleFS
Owl-ListenerOwl-Listener/designpowers/skills/ui-composition/SKILL.md

ui-composition

Skill249 starsChanged 6 months agoMITView on GitHub

Use when building layouts, choosing colours, setting typography, establishing visual hierarchy, designing responsive behaviour, or making any visual design decision — ensures every visual choice serves both aesthetics and accessibility

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 17 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before making visual decisions, confirm you have:

    line 24
  2. Distinctive:

    Ensure the grid adapts across breakpoints (mobile, tablet, desktop)

    line 33
  3. Distinctive:

    Test that content reflows sensibly when zoomed to 200%

    line 34
  4. Distinctive:

    Ensure the hierarchy communicates through structure, not colour alone

    line 38
  5. Distinctive:

    Verify that removing all colour still leaves a readable, navigable page

    line 39
  6. Distinctive:

    Use a consistent spacing scale (e.g., 4px base)

    line 42
  7. Distinctive:

    Ensure touch targets are at least 44x44px

    line 43
  8. Distinctive:

    Every colour pairing must meet WCAG AA contrast ratios minimum (4.5:1 for text, 3:1 for large text and UI components)

    line 50
  9. Distinctive:

    Never convey information through colour alone

    line 54
  10. Distinctive:

    Always pair colour with text labels, icons, or patterns

    line 55
  11. Distinctive:

    Test with simulated colour blindness (protanopia, deuteranopia, tritanopia)

    line 56
  12. Distinctive:

    If applicable, design dark mode as a first-class experience, not an afterthought

    line 59
  13. Distinctive:

    Ensure all contrast ratios hold in both modes

    line 60
  14. Distinctive:

    Avoid justified text (ragged right is more readable for most people)

    line 73
  15. Distinctive:

    Ensure text can be resized to 200% without loss of content or functionality

    line 74
  16. Distinctive:

    Ensure the chosen font has distinct characters for I, l, 1 and O, 0

    line 78
  17. Distinctive:

    No information is hidden that was visible at other breakpoints (unless intentionally progressive)

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

UI Composition

Visual design is where intent becomes tangible. Every colour, every spacing decision, every typographic choice either includes or excludes people. This skill ensures visual decisions are principled, systematic, and inclusive.

When to Use

  • Designing screen layouts or page structures
  • Choosing or refining colour palettes
  • Setting typography systems
  • Establishing spacing and grid systems
  • Designing for responsive breakpoints
  • Creating or modifying visual hierarchy
  • Designing dark mode or high contrast variants

Process

Step 1: Reference the Foundation

Before making visual decisions, confirm you have:

  • Design brief or strategy (from earlier phases)
  • Personas (especially ability spectrum considerations)
  • Existing design system (invoke design-system-alignment if one exists)

Step 2: Layout and Structure

Grid system:

  • Define columns, gutters, and margins
  • Ensure the grid adapts across breakpoints (mobile, tablet, desktop)
  • Test that content reflows sensibly when zoomed to 200%

Visual hierarchy:

  • Establish a clear reading order that works both visually and in the DOM
  • Ensure the hierarchy communicates through structure, not colour alone
  • Verify that removing all colour still leaves a readable, navigable page

Spacing system:

  • Use a consistent spacing scale (e.g., 4px base)
  • Ensure touch targets are at least 44x44px
  • Provide adequate spacing between interactive elements to prevent accidental activation

Step 3: Colour

Palette construction:

  • Define primary, secondary, neutral, and semantic colours (success, warning, error, info)
  • Every colour pairing must meet WCAG AA contrast ratios minimum (4.5:1 for text, 3:1 for large text and UI components)
  • Target WCAG AAA (7:1) where feasible

Colour independence:

  • Never convey information through colour alone
  • Always pair colour with text labels, icons, or patterns
  • Test with simulated colour blindness (protanopia, deuteranopia, tritanopia)

Dark mode / high contrast:

  • If applicable, design dark mode as a first-class experience, not an afterthought
  • Ensure all contrast ratios hold in both modes
  • Respect prefers-color-scheme and prefers-contrast media queries

Step 4: Typography

Type scale:

  • Define a modular scale with clear hierarchy (heading levels, body, caption, label)
  • Base body size: minimum 16px (1rem)
  • Line height: 1.5 for body text, 1.2-1.3 for headings

Readability:

  • Line length: 45-75 characters for body text
  • Paragraph spacing: at least 1.5x the font size
  • Avoid justified text (ragged right is more readable for most people)
  • Ensure text can be resized to 200% without loss of content or functionality

Font selection:

  • Prioritise legibility over personality
  • Ensure the chosen font has distinct characters for I, l, 1 and O, 0
  • Provide fallback fonts in the same classification

Step 5: Responsive Design

Design for these breakpoints (adjust to project needs):

  • Mobile (320-480px): single column, stacked layout, thumb-reachable interactions
  • Tablet (481-1024px): flexible layout, touch and pointer support
  • Desktop (1025px+): multi-column, keyboard and pointer optimised

At every breakpoint:

  • Content priority remains correct
  • Touch targets remain adequate
  • Text remains readable without horizontal scrolling
  • No information is hidden that was visible at other breakpoints (unless intentionally progressive)

Step 6: Document Decisions

For each visual decision, document:

  • What: the decision made
  • Why: how it serves the design principles and personas
  • Accessibility: how it meets inclusive design requirements

Integration

  • Called by: writing-design-plans (as part of plan execution)
  • Pairs with: design-system-alignment (for consistency), cognitive-accessibility (for visual load), adaptive-interfaces (for user preferences)
  • Reviewed by: designpowers-critique

Quick Reference: Accessibility Minimums

ElementRequirement
Text contrast4.5:1 (AA) or 7:1 (AAA)
Large text contrast3:1 minimum
UI component contrast3:1 against adjacent colours
Touch target44x44px minimum
Focus indicatorVisible, 3:1 contrast against adjacent
Text resizeContent usable at 200% zoom
Colour aloneNever the sole indicator of state or meaning

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.