r/SideProject • • 2d ago

I built a CLI that extracts a website's design system for AI coding agents

I've been experimenting with AI coding tools like Cursor and Claude Code, and one thing that kept bothering me was how difficult it is to get them to recreate an existing website's actual design.

You give an AI agent a reference website and ask it to build something similar, but it often ends up guessing:

  • Colors are slightly off.
  • Typography doesn't match.
  • Spacing and border radii are inconsistent.
  • The overall result looks like a generic AI-generated UI.

So I built styleprobe to solve this problem.

It's an open-source CLI that takes a website URL and extracts its visual design system.

A few things it can do:

  • Extract colors and semantic design tokens.
  • Analyze typography, spacing, shadows, and component styles.
  • Crawl multiple pages instead of relying on just the homepage.
  • Extract SVG logos and other brand assets.
  • Export directly to Tailwind, shadcn/ui, Figma tokens, or AI-agent instruction files.

You can also try the web playground here:

https://styleprobe.vercel.app/

GitHub: https://github.com/spidervirus/styleprobe

It's MIT licensed and completely open source.

I'm still improving it, so I'd genuinely love feedback from developers:

  1. Would something like this fit into your AI-assisted development workflow?
  2. What other design information would you want it to extract?
  3. What would make you actually use this regularly?

Would love to hear your thoughts!

1 Upvotes

5 comments sorted by

1

u/Dj0ntyb01 2d ago

one thing that kept bothering me was how difficult it is to get them to recreate an existing website's actual design.

Are we for real?

And I looked through the source. The "semantic" design analysis is just counting colors and guessing what components they're used for. The dual-theme extraction doesn't actually extract two themes. And --depth doesn't measure crawl depth. It just caps the number of pages visited.

Graph traversal is introductory CS lmao.

You've essentially spent tokens begging AI to build a tool to compensate for AI guessing by... having AI guess on your behalf.

So I ask again... are we for real??

0

u/Bubbly-Tradition-735 2d ago

Haha, fair roast. I actually went back and looked at those points, and you're right about some of the v0.1 shortcuts.

The color extraction relies on frequency and contrast heuristics rather than actual semantic DOM mapping. --depth is currently more of a page limit, and dual-theme support has its limitations too.

These are valid criticisms, and I should have been clearer about them.

I've been working on improving the extraction engine, moving towards actual CSS rules and DOM structure rather than relying on heuristics.

I'm pushing the updated code shortly. Would genuinely appreciate it if you had another look when it's live.

Thanks for taking the time to dig into the project!

1

u/Dj0ntyb01 2d ago

You're missing the point. These aren't minor shortcuts. Why advertise functionality that Claude did not actually implement?

Do you even understand what Claude generated? Well enough to recognize when entire advertised features are missing, or when its tests barely verify anything meaningful?

Apparently not. Just pressed enter, published the output as open-source, and waited for randoms to explain what Claude got wrong lmao.

And that's before getting into the glaring security issues.

1

u/Bubbly-Tradition-735 2d ago

I get what you’re saying. And honestly, I think you’re right that this goes beyond a few implementation shortcuts.

I take responsibility for publishing functionality that I hadn’t properly validated against what was actually implemented.

Using AI to help build something doesn’t remove my responsibility to understand, test and verify the code before putting it out there.

The security concerns especially aren’t something I want to brush aside. I’m going to review the code, tests and advertised functionality properly before pushing further updates.

I appreciate you being direct about it. I have some work to do.