Review and elevate the visual design quality of Phlex components and pages in this project. Use this skill after building or modifying any UI component, page, or layout — or when the user says "polish this", "make it look better", "review the design", "improve the styling", "UI review", or "design review". Also trigger automatically after the frontend-design skill completes, or when the user asks about spatial composition, typography, color harmony, or visual refinement. This skill goes beyond functional correctness (that's ux-review) to focus on aesthetic impact, detail-level craft, and whether the interface feels intentionally designed rather than merely assembled.
Audit and elevate the visual quality of Phlex components and pages. This skill focuses on aesthetic impact — not functional correctness (that's ux-review) or accessibility compliance. The question here is: does this interface feel crafted, or just assembled?
The primary source of truth is live screenshots from agent-browser, not code inspection. Read code to understand how something is built, but judge what it looks like from the browser.
Before reviewing, internalize the project's visual language:
app/assets/tailwind/application.css defines --ha-* variables (backgrounds, surfaces, accents, borders, text, shadows)ha-card, ha-button, ha-button-primary, ha-button-secondary, ha-button-danger, ha-input, ha-nav-item--ha-accent--ha-accent-2--ha-dangerha-fade-in (600ms), ha-rise (600ms), staggered sidebar delays.dark), all tokens have dual valuesThe Docker container compiles Tailwind CSS in JIT mode — only classes already used in the codebase are included in the compiled stylesheet. If you recommend a Tailwind class that has never been used before (e.g., p-5, leading-relaxed, gap-5), it will appear in the HTML class attribute but have zero effect until the Docker image is rebuilt with bin/cli app rebuild.
Before recommending a Tailwind utility, verify it exists in the current build by checking whether any existing component already uses it. Prefer classes already in use:
p-4 (16px), p-6 (24px) — NOT p-5gap-2, gap-3, gap-4 — NOT gap-5mt-1, mt-2, mt-3, mt-4 — all existspace-y-3, space-y-4, space-y-6, space-y-8 — all existtext-xs, text-sm, text-base, text-lg, text-xl — all existIf a truly new class is needed, explicitly note in the recommendation: "Requires bin/cli app rebuild to compile."
This project uses a deliberate hybrid approach — Tailwind utilities for one-off styling, custom CSS classes for repeated visual patterns. Both have a role:
A visual pattern deserves its own class in application.css when it:
Example of a good extraction — the existing ha-card class bundles border-radius: 24px, border, background, and a signature drop shadow into a single token. Every card in the app gets the same visual DNA without repeating 5 utility classes.
Use raw Tailwind utilities when:
sm:, md:) to adapt layoutThe goal is semantic CSS for visual identity, Tailwind for layout plumbing. If you find yourself writing class: "rounded-[24px] border border-[var(--ha-card-border)] bg-[var(--ha-card)] shadow-[0_22px_45px_-34px_rgba(15,23,42,0.35)]" in a Phlex component — that's ha-card trying to escape. Extract it. But class: "mt-4 flex items-center gap-3" is fine inline.
When recommending new CSS classes, define them in @layer components inside app/assets/tailwind/application.css, following the existing ha-* naming convention.
Evaluate each changed surface across these dimensions. Not every dimension applies to every component — focus on what matters for the specific UI.
The arrangement of elements within and between components. Look for opportunities to break out of rigid grid conformity.
What to look for:
Internal spacing audit (critical — check every component):
p-6 for list-level cards, p-4 for compact inline widgets.mb-4 or mb-6 between section heading rows and their content grids.ha-card-actions) visually separated from content above? The CSS class provides margin-top: 1.5rem and a border-top — verify it's actually being used and not replaced with inline layout.mt-1 for tight relationships (overline→title), mt-2 for moderate (title→metadata), mt-3 for loose (description→actions).space-y-3 or space-y-4 applied to the container? Comments with zero gap between cards look broken.space-y-4 minimum for form field groups.Cross-component spacing conventions:
space-y-8 (standard for all views)space-y-4gap-4 (standard)mb-4 or mb-6 before the content gridWhat to avoid:
Text is the primary interface. Small typographic choices create disproportionate impact.
What to look for:
tracking) appropriate? (Tight for large headings, open for uppercase labels)The existing palette is carefully tuned. Evaluate how well the implementation uses it.
What to look for:
--ha-accent) used sparingly for high-signal moments, or scattered everywhere?--ha-surface and --ha-bg being too similar)/10, /20, /30 for subtle tints — not random)Shadows define the spatial relationship between layers. This project uses a distinctive deep, diffused shadow style.
What to look for:
--ha-card-shadow applied consistently?-1px translateY pattern)Borders carry visual weight. The question is always: does this border earn its place?
What to look for:
--ha-border, --ha-card-border)Animation should feel like a natural part of the interface, not a decoration bolted on.
What to look for:
animation-delay)prefers-reduced-motion respected?The last 5% of polish that separates "looks good" from "feels right."
What to look for:
git diff main...HEAD --name-only | grep -E "(views|components|assets)"
For each changed page/component, take screenshots in both light and dark mode at desktop width, plus 375px mobile.
agent-browser open https://catalyst.workeverywhere.docker/<page>
agent-browser wait --load networkidle
agent-browser screenshot /tmp/ui-polish-<name>-light.png
Toggle dark mode, screenshot again.
Score each dimension as:
## UI Polish Review — <branch or component name>
### Spatial Composition: <Strong|Adequate|Weak|Broken>
- <observation and specific recommendation>
### Typography: <Strong|Adequate|Weak|Broken>
- <observation and specific recommendation>
### Color & Contrast: <Strong|Adequate|Weak|Broken>
- <observation and specific recommendation>
### Shadows & Depth: <Strong|Adequate|Weak|Broken>
- <observation and specific recommendation>
### Borders & Dividers: <Strong|Adequate|Weak|Broken>
- <observation and specific recommendation>
### Transitions & Motion: <Strong|Adequate|Weak|Broken>
- <observation and specific recommendation>
### Micro-Details: <Strong|Adequate|Weak|Broken>
- <observation and specific recommendation>
### CSS Architecture
- <any patterns that should be extracted to ha-* classes>
- <any inline Tailwind that's gotten unwieldy>
### Screenshots Reviewed
- <list of pages/viewports/themes tested>
Present the review and ask: "Want me to apply these fixes?" For each recommendation, indicate the effort level (one-liner, moderate, significant) so the user can cherry-pick.
ux-review (flow, clarity, accessibility)qa-review (edge cases, boundary conditions)security-reviewThis skill is about the feel. The difference between a component that works and one that someone pauses to appreciate.