[KongchangAI]
· 2 min read· 1,146 words

Open-Source CLI StyleProbe: Extracting Website Design Systems for AI Coding Agents

Open-Source CLI StyleProbe: Extracting Website Design Systems for AI Coding Agents

Open-source CLI tool StyleProbe extracts website design systems to provide precise design context for AI coding Agents.

StyleProbe is an open-source CLI tool released by a developer on Reddit, designed to solve color, font, and spacing deviations when AI coding Agents recreate reference websites due to lack of precise design parameters. Give it a URL, and it structurally extracts the entire site's design system, including semantic design tokens, typography, spacing, shadows, and component styles, with multi-page crawling and SVG brand asset extraction. Export formats cover Tailwind, shadcn/ui, Figma tokens, and AI Agent instruction files, integrating directly with Cursor, Claude Code, and other mainstream workflows. The author believes the tool's value depends on seamless workflow integration rather than scraping coverage. Open-sourced under MIT license with a web playground for trial.

AI coding tools often go off track when recreating reference websites—colors are slightly off, fonts don't match, corner radii and spacing are inconsistent, resulting in a classic "AI-flavored" interface. An open-source CLI tool called StyleProbe, released by a developer on Reddit, attempts to solve this problem at its root: give it a URL, and it structurally extracts the entire site's design system, feeding it directly to AI Agents like Cursor and Claude Code.

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

The Problem: AI Agents Are "Guessing" at Design

The author describes their actual development scenario: when using Cursor and Claude Code for AI-assisted development, they wanted the Agent to build an interface referencing the style of an existing website, but the Agent couldn't access precise design parameters and had to guess. The result was slightly off colors, mismatched typography, and inconsistent spacing and border radii.

This isn't a problem of insufficient model capability—it's a problem of incomplete input information. Visual designs are rendered results in the browser, and AI Agents cannot directly read the design decisions within them (color systems, hierarchy relationships, component specifications). StyleProbe's approach is to first extract these decisions into structured data, then hand them to the Agent for consumption.

Design Token is the atomic unit of a design system, referring to reusable design decision variables such as colors, fonts, spacing, corner radii, and shadows. Unlike hardcoded color values (e.g., #3B82F6), design tokens typically carry semantic naming, such as color-primary, spacing-md, radius-lg. The value of this abstraction layer lies in the fact that when switching themes or updating branding, you only need to modify the token mapping rather than replacing hardcoded values everywhere; for AI Agents, receiving semantic tokens means they can understand "this is the primary button background color" rather than merely "this is a blue color," thereby correctly assigning color values to the corresponding component roles when generating code. StyleProbe's emphasis on extracting semantic tokens is precisely to solve the fundamental problem of Agents receiving a bunch of isolated color values without being able to determine their purpose.

What StyleProbe Can Extract

According to the author, the tool's core capabilities span several levels:

  • Colors and Semantic Design Tokens: Not just scraping color values, but extracting design tokens at the semantic level—this determines whether generated code can correctly distinguish roles like primary color, background color, and status colors.
  • Typography, Spacing, Shadows, and Component Style Analysis: Covers several key parameters that constitute visual consistency—exactly the dimensions AI Agents are most likely to get wrong.
  • Multi-page Crawling: Not limited to the homepage, but crawling multiple pages to avoid capturing only the design characteristics of a single entry point while missing other patterns within the site.
  • SVG Logo and Brand Asset Extraction: Captures brand visual assets as well, reducing the need for manual material supplementation later.

Export Formats That Integrate Directly with Mainstream Workflows

The tool's output design is quite pragmatic, supporting export to Tailwind, shadcn/ui, Figma tokens, and AI Agent instruction files.

This design is noteworthy: Tailwind and shadcn/ui are currently the most common destinations for AI-generated frontend code, Figma tokens connect to design-side collaboration, and AI-agent instruction files directly serve context injection for tools like Cursor and Claude Code. In other words, it doesn't try to be a standalone visualization tool—it positions itself as a preprocessing step in the AI-assisted development pipeline.

AI Agent instruction files (such as .cursorrules, CLAUDE.md, or .github/copilot-instructions.md) are context configuration files placed in project repositories that are automatically read by AI coding tools. They describe project conventions, tech stacks, code styles, and design specifications in natural language or structured formats, and Agents prioritize following these instructions when generating code. StyleProbe exporting extraction results as such files is equivalent to "translating" the design system into the Agent's native language, enabling it to continuously reference them in every subsequent code generation without developers repeatedly pasting design parameters in conversations. The key to this approach is transforming one-time extraction into persistent context assets.

Tailwind CSS is a utility-first CSS framework that expresses styles directly in markup through utility classes (such as bg-blue-500, p-4, rounded-lg), and its configuration file tailwind.config.js is essentially a design token mapping table. shadcn/ui is a component collection based on Radix UI and Tailwind, where component code is copied directly into projects and can be freely modified, with its theme also driven by CSS variables. Together, these two constitute the most common destinations for AI-generated frontend code today: if the Agent's output code conforms to the Tailwind class name system and shadcn/ui component conventions, it can drop directly into existing projects without secondary adaptation. StyleProbe's support for exporting to these two targets means extraction results can be seamlessly converted into runnable style code.

The Product Judgment Behind It

The author doesn't over-package things in the post, but directly asks the developer community three questions: Can this type of tool be embedded in your AI-assisted development workflow? What other design information would you like it to extract? What factors would make you genuinely use it long-term?

These three questions themselves reveal a reality: the value of a design system extraction tool doesn't depend on how comprehensive its extraction capabilities are, but on whether the extraction results can seamlessly enter existing workflows. For AI coding scenarios, the adaptability of output formats may be more critical than scraping coverage.

For developers who frequently need to "build something similar to a certain website," StyleProbe offers a more efficient path than manually copying color values and measuring spacing; and for those focused on the practical details of AI coding, it's also an observational sample—when model capabilities become homogeneous, the quality of context fed to models is becoming the dividing line for output quality.

The project is open-sourced under the MIT license and available on GitHub, and the author also provides a web-based playground for direct trial.

One-line Summary

Open-source CLI tool StyleProbe extracts website design systems to provide precise design context for AI coding Agents.

Paragraph Summary

StyleProbe is an open-source CLI tool released by a developer on Reddit, designed to solve the problem of color, font, and spacing deviations that occur when AI coding Agents recreate reference websites due to a lack of precise design parameters. Give it a URL, and it structurally extracts the entire site's design system, including semantic design tokens, typography, spacing, shadows, and component styles, with support for multi-page crawling and SVG brand asset extraction. Export formats cover Tailwind, shadcn/ui, Figma tokens, and AI Agent instruction files, integrating directly with mainstream workflows like Cursor and Claude Code. The author believes that the value of a design system extraction tool depends on whether the output can seamlessly embed into existing workflows, rather than scraping coverage. The project is open-sourced under the MIT license and offers a web-based playground for trial.

#StyleProbe#design system extraction#AI coding Agent#open-source CLI#Tailwind#shadcn/ui#Figma tokens#Cursor
Share:

Related articles