agentleFS
milad-ahmdmilad-ahmd/agent-skills/skills/ui-taste/SKILL.md

ui-taste

Skill5 starsChanged 17 days agoMITView on GitHub

Polishes an existing web UI so it looks deliberate, without a redesign. A bundled lint scores CSS, SCSS, Less, inline styles and Tailwind classes from 0 to 100 on type scale, font families, palette size and near-duplicate colours, the 4px spacing grid, radii and shadows, WCAG contrast of colour pairs set together, !important and z-index wars, Tailwind arbitrary values and generic AI-look signals (purple-blue gradients, emoji as icons, everything centred), with file:line examples. Fixes go into design tokens (CSS variables or the Tailwind theme), then it re-lints against a saved baseline and compares before and after screenshots. Use when the user asks to polish or tidy up a UI, make the design consistent, make an app look less generic, less AI-generated or less like a template, clean up messy CSS or Tailwind styles, set up a type scale, spacing scale or colour tokens, or add a design consistency lint to CI.

1 other project uses 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, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a browser or screenshot tool is available, capture the main screens at desktop width and at 375px before you change anything.

    line 38
  2. Distinctive:

    Start with the categories that lost the most points, and fix each one as a set instead of patching values one at a time.

    line 44
  3. Very specific:

    Write the tokens once, as custom properties on :root for plain CSS, @theme { --color-brand: ....

    line 47
  4. Distinctive:

    Before and after score per category, the tokens you added, the five biggest changes with file:line, before and after screenshots if you …

    line 63

≈ “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

UI Taste

Most UIs that look cheap have the same problem: too many one-off values. Six greys that should be one, eleven font sizes, padding of 13px next to 16px. Consolidating them into a few tokens fixes more than any new component library would.

1. Lint and save a baseline

python3 scripts/ui_lint.py src --json > /tmp/ui-before.json   # keep this for step 4
python3 scripts/ui_lint.py src                                # readable report with file:line examples
python3 scripts/ui_lint.py src --exclude 'src/legacy/*' --exclude '*theme.generated.css'

It reads .css/.scss/.less, <style> blocks, inline style attributes and objects, styled/css template literals, and Tailwind classes in class/className and cn()/clsx()/cva() calls in .html/.vue/.svelte/.astro/.jsx/.tsx (--include-js adds .js/.ts). It skips node_modules, dist, build, vendor, *.min.*, minified files and CSS with a /*! license banner. Exclude generated themes yourself: a 20,000-line UI kit stylesheet will swamp the score.

categoryptsfull marks when
type scale158 or fewer distinct font sizes (px, rem and pt normalised at a 16px root)
fonts102 or fewer primary families
colours2016 or fewer distinct colours, no near-duplicates (CIE76 delta-E <= 3), at most 4 hue groups (one accent plus status colours)
spacing15margin, padding and gap on the 4px grid (--grid 8 for an 8px system). Tailwind scale classes count as on-grid
radii/shadows104 or fewer of each
contrast10colour and background set in the same rule or element pass WCAG AA (4.5:1, or 3:1 for large text)
overrides8rare !important, no z-index above 1000, at most 6 z-index values
arbitrary values7few Tailwind p-[13px], text-[#3b82f6] style values ([var(--x)] is fine)
generic look5no purple/blue gradient, under 4 gradients, under 3 emoji in markup, not nearly everything centred

Each category scores weight x health (0 to 1); the exact formulas are in --help. A category with nothing to measure gets full marks and shows n/a. Exit codes: 0 ok · 1 score below --fail-below N · 2 nothing to scan.

Limits: it scans with regexes. It does not see the cascade, media queries, the Tailwind config or the rendered page. Contrast is only checked where it can resolve both colours (literals, var(), shadcn-style --x: 222 47% 11% tokens, Tailwind classes that map to a CSS variable). Light-theme tokens are measured and .dark overrides are skipped.

2. Look at the page

If a browser or screenshot tool is available, capture the main screens at desktop width and at 375px before you change anything. Then check what the lint can't see.

Each view should have one primary action. Two filled accent buttons side by side means neither of them is primary. Body text should be left-aligned inside one container width, with edges that line up from section to section. Paragraphs read best at 45 to 75 characters per line (max-width: 65ch or max-w-prose). The generic look also shows up in layout: a gradient hero over a centred stack of identical cards, emoji standing in for icons, glass blur on every panel.

3. Fix by consolidating into tokens

Start with the categories that lost the most points, and fix each one as a set instead of patching values one at a time.

  1. Pick the scale from what is already there. The report lists every font size in use, so keep the common ones as steps (for example 12/14/16/18/20/24/30/36) and move the rare ones to the nearest step. Do the same for spacing in multiples of 4, radii (say 4, 8 and full) and shadows (sm, md, lg).
  2. Write the tokens once, as custom properties on :root for plain CSS, @theme { --color-brand: ...; } in the CSS entry file for Tailwind v4, theme.extend in tailwind.config.js for Tailwind v3, or a _tokens.scss partial.
  3. Replace the literals with the tokens. In each near-duplicate group keep the most used value, which the report lists first. Once brand is in the theme, text-[#3b82f6] becomes text-brand.
  4. Take neutrals from one family (not gray and slate both), keep one accent, and use red, green and amber only for status. Fix contrast by darkening the text, not by changing the brand colour.
  5. Swap z-index: 99999 for a short named set (dropdown, sticky, modal, toast). Remove an !important once the selector it was fighting is fixed.

4. Re-lint and compare

python3 scripts/ui_lint.py src --baseline /tmp/ui-before.json   # Score: 81/100 (was 46, +35), with per-category change
python3 scripts/ui_lint.py src --fail-below 70                   # CI gate once the team agrees on a floor

Take the same screenshots again and compare them side by side. The page should look calmer and the same overall. If the layout moved or a brand colour changed, revert that part.

Report

Before and after score per category, the tokens you added, the five biggest changes with file:line, before and after screenshots if you took them, and what you left alone and why (for example a 13px value that aligns an icon on purpose).

Rules

Don't change brand colours, fonts or the layout structure without asking; propose the change and show it. Don't add a UI library or CSS framework to get consistency. Don't chase the score: a one-off value that is right for the design stays, with a line in the report saying why. Leave vendored, generated and third-party styles alone and exclude them from the lint. For a full accessibility audit (keyboard, screen readers, ARIA) use a11y-fixer; this skill only checks colour contrast.

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.