better-ui

Applies design engineering principles to polish UI surfaces, animations, and icons.

2.7k|171|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/compozy/compozy --skill better-ui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-ui
Source: https://github.com/compozy/compozy/tree/main/.agents/skills/better-ui
Command: npx skills add https://github.com/compozy/compozy --skill better-ui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Interfaces often feel off due to small compounding details like mismatched border radii, jarring animations, or inconsistent icon weights. This Skill provides concrete, opinionated rules for reviewing and building polished UI components so these details are handled systematically instead of by intuition.

Core Features & Use Cases

  • Surface Polish: Enforces concentric border radius math, optical alignment over geometric centering, layered box-shadows instead of depth-only borders, and pure black/white image outlines.
  • Animation Discipline: Prescribes interruptible CSS transitions, staggered enter animations, subtle exits, exact contextual icon animation values (scale 0.25 to 1, blur 4px to 0), scale(0.96) press feedback, and motion restraint for high-frequency interactions.
  • Icon Consistency: Matches icon stroke width to adjacent text weight, uses one currentColor SVG recolored per state, outline-by-default with fill for active states, and RTL flipping rules.
  • Use Case: When a user says a settings page "feels off", the Skill walks every hover, focus, and loading state, replays motion at 10% speed, and produces a findings table with severity, location, before/after code, and a verdict.

Quick Start

Review my Button and Card components for UI polish issues and suggest concrete fixes with before and after code.

Frequently Asked Questions about better-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make nested border radius look right in CSS?

Use concentric border radius: outer radius equals inner radius plus padding. For example, a card with 8px padding and a 12px inner radius needs a 20px outer radius. If padding exceeds 24px, treat the layers as independent surfaces instead.

How to animate icon state changes with Framer Motion?

Use AnimatePresence with exact values: scale from 0.25 to 1, opacity 0 to 1, blur 4px to 0px, and transition type spring with duration 0.3 and bounce 0. Import from motion/react or framer-motion matching the installed package, and add initial={false} to skip animation on page load.

Should I use CSS transitions or keyframe animations for interactive elements?

Use CSS transitions for interactive state changes like hover, toggle, and open/close because they are interruptible and retarget mid-animation. Reserve keyframe animations for one-shot staged sequences such as enter animations or loading states.

Can I use this without a motion library installed?

Yes. Keep both icons in the DOM with one absolutely positioned, and cross-fade them using CSS transitions with cubic-bezier(0.2, 0, 0, 1). This gives both enter and exit animations without adding any dependency.

Why should I avoid transition: all in CSS?

transition: all forces the browser to watch every property, causes unintended animations on properties like padding or color, and blocks browser optimizations. Always name exact properties, such as transition-property: scale, opacity, or use Tailwind's transition-transform for transform-only changes.

When should I use will-change in CSS animations?

Only add will-change when you notice first-frame stutter, and only for GPU-compositable properties: transform, opacity, and filter. Never use will-change: all, and avoid it for properties like background-color or width that cannot be composited.