Communitygithub.com

ui-polish

Takes a working interface from fine to finished: scores it, names the weakest thing, designs every state, runs the 20 design tips and the details table (type, spacing, grays, shadows, hit areas, focus, contrast, layout shift, forms, empty states), then verifies frame by frame with capture scripts. Use when a screen works but feels off, to polish or review UI. AI-looking screens go to ui-unslop first; motion design goes to ui-motion.

What is ui-polish?

ui-polish is a Claude Code agent skill that takes a working interface from fine to finished: scores it, names the weakest thing, designs every state, runs the 20 design tips and the details table (type, spacing, grays, shadows, hit areas, focus, contrast, layout shift, forms, empty states), then verifies frame by frame with capture scripts. Use when a screen works but feels off, to polish or review UI. AI-looking screens go to ui-unslop first; motion design goes to ui-motion.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/TamizhSK/kiln-skills/tree/HEAD/skills/ui-polish

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Polish

Most work stops at level 3 of 10, because it works and it's easy to stop. The difference between fine and great is rarely the idea; it's how far the idea gets pushed. Most "something feels off" problems are one wrong note, so look, measure and name it before changing anything.

Run it

  1. Match the stack. Find how the project styles things (Tailwind, CSS variables, CSS Modules, a component library's theme) and make every fix there. When the project has tokens of a kind, a fix of that kind changes or adds a token. Why: a token fix lands on every screen at once; a one-off value is the next screen's bug.
  2. Render it at its real size and at the smallest size it will be seen (375 px wide at least), in every theme. Capture each state and each motion as frames (Verify, below). Measure in the pixels people see: on a scaled stage a 42 px button may be 37 px on screen.
  3. Score it against the anchors below and name the weakest thing on screen in one sentence.
  4. Take stock: every text style (size, weight, line height, alignment), every gray and brand colour, every box with text in it (buttons, fields, toasts, chips), every heading, every row holding a destructive action, and every form, table, empty state and landing hero. This decides which checks run.
  5. Structure: fix hierarchy and containers before details. Polishing the wrong structure is wasted work (ux-laws owns this if it's the real problem).
  6. States: map every state, including empty, loading, error, success and offline, and design the unhappy ones.
  7. Details: walk the 20 tips in references/tips.md, in its order (type, spacing, colour, components, copy, states), then the details table below.
  8. Motion: run ui-motion on every interaction in scope. Without it, use the minimum at the end of this file.
  9. Verify frame by frame (below). Nothing is done until you've looked at the frames.
  10. Climb: run the loop until two passes in a row find nothing that changes the score.

Reviewing instead of changing? Stop before step 10 and change nothing. Open with the stock list from step 4, then one row per finding, sorted by severity, then by where it is on screen:

SeverityRuleWhereBeforeAfter
brokenTip 5, Delete far from SaveEditProject.tsx:48Delete sits between Cancel and SaveDelete first in the footer with margin-inline-end: auto
polishTips 2, 13, button paddingbutton.css:12padding: 24px 22px, label fills 30%padding: 10px 20px, label fills 51%

Severity is broken (someone can hit the wrong action, lose what they typed, get stuck, can't read it, or a state is missing), friction (slower to read, scan or decide than it needs to be) or polish (looks off, slows no one). Where is the file and line, or the screen, element and frame. When one value breaks two rules, one row names both. List the checks you couldn't run after the table.

Score anchors

ScoreIt means
3It works, and looks like everything else
5Designed at rest, but unhappy states or motion are default
7Every state is designed and motion is correct; nothing is memorable yet
8One thing people would screenshot, no visible defect at the viewing size
9That thing holds up in every state and input path, and a rival would copy it
10Don't award this to your own work

The climb

Early levels fix what's broken, and you can see what to do. Later levels are invention, and you can't, so use a move:

Stuck becauseMove
You don't know what better isZoom in. Take one element at 3×. What if this were the only thing on screen?
It's busyRemove something. Did you actually need it?
It feels offName it in one sentence, even before you know the fix
It's fine but plainReference the best. List what the world-class version does that yours doesn't
You keep tweaking one ideaGenerate more. Three genuinely different versions, compared at real size; keep one
You can't see it anymoreCritique. A fresh reader with no context, or re-read your work as a rival would
  • Each level is one nameable move with a reason. "Add a spring" isn't a reason; "it can be redirected mid-flight, so it never blocks you" is.
  • Make the first leap the biggest. Default to designed must be obvious in a still.
  • Each level is strictly better than the last. Never ship a deliberately broken step.
  • Name the thing people would screenshot. If there isn't one, that's the next job.
  • Push the concept into the material, not effects on top. If the idea is a pressure gauge, the needle is the loading state, not a spinner beside it.
  • Undo your own decisions when they stop holding up. Restraint counts as a level.
  • Land success as the peak. If success is only a label swap, push the concept into it.
  • Every input path reaches the same ending: pointer, keyboard, a slow gesture and reduced motion.

Details table

Absence is what gets noticed, so run all of these. Short on time: start with forms, hit area, contrast and layout shift, the ones people feel. The 20 tips cover type, button sizing, padding, heading space, grays, text on colour, hue, dark-mode chroma, shadows, labels, table numbers, sentence case, button labels, empty states and landing CTAs; this table covers the rest.

CheckRuleWhy
Fonts-webkit-font-smoothing: antialiased; subset filesCrisper text, nothing unused shipped
Field and buttonA resting button and a field never share one fill. The field stays brightest; a waiting button sits one tone downTwo identical slabs hide which one you type in
Dynamic numberstabular-numsDigits that change width make neighbours jiggle
WeightNever change font-weight on hover or selection; use colourIt reflows text
Layout shiftFixed dimensions or aspect-ratio for skeletons, images, async content; reserve space for messagesJumping content reads as broken
Typography… ’ “ ”; text-wrap: balance on headings, pretty on body; 45–75ch measurePunctuation and rag are where care shows
TrackingCaps +0.08em at any size. Other text: none below 28px, −0.01em at 28–47px, −0.022em from 48pxLarge type wants tighter, caps want air
SizesAt most 5 type sizes, one vertical gridFewer things
AlignmentAt most 2–3 dominant vertical lines; icons on a centre spine, text on a left edgeStray lines are what "off" usually is
OpticalIcon side of a button −2 to −3 px padding; play triangles 2 px toward the point; fix asymmetric icons in the SVGEqual numbers often look unequal
RadiusInner = outer − padding; one radius familyMismatched nesting is visible
BordersTransparent rings: box-shadow: 0 0 0 1px rgb(0 0 0/.08)They adapt to any surface
StyleOne icon style, one material, one neutral temperatureThe odd one out reads as a bug
Colour fitSuccess and error are hues from the page's palette, or moved toward it; real-world meanings stayA stock green check on an ink page reads as borrowed
ContrastBody and labels ≥4.5:1, large text and icons ≥3:1, over the real background. Nothing people must read under 12 px"Legible" isn't a judgment call (ui-color measures it)
Pressscale(0.97), never below 0.95Tactile without exaggeration
HoverNamed properties, ~150ms; gated to (hover: hover); no layout changetransition: all animates things you didn't choose
FocusNever remove it. A 2px ring at 3:1 against its surface and the unfocused state; neutral when that passesKeyboard users lose their place (WCAG 1.4.11, 2.4.13)
Hit area≥44×44pt iOS, ≥48×48dp Android, ≥40×40px desktop, via a pseudo-element; never overlappingSmall targets miss (Fitts's law)
Stackingisolation: isolate or a fixed z-index scale9999 means nobody knows
Decorationpointer-events: none, user-select: noneIt can't steal clicks
First paintResolve state before render: never default-then-correctPrevents flashes
Forms16px inputs, real labels, autocomplete, Enter submits, errors keep what was typedDon't punish; prevent
OverlapWhen one element grows into another, fade the neighbour out and backCollisions look like bugs
Cast lightWindow shadows and light patterns stop at an object's edgeUnbroken bars read as seeing through the object

Shadows on light surfaces are layered and tinted toward the light (tip 7). On dark surfaces depth comes from lighter raised surfaces, softer text and calmer accents; pure black with neon is inversion, not design.

Verify frame by frame

Motion you haven't looked at frame by frame isn't verified: an eye on a running page misses the one-frame pops that make it feel off. Install the scripts once with npm install --prefix <skill>/scripts.

  1. Capture on a virtual clock. node <skill>/scripts/web-frames.mjs <url or file.html> --motion 1200 --trigger click:<selector> --widths 390,1440 writes one PNG per frame at 60 fps and a contact sheet labelled in ms. Time is faked and stepped exactly, so every run gives the same frames. Triggers are load, click:, hover:, scroll:<y> and js:<code>; --clip x,y,w,h zooms in, --reduced-motion and --scheme dark cover the other paths. Without --motion it captures stills at every width (--scheme both, --full, --before "<js>" to set a state). Every run writes console.txt, which must be empty.
  2. Plot before you read. node <skill>/scripts/frame-diff.mjs <frames folder> plots how much each frame changes. A pop, flash or swap is a red spike with still frames around it; a dead stretch is shaded grey. Read the frames it names first, then the contact sheet.
  3. Recordings (iOS Simulator, a device, anything ffmpeg reads): <skill>/scripts/sim.sh start out.mp4, interact, sim.sh stop out.mp4, then node <skill>/scripts/sheet.mjs out.mp4 sheet.png --auto --keep frames/ and frame-diff.mjs frames/. sim.sh shot <file> takes a full-resolution still.
  4. Measure, don't eyeball. node <skill>/scripts/edges.mjs <capture.png> --rows y0-y1 --scale 2 prints each element's edges and gaps in points (--cols x0-x1 for vertical gaps), for the alignment, hit area and spacing checks.
  5. Scrubbed controls: drag each one slowly out and back and read every frame on the way back. A value going to zero gets there continuously.

Run one capture at a time. Check:

  • First frame: the response starts at once.
  • Origin: something emanating from a trigger starts at the trigger's centre in screen space. Print the numbers.
  • Last frame: it settles with no pop, snap or re-layout.
  • No flash: no frame shows a wrong state. Test every state pair, under both OS schemes.
  • Readable: words are held long enough to read.
  • No twitch, no collisions: no backward jump, element swap mid-move, or accidental overlap.
  • Reversal: interrupt halfway; it returns smoothly to the right place.
  • Same ending: pointer, keyboard and reduced motion finish on the same state.
  • Empty submit and stopped states say something in words.
  • The 20 tips' Verify list (end of tips.md): computed styles, colours, spacing, labels, empty data, strings, footers, tables, hero.
  • Reduced motion, keyboard path, and no console errors.

Then check at the final viewing size: the smallest important text is legible, and the change you're proud of is visible there.

Final read: what's the weakest thing on screen now? If fixing it would change the score, you aren't done. If it wouldn't, stop.

Motion minimum (when ui-motion isn't loaded)

  • Used 100+ times a day or from the keyboard → no animation. Occasional (menu, modal, drawer) → under 300ms. Rare (success, onboarding) → may be choreographed, up to ~2.5s.
  • Entering or leaving → ease-out cubic-bezier(0.32, 0.72, 0, 1). Moving on screen → ease-in-out cubic-bezier(0.77, 0, 0.175, 1). Follows a finger → spring, duration 0.5, bounce 0. Never ease-in for an entrance.
  • Hover 100–150ms, popover 150–250ms, modal or drawer 200–300ms, page 300–400ms. Exits 20–30% faster.
  • Only transform and opacity (blur under 20px). Enter from scale(0.95) and opacity: 0, never scale(0). Interruptible by default. prefers-reduced-motion keeps the information and drops the movement.

Deliver

  • Building: the change, made in the project's tokens and components. Then the score before and after, one line per rule you applied (where, before → after), one per rule you broke on purpose with the reason, and the checks you ran with their results.
  • Reviewing: the stock list, the findings table, problems no rule covers, and the checks you couldn't run.

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

launch-audit

Audits an app built fast with AI for what can get it hacked, sued or hit with a surprise bill: leaked keys, open databases, no rate limits or spending caps, injection, AI features, payments, privacy and consent, texts, kids' and face data, app store and accessibility rules. Every finding comes with proof and a fix. Use when someone asks to audit, security-check or launch-check an app.

ui-color

Critiques the colour of a screen, image or palette with measurements: routes by what it's for (graphic, landing page, app, palette), measures 60/30/10 area, lightness, hue gaps, chroma, temperature and APCA/WCAG contrast, and ranks fixes in exact OKLCH and hex with before/after previews. Use when colours clash or feel muddy, garish or off, or to judge a palette, an accent, or someone's colour critique.

ui-motion

Decides how an interface moves and responds: whether it should animate at all, response time and optimistic updates, staging and stagger, easing, duration, origin, springs, arcs, icon swaps, press and hover, interruptibility, with exact recipes for modals, drawers, popovers, tooltips, toasts and async buttons. Use when animating UI or reviewing motion, or when it feels slow, janky or off. Usability laws go to ux-laws.

ux-laws

Designs or reviews a screen or flow by the laws of UX as one procedure: name the job, cut what doesn't help, take work off people (Tesler, defaults, recognition), group (proximity, common region, similarity), point the eye at one thing, size targets and choices (Fitts, Hick, Miller, Jakob, Postel), carry people to the end, then polish. Use when a screen or flow (forms, settings, checkout, onboarding, dashboards) feels confusing, cluttered or hard to use.

Related Skills