| name | ui-polish |
| description | Audits and refines existing web UI against spacing/type, WCAG 2.2, SEO metadata, and Core Web Vitals (INP, LCP, CLS). Use when polishing a live page or component rather than inventing a new look. Not for original mockups (claude-design, sketch), /better quality loops on arbitrary deliverables, or full-site SEO crawls (seo-audit). |
| version | 1.0.1 |
| domain | UI-UX |
| risk | safe |
| last_verified | 2026-05-30 |
| self_updating | true |
UI Polish and Quality Gates
When to Use
- Use when: Polishing user interfaces, conducting design audits, checking HTML/CSS responsiveness, tuning transitions, or verifying accessibility and search parameters on web applications.
- Route elsewhere: Route to
frontend-design if creating original mockup layouts or planning custom CSS frameworks from scratch. Route to seo-audit if executing full site crawls or deep search index diagnostic tasks.
Prerequisites
- Inputs: Target component or page file path, CSS styling definitions, responsive viewports list, assets list.
- Environment: Windows host is primary (PowerShell). Use PowerShell-compatible commands for any local file operations or script executions.
Procedure
- Establish Goals: Identify visual constraints, target breakpoints, audience profile, and design system constraints.
- Context Inspection: Review existing CSS variables, tailwind configurations, assets, and layouts before proposing structural changes.
- Select Focus: Determine the appropriate polishing boundaries (e.g., responsive adjustments, accessibility fixes, animation enhancements).
- Produce Outputs: Generate refactored markup, style rules, components, or diagnostic checklists.
- Verify Outcomes: Validate visual changes using multiple viewports, verify contrast ratios, and trace interactions against runtime performance thresholds.
Gate 1: Baseline Visual Review
Gate 2: Accessibility (WCAG 2.2)
Gate 3: Metadata & SEO
Gate 4: Motion & Performance (Core Web Vitals)
Pitfalls
- High Interaction Delay (INP): Track blocking JavaScript tasks using browser profiling tools. Refactor long event handler scripts to run asynchronously by splitting executions with
setTimeout or requestAnimationFrame.
- Layout Jumps (CLS): Audit layout modifications dynamically using Chrome User Experience Report metrics. Inject CSS
contain-intrinsic-size rules to reserve block areas before slow media payloads load.
- Legacy Browser Viewports: Deprecate standard viewport height units (
vh) on interactive containers to prevent mobile address bar overlap bugs. Standardize on dynamic viewport height (dvh) or small viewport height (svh) rules.
- Accessibility Non-Negotiables: Treat Accessibility (Gate 2) compliance as non-negotiable. Correct touch targets and tab-index flows before testing other parameters.
- Motion Sickness: Verify custom transitions against user system settings (
prefers-reduced-motion) to avoid causing motion sickness.
- Raw Pixel Overrides: Avoid
any styles or styling rules containing raw pixel overrides inside Tailwind projects. Do not use inline style declarations in JSX/HTML layouts unless programmatically calculated.
- Hidden Focus: Outlines are never hidden on
:focus selectors without providing an alternate focus visual style.
Verification
Execute all 4 quality gates before merging code contributions into production branches. Generate validation records in the following format before concluding visual reviews:
| Quality Gate | Checked Criteria | Total Criteria | Compliance Status | Notes / Fixes |
|---|---|---|---|---|
| **Visual Review** | 9 | 9 | PASS | No overflows found |
| **Accessibility (WCAG 2.2)** | 9 | 10 | WARNING | Spacing workaround applied on small close button |
| **Metadata & SEO** | 8 | 9 | WARNING | Canonical URL needs dynamic hostname binding |
| **Motion & Performance** | 8 | 9 | PASS | INP clocked at 145ms; lazy loading active |
Output Audit Structure
{
"visual_audit": { "responsive_ok": true, "no_overflow": true },
"accessibility_audit": { "wcag_aa_compliant": true, "focus_traps_handled": true },
"seo_audit": { "canonical_meta_ok": true, "structured_data_present": true },
"performance_audit": { "inp_ms": 150, "cls_ratio": 0.05 }
}
Related skills
frontend-design: Use for creating original mockup layouts or planning custom CSS frameworks from scratch.
seo-audit: Use for executing full site crawls or deep search index diagnostic tasks.
References
Load the following references if deeper context is needed during the procedure: