How Clonix turns a website into design tokens for Cursor, Claude Code and Windsurf

By Shivam Anil Jha · AI architect & full-stack developer, Mumbai ·

The Clonix home page: any website, liquefied into design DNA, with a box to scan any site
Clonix's home page, at clonix-tau.vercel.app.
What
A Chrome extension and a small backend that read a website's design
Gives you
Rules for Cursor, Claude Code, Windsurf, Codex and Copilot; Tailwind and CSS themes; components
Built with
TypeScript, React and Tailwind in the extension; Node and Express on the server; Claude for components
Team
My product, built with the Sqaron team

Ask an AI code editor to make something look like a site you like, and you get something close but wrong. The blue is a shade off, the headings use Tailwind's default sizes, and the shadows are invented. The editor never saw the site; it is working from memory. Clonix is my answer to that: it measures the real page in your browser and hands your editor the numbers.

Clonix is a Chrome extension with a small backend, and I built it with the Sqaron team. This post is about the half that reads a page: how a live website becomes design tokens and editor rules.

Measuring what a visitor actually sees

The scan is one function that the extension injects into the page's main world, so it can read computed styles, the loaded fonts and the live DOM, not just the HTML source. It makes a single walk over the elements a visitor can actually see. Anything that is display: none, invisible, fully transparent, parked off-screen at -9999px or clipped to a 1px box (skip links and screen-reader text) doesn't count. Decorations marked aria-hidden still count for what they draw, but never as buttons.

The walk has a budget: at most 6,000 visible elements in 300 ms. Whatever it doesn't reach is counted and reported with the scan, never guessed.

Code reads CSS, but people see paint. Most of the rules in the walk come from that difference:

From measurements to roles

A list of twenty colours doesn't help an editor much. It needs to know what each one is for, so Clonix gives them roles:

Type works the same way. The h1, h2 and h3 styles come from the headings. Body is the size most of the other text is set in, in its most-used style, and small is the most-used size below that, when there is enough of it. Spacing gets a base of 8 or 4 pixels when that number divides at least 80% of the paddings, gaps and margins it measured; otherwise Clonix lists the values in use.

Writing it where each editor looks

From one scan, Clonix writes the same design brief in the place each tool reads it:

This step uses no network and no AI. It is plain code over the scan, so the same scan always gives the same files.

Two decisions in those files matter more than they look. First, measured values never take Tailwind's own scale names. A site's heading size becomes text-h1, its card radius rounded-card, its shadow shadow-elevation-1. If Clonix wrote the site's 15px text as text-sm, it would quietly change what text-sm means in your project, and the editor would trust the wrong name.

Second, the brief is written as rules, not suggestions. Use the tokens exactly and never approximate. Use only the site's breakpoints, in the direction the site uses them, mobile-first or desktop-first. For dark mode, switch with the site's own selector and use its dark values instead of inverting colours by hand. If the page was scanned with its dark theme showing, the brief says so, so nobody mistakes those colours for the light theme.

Components, with AI

The one step that uses AI is turning a section into a component. You pick a section of the page, and Clonix sends its cleaned HTML and the tokens to Claude, which writes a React and Tailwind, Vue 3, or plain HTML and CSS component. The instructions say to use the tokens exactly, to treat the captured HTML as a picture of the layout rather than code to copy, and to drop framework noise like hashed class names, tracking attributes and extra wrapper divs.

Clonix can also save a page as an offline ZIP that runs with one click, but that is a story for another post.

What I learned

The editor files are the easy part. The work is in measuring what the eye sees: a heading whose highlighted word is in another colour, a link that is styled as a button, a skip link that is technically on the page. Each of those became a rule in the walk, and each rule made the files the editor reads a little more honest.

Shivam Anil Jha is an AI architect and full-stack developer from Mumbai, India. He builds NexeraAI, Clonix and Orbit OS, and co-founded the product studio Sqaron Technologies. More about him.

← All posts · Shivam Anil Jha's portfolio