AI site builders like Lovable, Cursor and v0 read your design system and then often ignore parts of it. The result often looks "almost right", and nobody checks the code.
I wanted a quick way to see how far the code drifted from the DESIGN.md. So I wrote a Claude skill plus a small Python script that does it.
What it does
You give it a DESIGN.md and a code folder. It lists every:
- color (hex,
rgb(), Tailwind arbitrary values) that is not in your palette, with the nearest token - font family that is not in your DESIGN.md
- border radius, padding, margin or gap that is off your scale
Each finding has the file, the line, the value found and the replacement.
$ python3 scripts/audit.py --design DESIGN.md --src ./site Consistency score: 84/100 Color: 6 issues - live-portada-obra-clara.css:38 #53574d -> #3c3f38 (dark gray text, distance 39) - live-portada-obra-clara.css:44 #d8dbd0 -> #e8e9e3 (line, distance 29) Radius: 4 issues - live-portada-obra-clara.css:5 20px -> 18px What I tested it on, and what that does and does not prove
- Two small demo sites I had generated straight from their own DESIGN.md scored 96/100 and 97/100. Most of what it flagged was spacing values like 14px and 22px.
- The stylesheet of my own site scored 84/100. Caveat: I wrote that DESIGN.md myself from the CSS color variables, so this checks consistency with my own tokens, not with an official design.
That is three runs on files I control, so treat the scores as a demo of the output, not a benchmark. I have not tested it on a large Tailwind project or on exported Lovable code yet.
Limits
- It reads code, not pixels. It cannot tell you a page looks bad, only that it disagrees with your DESIGN.md.
- It only checks what your DESIGN.md defines. No spacing scale in the file, no spacing check.
- Colors inside images or third-party embeds are out of scope.
Try it
There is a free lite version: paste a DESIGN.md and some code into Claude and it checks colors and fonts. It is a single SKILL.md.
- Lite (free, MIT): https://github.com/enercoruna-gif/design-md-auditor-lite
- Full version with the script, radii, spacing, Tailwind classes and the score: https://ia.cuadrantia.store/auditor
If you run it on your own project and it flags something wrong, tell me in the comments. False positives are what I most want to fix next.
Disclosure: I used AI to help write this post and the tool.
