Disclosure: I work on VibUI, a paid library of website prompts. It's linked once, at the very end.
Say the pull request lands and it's 1,800 lines of CSS, all generated, all "looks great in the preview." You've got ten minutes before standup. You can't read it line by line, and you shouldn't have to. AI-written stylesheets fail in a handful of very repeatable ways, and almost every one of them can be found with a one-line search.
Here's the review I'd run. It uses ripgrep, but plain grep -rnE works for most of it.
The greps
| Smell | Search | Why it hurts |
|---|---|---|
| Stacking-context wars | rg -n "z-index:\s*[0-9]{3,}" | 9999 means somebody lost an argument with a dropdown |
| Specificity band-aids | rg -n "!important" | Each one is a future debugging session |
| Raw colours | rg -n "#[0-9a-fA-F]{3,8}\b" -g "*.css" | Anything that isn't a token drifts from the brand |
| Pixel magic numbers | `rg -n "(margin\ | padding\ |
| Killed focus rings | {% raw %}`rg -n "outline:\s*(none\ | 0)"` |
| Lazy transitions | rg -n "transition:\s*all" | Animates properties you didn't mean to, and costs frames |
| Breakpoint sprawl | rg -c "@media" -g "*.css" | Ten files with ten different widths means no system |
| Duplicate selectors | rg -n "^\.btn" -g "*.css" | Three versions of the same button |
Run them in that order. You'll usually find the worst offenders in the first three searches, and you'll know within two minutes whether the generated code respects your tokens or ignored them.
What to do with the hits
Don't fix them by hand yet. Group them and ask whether the prompt allowed them.
- Lots of hex values? Your prompt never gave the tool tokens, or gave them in prose ("a deep teal").
-
!importanteverywhere? The tool was patching around its own earlier output. Regenerate that component from scratch instead of layering fixes. - No focus styles? Nobody said they mattered. Now somebody has.
The prompt that prevents most of it
Styling rules: - Use only the CSS custom properties in tokens.css. No raw hex, rgb or hsl values. - Spacing from the --space-* scale only. No px margins, paddings or gaps. - No !important. No z-index above 50; use the layers defined in tokens.css. - Never remove focus outlines; style :focus-visible instead. - transition only on named properties, never "all". - One shared button class; do not redefine it per section. The same list works whether the code comes from v0, Lovable, Bolt, Cursor, Windsurf, Claude, ChatGPT, Gemini, Replit, GitHub Copilot, Framer AI, Google Stitch, Readdy, Aura.build or OpenAI Codex. Keep it in a snippets file and paste it at the top of every styling request.
Make it a script
If you do this more than twice, wrap it:
#!/usr/bin/env bash # css-smells.sh (run from the repo root) echo "z-index >= 100:"; rg -n "z-index:\s*[0-9]{3,}" -g "*.css" || true echo "!important:"; rg -c "!important" -g "*.css" || true echo "raw colours:"; rg -c "#[0-9a-fA-F]{3,8}\b" -g "*.css" || true echo "focus removed:"; rg -n "outline:\s*(none|0)" -g "*.css" || true echo "transition: all:"; rg -n "transition:\s*all" -g "*.css" || true Counts matter more than any single line. If the numbers go up between two generations of the same section, the prompt is getting looser, not tighter.
Fair warning: a short pitch
Fair warning, this part's a pitch. If you build pages often, starting from a section that already uses tokens and sane spacing means fewer hits in the first place. VibUI is the library I work on: 2,852 website prompt templates (775 pages, 1,100 sections, 817 components, 160 animated backgrounds), about 1,000 with source code. Pricing is a one-time payment, no renewal: $48 quarterly, $99 yearly, $179 lifetime (listed down from $384). Yearly and lifetime also include 2,407 AI video prompts. There are 60 free samples and a free account can copy 2 prompts. Run one through the greps above before you decide it's worth anything.
