baseline-ui

Reviews and fixes UI code for spacing, typography, layout, and accessibility violations.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill baseline-ui-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baseline-ui
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/baseline-ui
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill baseline-ui-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated interface code often contains visual slop: inconsistent spacing, poor hierarchy, arbitrary z-index values, layout-breaking animations, and inaccessible components. This Skill enforces an opinionated UI baseline so React and Tailwind CSS interfaces stay clean, accessible, and consistent. ## Core Features & Use Cases - Constraint Enforcement: Applies strict rules across stack, components, interaction, animation, typography, layout, performance, and design (e.g., use h-dvh not h-screen, animate only transform and opacity, cap interaction feedback at 200ms). - File Review Mode: Audits a specific file and reports violations with the exact offending snippet, a one-sentence rationale, and a concrete code-level fix. - Accessibility Guardrails: Requires accessible primitives (Base UI, React Aria, Radix) for keyboard and focus behavior, aria-label on icon-only buttons, and AlertDialog for destructive actions. - Use Case: After generating a dashboard page with an AI assistant, run a baseline review to catch gradient misuse, missing skeleton loading states, hardcoded z-index values, and useEffect misuse before shipping. ## Quick Start Ask the assistant to review your React component file against the baseline-ui constraints and list every violation with a concrete fix.

Frequently Asked Questions about baseline-ui

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

FAQPage Schema
How do I fix AI-generated UI code that looks sloppy?

Run a baseline review pass that checks spacing, hierarchy, typography, and layout against a fixed constraint set. The review quotes each violating snippet, explains why it matters in one sentence, and provides a concrete code-level fix.

What animation library should I use with React and Tailwind CSS?

Use motion/react (formerly framer-motion) when JavaScript animation is required, and tw-animate-css for entrance and micro-animations in Tailwind. Animate only compositor properties like transform and opacity, and keep interaction feedback under 200ms.

Base UI vs Radix vs React Aria for accessible components?

All three provide accessible primitives for keyboard and focus behavior. Prefer your project's existing primitives first, never mix primitive systems on the same interaction surface, and choose Base UI for new primitives if compatible with your stack.

Why should I use h-dvh instead of h-screen in mobile layouts?

h-screen uses the static viewport height, which causes layout issues when mobile browser chrome appears or hides. h-dvh tracks the dynamic viewport height, and fixed elements should also respect safe-area-inset values.

When should I not add animations to a UI?

Never add animation unless explicitly requested. Avoid animating layout properties like width, height, or margin, avoid large blur or backdrop-filter surfaces, pause looping animations off-screen, and respect prefers-reduced-motion.