Recently, I was handed a Figma file full of redesigned screens for a project at work. It's a reworking of a whole section of the app, and my job was to build it. I've been turning designs into code for a long time, first from Photoshop files and now from Figma, and the hard part has never really been writing the code. It's knowing whether what I built actually matches the design.
You can put the Figma file on one side of the screen and a browser tab on the other and squint. "Yeah, it looks kind of the same." But designers notice when the spacing is a little off here and there, and they're right to. When you have 20 of those little 2-pixel and 8-pixel offsets, the whole thing starts to look wonky. The designer gets frustrated, and developers get a bad rep.
The first pass
I have the Figma MCP server hooked up to my coding agent, so it can read the design file directly. My first prompt was pretty simple. Implement the screens as they are, use the right components from our design system wherever possible, note any exceptions you find (inconsistencies and stuff like that), and make it look as close to the design as possible.
That works okay. The agent does a decent job, and it's a lot faster than building each screen by hand. But I still didn't know how close it actually got. To find out, I'd have to go back to flipping between Figma and the browser, and that's the part I wanted to get away from.
Prove it to me
The part that made the difference came after the agent finished. I asked it for a comparison sheet with every screen it built next to the matching Figma frame. Then I asked it to prove it did a good job on spacing and everything else, by overlaying the two images and showing me a diff with every difference in red.
It built me a little site for this, an artifact with the screenshots laid over each other, so I could see exactly where the implementation drifted from the design. Then I gave it a target: keep pushing until each screen is a 95% match with the Figma version. After the first round, I had it do a second one to get even closer.

I can't share the real screens from work, so here's a recreation on a made-up photo app, run through the same kind of comparison. The filter chips and captions are only a couple of pixels off, but the photo grid drifts a little further with every row, and the description box in the sidebar collapsed and dragged everything below it up. That's exactly the kind of thing I'd never catch by flipping between two tabs.
You can also tell it what not to count. The stub data in my local environment was never going to match the names and photos in the design, so I told it to leave those parts out of the calculation. You can get really granular with this. A lot of what was still red at the end was just anti-aliasing.
It found problems in the design, too
I didn't expect this part. The comparison turned up a lot of inconsistencies in the design itself. For example, some screens used a primary button where others used an outline button for the same kind of action. Since the agent already had access to the Figma file, I asked it to add those inconsistencies as comments on the file so the designer could address them. It gave the designer a list of real things to think about.
Is the code any good?
A coworker asked the question I'd ask. When it's fine-tuning to hit a number, does it just stuff inline styles everywhere until the pixels line up? In my experience, no. It keeps the code really neat.
The models are good now. That's what everyone keeps saying these days, and it's true. Give them a goal they can measure against and they'll usually do the right thing, instead of the dumbest possible version that technically meets the goal.
It doesn't cost me much time
I went back and checked the timing. The first build took 1 hour and 48 minutes, and the comparison rounds took about 80 more minutes of work. That's a while, but I didn't spend any of it watching. It ran in the background while I did other work. I said "go do it and tell me when you're done," and I looked at the results when it was.
Rebuilding Nova, just for fun
I've been doing this on more than one project. On the side, I've been rebuilding Laravel Nova's front end in React to see how close I could get it. It uses the same API and endpoints, and only the front end is new.
Verification was part of that flow from the start. I had the agent take screenshots of the old version: every screen, every state the UI could be in, the open menus, everything. Then it compared each one against the React version and kept going until it was 95 to 99% accurate. That's been really good.
Give it an audacious goal
If there's one thing I've learned from all this, it's to give the AI an audacious goal and make it prove to you that it got there. The proof doesn't have to be unit tests. For UI work, it can be two screenshots stacked on top of each other with the differences painted red.