agentleFS
AluxadsAluxads/claude-skills/ux-laws/SKILL.md

ux-laws

Skill0 starsChanged 38 days agoMITView on GitHub

Apply named UX laws and measured interface specs to any screen, audit or build. Trigger /ux-laws, "ux laws", "ux audit", or before shipping a new screen, form, login, button or mobile layout.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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:

    Test each element against The laws table (screen type column tells which rows matter most) and the Numeric specs.

    line 24
  2. Distinctive:

    Write one findings row per break: path, element, law or spec broken, fix.

    line 25
  3. Distinctive:

    Run the audit steps on the result before calling it done.

    line 34
  4. Distinctive:

    Every interaction answers inside 400 milliseconds (Doherty threshold).

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

UX laws (named laws plus measured specs, one findings table)

Rule: every finding names the law or spec it breaks. No law invented, no number without a source row in references/sources.md.

When to use

  • Audit an existing screen, component or flow.
  • Build a new screen: choose the governing laws first, then apply the numbers.
  • Review a design or a pull request that touches buttons, forms, tables or fixed bars.
  • Skip for copy, SEO or brand questions. This skill covers interaction and layout only.

Run order

Audit an existing screen

  1. List every element on the screen: headings, fields, buttons, links, icons, table rows, bars, messages.
  2. Test each element against The laws table (screen type column tells which rows matter most) and the Numeric specs.
  3. Write one findings row per break: path, element, law or spec broken, fix.
  4. Apply the fixes, re test the changed elements, then print the score line (Output format).

Build a new screen

  1. Name the screen type: form, login, checkout, dashboard, list, navigation, onboarding, content, mobile. 1b. Check a screen library of tested flows from live apps (for example Mobbin or Screen Design) for that screen type before designing from scratch: those screens were A/B tested on large user bases. Adapt the winning pattern to the design tokens, record the source in the brief, never on the page.
  2. Pick the laws that govern that type (screen type column). Write the picks down before any code.
  3. Apply the Numeric specs for every button, field and mobile rule on the screen.
  4. Run the audit steps on the result before calling it done.

The laws

29 rows: 26 named laws and effects plus 3 principles that have no common name. Screen types: all, form, login, checkout, dashboard, list, nav, onboarding, content, mobile.

LawMeaningDoBites most on
Hick's lawMore choices, slower decision.Cut options per screen, split long menus into steps.nav, form, onboarding
Fitts's lawTime to hit a target depends on distance and size.Make targets large, put the main one in easy reach.mobile, form, checkout
Minimize target distanceRelated actions far apart cost time and errors.Keep key actions next to the content they act on.list, dashboard, form
Jakob's lawUsers expect your screen to work like others they know.Use familiar patterns and keep your own patterns consistent.nav, login, checkout
Law of proximityThings placed close read as one group.Group related items with space, separate groups with more space.form, dashboard, content
Law of similarityThings that look alike read as related.Style same function items the same, different function differently.nav, list, dashboard
Common regionItems inside one boundary read as a group.Put related items in one card or panel.dashboard, form, list
Uniform connectednessItems joined by a line or shape read as related.Link related elements visually with rules, lines or shared fills.form, onboarding, dashboard
Law of PragnanzThe eye reads the simplest shape it can.Use clean, simple forms, avoid ambiguous layouts.all
Visual hierarchySize, weight and colour set reading order.One clear first read, then second, then third.all
Von Restorff effectThe item that differs is the one remembered.Make the primary action the one thing that stands out.form, checkout, dashboard
Miller's lawWorking memory holds a short list.Break content into chunks, keep lists short.list, content, form
Doherty thresholdProductivity rises when the system answers fast.Answer every interaction inside 400 milliseconds, show progress if not.all
Feedback loopsEvery action needs a visible answer.Show a state change for each tap: pressed, loading, done.form, checkout, mobile
Serial position effectFirst and last items are remembered best.Put essentials first and last, weak items in the middle.nav, list, content
Peak end rulePeople judge a flow by its high point and its end.End the flow with a clear, pleasant finish.checkout, onboarding
Zeigarnik effectUnfinished tasks stay in mind.Show what is left and let people resume.onboarding, form
Goal gradientEffort rises as the finish gets closer.Show visible progress and make completion feel near.onboarding, checkout, form
Tesler's lawComplexity cannot be removed, only moved.Absorb the hard part in the system, simplify the interface.form, onboarding, dashboard
Postel's lawBe liberal in what you accept, strict in what you send.Accept messy input formats, output clean consistent results.form, checkout, login
Parkinson's lawWork expands to fill the time given.Cut steps and fields to shorten task completion time.form, checkout, onboarding
Occam's razorPrefer the simplest solution that works.Remove elements that do not earn their place.all
Pareto principleA minority of features serves most of the use.Design the common path first, tuck rare options away.dashboard, nav
Aesthetic usability effectPleasant screens feel easier to use.Polish spacing, alignment and type, users forgive more.all
Progressive disclosureShow advanced detail only when asked.Reveal complexity gradually, defaults first.form, dashboard, onboarding
Recognition over recallSeeing is easier than remembering.Show options and labels, never make users remember them.nav, form, list
Sensible defaultsMost users keep what is pre set.Pre fill the likely answer, let users change it.form, onboarding, checkout
Prevent errors, make them recoverableErrors cost trust and time.Block bad input early, offer undo and clear fix messages.form, checkout, login

Count check: Hick, Fitts, Minimize target distance, Jakob, proximity, similarity, common region, uniform connectedness, Pragnanz, visual hierarchy, Von Restorff, Miller, Doherty, feedback loops, serial position, peak end, Zeigarnik, goal gradient, Tesler, Postel, Parkinson, Occam, Pareto, aesthetic usability, progressive disclosure, recognition over recall = 26 named. Sensible defaults, prevent errors, make errors recoverable = 3 principles. The last row merges two principles, so rows and laws differ by one.

Numeric specs

Button (primary)

  • Height: 44 pixel minimum, aim 48. Side padding 24 pixels.
  • Label: 17 pixel semibold, sentence case, verb plus object ("Add to cart", never "OK" or "Submit").
  • Contrast: label above 4.5 to 1, edge above 3 to 1. A flat grey fill at 1.6 to 1 fails.
  • Radius: pill = height divided by 2 (24 at 48 pixels).
  • Icon: one only, 20 pixels wide, 10 pixels from the label.
  • Depth: light from above, shadow falls down (8 pixels down, 24 blur).
  • Hover: rim light in 200 milliseconds. Press: sinks 1 pixel.
  • Feedback in 100 milliseconds, done in 300. Sequence: spinner, then check.

Form and login

  • One primary action, everything else is a link.
  • 8 pixel grid. Fields 56 pixels tall, 16 pixels between fields, 32 pixels before the button. 40 pixel fields fail (hard to tap).
  • Real label above each field. Placeholder is an example, never the name.
  • One accent colour, kept for the button and links.
  • Focus ring 2 pixels, always visible, fades in within 150 milliseconds.
  • Three text tiers: title, subtitle, hint.
  • Radius: 24 on the card, 12 on fields and buttons. Shadow falls down.

Mobile

  • Under 640 pixels, table rows become cards.
  • Amounts stay on one line, shrink big figures on phones.
  • Input text 16 pixels minimum, or Safari zooms on tap. Set the keyboard type per field.
  • 44 pixel targets on touch only, mouse keeps the dense layout.
  • Fixed bottom bars: pad with the safe area and leave room under the content.

Timing

  • Every interaction answers inside 400 milliseconds (Doherty threshold).
  • Tap feedback 100 milliseconds, completion 300, focus ring 150, hover 200.

Output format

Findings table, one row per break:

PathElementLaw or spec brokenFix

Last line, one score: elements checked: N, broken: N, fixed: N.

Do not

  • Invent a law. Only rows in The laws table count.
  • Quote a number without a row in references/sources.md.
  • Apply the 44 pixel rule to mouse layouts.
  • Report a finding without the law or spec name and a concrete fix.
  • Hunt for every law on every screen: use the screen type column and test the governing ones.

Sources and transcription notes: references/sources.md.

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.