UI polish

Polishes and improves the UI in your project.

How to use it

Claude Code
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/better-ui, including the files SKILL.md points to.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit jakubkrehel/skills/skills/better-ui#main ~/.claude/skills/better-ui

For one project only, change the path to .claude/skills/better-ui. This skill also uses surfaces.md, enter-exit.md, package.json, icon-transitions.md, animations.md, performance.md — copying SKILL.md alone won't be enough. See the folder on GitHub.

Claude (web or desktop app)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of UI polish

Show the full text113 lines
namedescription
better-uiPolishes and improves the UI in your project. Covers concentric border radius, optical alignment, surface depth, contextual icons, hit areas and more.

UI polish

Polish comes from a pile of small details that compound. This skill is the reference for which are worth having and what values they take.

When reviewing, slow the interface down. What feels off at 10% speed is what is subtly wrong at full speed.

Keep the project's component library, tokens and density, and match its motion language except where a rule below prescribes an exact interaction.

Every duration, curve, scale and blur below is a specific value, not a range to approximate. cubic-bezier(0.2, 0, 0, 1) is not cubic-bezier(0.4, 0, 0.2, 1), and 0.96 is not 0.95. Use what is written.

Text wrapping, font rendering, tabular numbers and text spacing belong to better-typography. Hit areas, focus, keyboard support, ARIA and reduced motion belong to better-accessibility. Grouping, section spacing, breakpoints and spatial RTL belong to better-layout.

Concentric border radius

Outer radius = inner radius + padding. Mismatched radii on nested elements is the most common thing that makes an interface feel off. Radius, shadow and outline recipes are in surfaces.md.

Optical over geometric alignment

When geometric centering looks off, align optically. Buttons with icons, play triangles and asymmetric icons all need a manual nudge.

Shadows for elevation, borders for structure

Where a border exists only to create depth, prefer layered transparent box-shadow values. Keep borders that communicate structure or state: dividers, separators and selected or focus states.

Interruptible animations

Use CSS transitions for interactive state changes, because they can be interrupted mid-animation. Reserve keyframes for staged sequences that run once.

Split and stagger enter animations

For an infrequent staged entrance where sequence communicates hierarchy, break the content into semantic chunks and stagger them by ~100ms. Animating one container gets you less for the same cost. Leave high-frequency interactions unstaggered. See enter-exit.md.

Subtle exit animations

Use a small fixed translateY rather than full height. Exits should be softer than enters. Use ease-out for both directions.

Contextual icon animations

Animate icons with opacity, scale and blur rather than toggling visibility. Use exactly these values: scale 0.25 to 1, opacity 0 to 1, blur 4px to 0px.

With a motion library (motion or framer-motion in package.json), match that package's import path, or nearby imports where both exist. Use transition: { type: "spring", duration: 0.3, bounce: 0 }. Bounce is always 0.

Without one, keep both icons in the DOM with one absolutely positioned, and cross-fade with cubic-bezier(0.2, 0, 0, 1). That gives you enter and exit with no dependency. Both recipes are in icon-transitions.md.

Image outlines

Give images a 1px outline at low opacity for consistent depth. Pure black in light mode (oklch(0 0 0 / 0.1)), pure white in dark (oklch(1 0 0 / 0.1)). Never a near-black like slate or zinc and never a tinted neutral. A tinted outline picks up the surface underneath and reads as dirt on the image edge.

Scale on press

A scale(0.96) on click gives a button tactile feedback. Always 0.96; anything below 0.95 feels exaggerated. Add a static prop to switch it off where motion would distract. See recipes for CSS, Tailwind and Motion.

Skip animation on page load

Use initial={false} on AnimatePresence to keep enter animations off the first render. Check that it leaves intentional page entrances intact.

Suppress transitions on theme switch

A theme flip changes color, background, border and shadow on nearly every element at once. Every transition on those properties fires together and the switch smears instead of snapping. Inject *,*::before,*::after{transition:none !important}, force a reflow, then remove it on the next frame. See the recipe.

Transition only what changes

Always name the exact properties: transition-property: scale, opacity. Tailwind's transition-transform covers transform, translate, scale, rotate.

Use will-change sparingly

Only for transform, opacity and filter, which the GPU can composite. Never will-change: all. Add it when you see first-frame stutter, not before. See performance.md.

Match icon stroke to text weight

An icon next to text carries the text's optical weight: 1.5px stroke beside regular (400) text, 2px beside semibold (600). One stroke weight per icon set and one icon library per surface. Sizing and RTL flipping are in icons.md.

One SVG, recolored per state

Icons use currentColor and take hover, selected and disabled states from CSS color and opacity, never from separate assets. Outline is the default variant; fill marks the active state.

Motion restraint

Give high-frequency interactions instant feedback, or a transition of 150ms or less on opacity and color. A custom animation there charges its attention cost on every trigger.

Every animated state change also needs a static cue: color, an icon, or a label. Motion is never the only feedback channel.

Before you finish

Mistake Fix
Icons look off-center Nudge optically with padding, or fix the SVG
Jarring staged entrance or exit Stagger infrequent entrances; keep exits subtle
Theme toggle crossfades the whole page Disable transitions for the swap, force a reflow, restore on the next frame
transition: all on elements Specify exact properties
First-frame animation stutter Add will-change: transform (sparingly)
Hairline icon beside bold text Match the stroke width to the text weight

Reporting

Severity. HIGH breaks an interaction, makes motion unusable, or leaves a state change visible only while the animation runs. MEDIUM is a visible inconsistency in surfaces, icons, or motion. LOW is isolated polish.

Verification. Without a browser: every state the component defines, meaning hover, focus, active, loading and empty, plus motion durations and easings read from the code. With one: walk each state, and replay motion at 10% speed in the browser's Animations panel. Report every check you could not run as Not verified.

Format. Group findings under the principle each violates, ordered by severity, one row per root cause listing every location it appears in:

Severity Location Before After Why

Location is path/to/file:line. Why names the principle and the user impact.

End with Block when any HIGH remains, Approve otherwise, leaving the rest in the table as work to do. Never Approve coverage you did not inspect. With nothing to report, state "No actionable UI-polish findings" and report verification.

1---
2name: better-ui
3description: Polishes and improves the UI in your project. Covers concentric border radius, optical alignment, surface depth, contextual icons, hit areas and more.
4---
5 
6# UI polish
7 
8Polish comes from a pile of small details that compound. This skill is the reference for which are worth having and what values they take.
9 
10When reviewing, slow the interface down. What feels off at 10% speed is what is subtly wrong at full speed.
11 
12Keep the project's component library, tokens and density, and match its motion language except where a rule below prescribes an exact interaction.
13 
14Every duration, curve, scale and blur below is a specific value, not a range to approximate. `cubic-bezier(0.2, 0, 0, 1)` is not `cubic-bezier(0.4, 0, 0.2, 1)`, and `0.96` is not `0.95`. Use what is written.
15 
16Text wrapping, font rendering, tabular numbers and text spacing belong to `better-typography`. Hit areas, focus, keyboard support, ARIA and reduced motion belong to `better-accessibility`. Grouping, section spacing, breakpoints and spatial RTL belong to `better-layout`.
17 
18## Concentric border radius
19 
20Outer radius = inner radius + padding. Mismatched radii on nested elements is the most common thing that makes an interface feel off. Radius, shadow and outline recipes are in [surfaces.md](surfaces.md).
21 
22## Optical over geometric alignment
23 
24When geometric centering looks off, align optically. Buttons with icons, play triangles and asymmetric icons all need a manual nudge.
25 
26## Shadows for elevation, borders for structure
27 
28Where a border exists only to create depth, prefer layered transparent `box-shadow` values. Keep borders that communicate structure or state: dividers, separators and selected or focus states.
29 
30## Interruptible animations
31 
32Use CSS transitions for interactive state changes, because they can be interrupted mid-animation. Reserve keyframes for staged sequences that run once.
33 
34## Split and stagger enter animations
35 
36For an infrequent staged entrance where sequence communicates hierarchy, break the content into semantic chunks and stagger them by ~100ms. Animating one container gets you less for the same cost. Leave high-frequency interactions unstaggered. See [enter-exit.md](enter-exit.md).
37 
38## Subtle exit animations
39 
40Use a small fixed `translateY` rather than full height. Exits should be softer than enters. Use `ease-out` for both directions.
41 
42## Contextual icon animations
43 
44Animate icons with `opacity`, `scale` and `blur` rather than toggling visibility. Use exactly these values: scale `0.25` to `1`, opacity `0` to `1`, blur `4px` to `0px`.
45 
46With a motion library (`motion` or `framer-motion` in `package.json`), match that package's import path, or nearby imports where both exist. Use `transition: { type: "spring", duration: 0.3, bounce: 0 }`. Bounce is always `0`.
47 
48Without one, keep both icons in the DOM with one absolutely positioned, and cross-fade with `cubic-bezier(0.2, 0, 0, 1)`. That gives you enter and exit with no dependency. Both recipes are in [icon-transitions.md](icon-transitions.md).
49 
50## Image outlines
51 
52Give images a `1px` outline at low opacity for consistent depth. Pure black in light mode (`oklch(0 0 0 / 0.1)`), pure white in dark (`oklch(1 0 0 / 0.1)`). Never a near-black like slate or zinc and never a tinted neutral. A tinted outline picks up the surface underneath and reads as dirt on the image edge.
53 
54## Scale on press
55 
56A `scale(0.96)` on click gives a button tactile feedback. Always `0.96`; anything below `0.95` feels exaggerated. Add a `static` prop to switch it off where motion would distract. See [recipes for CSS, Tailwind and Motion](animations.md#scale-on-press).
57 
58## Skip animation on page load
59 
60Use `initial={false}` on `AnimatePresence` to keep enter animations off the first render. Check that it leaves intentional page entrances intact.
61 
62## Suppress transitions on theme switch
63 
64A theme flip changes color, background, border and shadow on nearly every element at once. Every transition on those properties fires together and the switch smears instead of snapping. Inject `*,*::before,*::after{transition:none !important}`, force a reflow, then remove it on the next frame. See the [recipe](animations.md#suppress-transitions-on-theme-switch).
65 
66## Transition only what changes
67 
68Always name the exact properties: `transition-property: scale, opacity`. Tailwind's `transition-transform` covers `transform, translate, scale, rotate`.
69 
70## Use `will-change` sparingly
71 
72Only for `transform`, `opacity` and `filter`, which the GPU can composite. Never `will-change: all`. Add it when you see first-frame stutter, not before. See [performance.md](performance.md).
73 
74## Match icon stroke to text weight
75 
76An icon next to text carries the text's optical weight: `1.5px` stroke beside regular (400) text, `2px` beside semibold (600). One stroke weight per icon set and one icon library per surface. Sizing and RTL flipping are in [icons.md](icons.md).
77 
78## One SVG, recolored per state
79 
80Icons use `currentColor` and take hover, selected and disabled states from CSS color and opacity, never from separate assets. Outline is the default variant; fill marks the active state.
81 
82## Motion restraint
83 
84Give high-frequency interactions instant feedback, or a transition of `150ms` or less on opacity and color. A custom animation there charges its attention cost on every trigger.
85 
86Every animated state change also needs a static cue: color, an icon, or a label. Motion is never the only feedback channel.
87 
88## Before you finish
89 
90| Mistake | Fix |
91| --- | --- |
92| Icons look off-center | Nudge optically with padding, or fix the SVG |
93| Jarring staged entrance or exit | Stagger infrequent entrances; keep exits subtle |
94| Theme toggle crossfades the whole page | Disable transitions for the swap, force a reflow, restore on the next frame |
95| `transition: all` on elements | Specify exact properties |
96| First-frame animation stutter | Add `will-change: transform` (sparingly) |
97| Hairline icon beside bold text | Match the stroke width to the text weight |
98 
99## Reporting
100 
101**Severity.** `HIGH` breaks an interaction, makes motion unusable, or leaves a state change visible only while the animation runs. `MEDIUM` is a visible inconsistency in surfaces, icons, or motion. `LOW` is isolated polish.
102 
103**Verification.** Without a browser: every state the component defines, meaning hover, focus, active, loading and empty, plus motion durations and easings read from the code. With one: walk each state, and replay motion at 10% speed in the browser's Animations panel. Report every check you could not run as `Not verified`.
104 
105**Format.** Group findings under the principle each violates, ordered by severity, one row per root cause listing every location it appears in:
106 
107| Severity | Location | Before | After | Why |
108| --- | --- | --- | --- | --- |
109 
110`Location` is `path/to/file:line`. `Why` names the principle and the user impact.
111 
112End with `Block` when any `HIGH` remains, `Approve` otherwise, leaving the rest in the table as work to do. Never `Approve` coverage you did not inspect. With nothing to report, state "No actionable UI-polish findings" and report verification.
113 

Discussion

Alternatives

Also in Interface designSee all 106 in Design →
Frontend designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Design & UI · Apache-2.0ImpeccableUse when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.Design & UI · Apache-2.0Apple designApple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.Design & UI · MITBuilding AnimationsBuild an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.Design & UI · MIT