惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
G
Google Developers Blog
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
云风的 BLOG
云风的 BLOG
小众软件
小众软件
月光博客
月光博客
Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理
P
Proofpoint News Feed
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
The Cloudflare Blog
博客园_首页
美团技术团队
大猫的无限游戏
大猫的无限游戏
B
Blog
IT之家
IT之家
Jina AI
Jina AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Why AI coding agents struggle with Figma (and what actual...
echo-ae · 2026-05-01 · via DEV Community

echo-ae

AI coding agents have become surprisingly capable at generating frontend code. In isolated tasks they often perform well, but once you try to plug them into a real design workflow — especially one based on Figma — the results tend to degrade.

What I kept running into wasn’t really a limitation of the models themselves. It was the way design data is passed into them.

A common instinct is to give the agent as much context as possible: the entire Figma file, or at least a large portion of it. On paper that sounds reasonable. In practice, it makes things worse.

Figma files contain a lot more than just the structure of the UI. They include deeply nested trees, inconsistent naming, layout artifacts, and a significant amount of visual metadata that isn’t particularly meaningful for code generation. What looks like a clean design to a human turns into a fairly noisy representation when you inspect the underlying data.

Once that data is fed into a model, the signal-to-noise ratio drops quickly. The agent starts making weaker assumptions about hierarchy and intent, and the output becomes less predictable. You get code that is technically plausible, but often needs a lot of correction.

I also tried going through the usual paths — using Dev Mode or APIs to extract design information. While that helps with access, it doesn’t really solve the core issue. You still end up working with raw data that wasn’t designed for machine interpretation, and you introduce additional dependencies along the way.

What ended up working better for me was not adding more data, but reducing and reshaping it.

Instead of treating the design file as something to pass through directly, I started thinking of it as something that needs to be interpreted first. The idea was to extract only the part of the design that actually matters for the task at hand, clean it up, and present it in a way that is easier for an agent to reason about.

Here’s what the workflow looks like in practice:

Select → export → normalize → agent generates UI

A local pipeline

That led me to build a small local pipeline.

On the Figma side, I export a selected fragment of the design — usually a frame or a component — without relying on Dev Mode. That data is then processed locally, where the structure is simplified and normalized. The goal isn’t to perfectly preserve every detail, but to make the hierarchy and relationships between elements clearer.

The processed result is exposed through a local MCP server, which allows an AI agent to query it as structured context rather than consume raw JSON. At that point, the model is no longer trying to interpret Figma directly. It’s working with something that is closer to a logical representation of a UI.

Why this helps

An interesting side effect of this approach is that it naturally limits the scope of what the agent sees. Not by manually trimming input, but by only providing a clean, relevant slice of the design. That alone makes a noticeable difference.

In practice, the outputs became more consistent. The model made fewer strange layout decisions, and the generated code required less manual fixing. The overall workflow felt less like “prompting and hoping” and more like something you can rely on.

Local-first advantages

Keeping everything local turned out to be another advantage. There’s no dependency on external APIs, no usage-based cost, and no requirement to enable specific Figma features. It also makes the setup easier to control and reason about.

Open source

I ended up open-sourcing the tool I built around this approach:

https://github.com/echo-ae/local_figma_port

The implementation itself is still evolving, but the underlying idea has been surprisingly stable: giving the model less, but better-structured context leads to better results.

Discussion

I’m curious how others are approaching this problem — especially when it comes to bridging design tools and AI-driven development.