agentleFS
svngokusvngoku/coding-agents-skills/skills/ui/SKILL.md

ui

Skill12 starsChanged 23 days agoMITView on GitHub

Opinionated constraints for building better web interfaces with coding agents. Use this skill whenever the user asks you to build, review, or fix a UI — landing pages, dashboards, components, or any frontend code — and whenever you write Tailwind CSS, motion/react animations, accessible component primitives (Base UI, React Aria, Radix), or review agent-generated interface code for quality, accessibility, and performance. Also trigger for "make the UI better", "review my interface", "clean up this component", or any frontend work in React, Next.js, or plain HTML/CSS.

The file

Show its rules and text

We split this skill into the rules it gives an agent

42 rules. About 0 are common, 18 are distinctive, and 24 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 24

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When invoked, apply these opinionated constraints for building better interfaces.

    line 16
  2. Distinctive:

    MUST use Tailwind CSS defaults unless custom values already exist or are explicitly requested

    line 31
  3. Very specific:

    MUST use motion/react (formerly framer-motion) when JavaScript animation is required

    line 32
  4. Very specific:

    SHOULD use tw-animate-css for entrance and micro-animations in Tailwind CSS

    line 33
  5. Very specific:

    MUST use cn utility (clsx + tailwind-merge) for class logic

    line 34
  6. Very specific:

    MUST use accessible component primitives for anything with keyboard or focus behavior (Base UI, React Aria, Radix)

    line 38
  7. Distinctive:

    MUST use the project’s existing component primitives first

    line 39
  8. Distinctive:

    NEVER mix primitive systems within the same interaction surface

    line 40
  9. Very specific:

    SHOULD prefer Base UI for new primitives if compatible with the stack

    line 41
  10. Very specific:

    MUST add an aria-label to icon-only buttons

    line 42
  11. Distinctive:

    NEVER rebuild keyboard or focus behavior by hand unless explicitly requested

    line 43
  12. Very specific:

    MUST use an AlertDialog for destructive or irreversible actions

    line 47
  13. Distinctive:

    SHOULD use structural skeletons for loading states

    line 48
  14. Very specific:

    NEVER use h-screen, use h-dvh

    line 49
  15. Very specific:

    MUST respect safe-area-inset for fixed elements

    line 50
  16. Distinctive:

    MUST show errors next to where the action happens

    line 51
  17. Very specific:

    NEVER block paste in input or textarea elements

    line 52
  18. Distinctive:

    NEVER add animation unless it is explicitly requested

    line 56
  19. Very specific:

    MUST animate only compositor props (transform, opacity)

    line 57
  20. Very specific:

    NEVER animate layout properties (width, height, top, left, margin, padding)

    line 58
  21. Very specific:

    SHOULD avoid animating paint properties (background, color) except for small, local UI (text, icons)

    line 59
  22. Very specific:

    SHOULD use ease-out on entrance

    line 60
  23. Very specific:

    NEVER exceed 200ms for interaction feedback

    line 61
  24. Distinctive:

    MUST pause looping animations when off-screen

    line 62
  25. Distinctive:

    NEVER introduce custom easing curves unless explicitly requested

    line 64
  26. Distinctive:

    SHOULD avoid animating large images or full-screen surfaces

    line 65
  27. Very specific:

    MUST use text-balance for headings and text-pretty for body/paragraphs

    line 69
  28. Very specific:

    MUST use tabular-nums for data

    line 70
  29. Very specific:

    SHOULD use truncate or line-clamp for dense UI

    line 71
  30. Very specific:

    NEVER modify letter-spacing (tracking-*) unless explicitly requested

    line 72
  31. Very specific:

    MUST use a fixed z-index scale (no arbitrary z-*)

    line 76
  32. Very specific:

    SHOULD use size-* for square elements instead of w-* + h-*

    line 77
  33. Very specific:

    NEVER animate large blur() or backdrop-filter surfaces

    line 81
  34. Very specific:

    NEVER apply will-change outside an active animation

    line 82
  35. Very specific:

    NEVER use useEffect for anything that can be expressed as render logic

    line 83
  36. Distinctive:

    NEVER use gradients unless explicitly requested

    line 87
  37. Distinctive:

    NEVER use purple or multicolor gradients

    line 88
  38. Distinctive:

    NEVER use glow effects as primary affordances

    line 89
  39. Distinctive:

    SHOULD use Tailwind CSS default shadow scale unless explicitly requested

    line 90
  40. Distinctive:

    MUST give empty states one clear next action

    line 91
  41. Distinctive:

    SHOULD limit accent color usage to one per view

    line 92
  42. Distinctive:

    SHOULD use existing theme or Tailwind CSS color tokens before introducing new ones

    line 93

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

When invoked, apply these opinionated constraints for building better interfaces.

How to use

  • /ui-skills
    Apply these constraints to any UI work in this conversation.
  • /ui-skills <file>
    Review the file against all constraints below and output:
    • violations (quote the exact line/snippet)
    • why it matters (1 short sentence)
    • a concrete fix (code-level suggestion)

Stack

  • MUST use Tailwind CSS defaults unless custom values already exist or are explicitly requested
  • MUST use motion/react (formerly framer-motion) when JavaScript animation is required
  • SHOULD use tw-animate-css for entrance and micro-animations in Tailwind CSS
  • MUST use cn utility (clsx + tailwind-merge) for class logic

Components

  • MUST use accessible component primitives for anything with keyboard or focus behavior (Base UI, React Aria, Radix)
  • MUST use the project’s existing component primitives first
  • NEVER mix primitive systems within the same interaction surface
  • SHOULD prefer Base UI for new primitives if compatible with the stack
  • MUST add an aria-label to icon-only buttons
  • NEVER rebuild keyboard or focus behavior by hand unless explicitly requested

Interaction

  • MUST use an AlertDialog for destructive or irreversible actions
  • SHOULD use structural skeletons for loading states
  • NEVER use h-screen, use h-dvh
  • MUST respect safe-area-inset for fixed elements
  • MUST show errors next to where the action happens
  • NEVER block paste in input or textarea elements

Animation

  • NEVER add animation unless it is explicitly requested
  • MUST animate only compositor props (transform, opacity)
  • NEVER animate layout properties (width, height, top, left, margin, padding)
  • SHOULD avoid animating paint properties (background, color) except for small, local UI (text, icons)
  • SHOULD use ease-out on entrance
  • NEVER exceed 200ms for interaction feedback
  • MUST pause looping animations when off-screen
  • SHOULD respect prefers-reduced-motion
  • NEVER introduce custom easing curves unless explicitly requested
  • SHOULD avoid animating large images or full-screen surfaces

Typography

  • MUST use text-balance for headings and text-pretty for body/paragraphs
  • MUST use tabular-nums for data
  • SHOULD use truncate or line-clamp for dense UI
  • NEVER modify letter-spacing (tracking-*) unless explicitly requested

Layout

  • MUST use a fixed z-index scale (no arbitrary z-*)
  • SHOULD use size-* for square elements instead of w-* + h-*

Performance

  • NEVER animate large blur() or backdrop-filter surfaces
  • NEVER apply will-change outside an active animation
  • NEVER use useEffect for anything that can be expressed as render logic

Design

  • NEVER use gradients unless explicitly requested
  • NEVER use purple or multicolor gradients
  • NEVER use glow effects as primary affordances
  • SHOULD use Tailwind CSS default shadow scale unless explicitly requested
  • MUST give empty states one clear next action
  • SHOULD limit accent color usage to one per view
  • SHOULD use existing theme or Tailwind CSS color tokens before introducing new ones

Anti-Patterns to Avoid

The most common agent-generated UI mistakes — flag these immediately:

  • Gradient backgrounds everywhere — never use gradients unless explicitly requested, and never purple or multicolor gradients
  • h-screen full-viewport layouts — breaks on mobile URL bars; use h-dvh
  • Animating layout properties — width, height, top, left cause reflows; animate only transform and opacity
  • Hand-rolled focus & keyboard behavior — rebuilding what accessible primitives already provide
  • Icon-only buttons without aria-label — invisible to screen readers
  • Blocking paste in inputs — breaks password managers and legitimate users
  • Custom easing curves and tracking-* tweaks — unrequested style noise that fights the design system
  • will-change and large blur() everywhere — GPU memory and paint cost with no benefit
  • Ignoring prefers-reduced-motion — motion must be optional, never mandatory

When to Use / Not Use

Use this skill when:

  • Building new UI from scratch (components, pages, dashboards, forms)
  • Reviewing agent-generated or existing frontend code for quality, accessibility, or performance
  • Adding animations, loading states, or interactive elements
  • Working with Tailwind CSS, motion/react, or accessible component primitives

Do NOT use this skill when:

  • The project has an established design system with conflicting conventions — the project's system wins
  • The stack has no Tailwind and no component library (e.g., plain server-rendered HTML) — still apply the accessibility and interaction principles, but skip class-level rules
  • The task is backend, data, or infrastructure work with no UI surface
  • The ask is visual direction or creative design (brand work, image generation) — this skill defines constraints, not aesthetics

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.