<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gayatri Kakumanu</title>
    <description>The latest articles on DEV Community by Gayatri Kakumanu (@gayatrikakumanu25).</description>
    <link>https://dev.to/gayatrikakumanu25</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4116563%2Fea323cf8-5d39-4f68-9462-b8b5d9279fda.png</url>
      <title>DEV Community: Gayatri Kakumanu</title>
      <link>https://dev.to/gayatrikakumanu25</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gayatrikakumanu25"/>
    <language>en</language>
    <item>
      <title>Figma-to-Code at Scale: What Actually Drives Cost, Quota, and Quality</title>
      <dc:creator>Gayatri Kakumanu</dc:creator>
      <pubDate>Fri, 25 Sep 2026 01:32:15 +0000</pubDate>
      <link>https://dev.to/gayatrikakumanu25/figma-to-code-at-scale-what-actually-drives-cost-quota-and-quality-2e4</link>
      <guid>https://dev.to/gayatrikakumanu25/figma-to-code-at-scale-what-actually-drives-cost-quota-and-quality-2e4</guid>
      <description>&lt;p&gt;&lt;em&gt;Or: why the "smart" way to fetch Figma designs turned out to be the expensive way.&lt;/em&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; The "fetch a lightweight outline first" advice is backwards — it cost almost as much as fetching everything at once, and up to 2× more on plain, un-componentized files. The real cost isn't the token bill everyone watches — it's Figma's hard API quota (one bad fetch pattern turns a 50-screen project from half a day into &lt;strong&gt;42 months&lt;/strong&gt; on a Starter plan) and the invisible tax of an AI agent re-reading everything it's ever fetched, every single turn. Fix the file first. Fetch each screen exactly once.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Jump to:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How this was measured&lt;/li&gt;
&lt;li&gt;What's inside a Figma response&lt;/li&gt;
&lt;li&gt;Finding 1 — File construction matters most&lt;/li&gt;
&lt;li&gt;Finding 2 — The outline-first trap&lt;/li&gt;
&lt;li&gt;Finding 3 — Splitting sections multiplies cost&lt;/li&gt;
&lt;li&gt;Finding 4 — Code Connect's duplicate data&lt;/li&gt;
&lt;li&gt;Finding 5 — Compact specs done right&lt;/li&gt;
&lt;li&gt;The three costs that dominate real projects&lt;/li&gt;
&lt;li&gt;Audit before you fetch&lt;/li&gt;
&lt;li&gt;The playbook&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;There's a piece of conventional wisdom floating around every Figma-to-code workflow: &lt;strong&gt;don't fetch the whole design at once — grab a lightweight outline first, then pull styling only for the bits you actually need.&lt;/strong&gt; It sounds efficient. It sounds like something a senior engineer would nod along to.&lt;/p&gt;

&lt;p&gt;So I tested it. I measured it, frame by frame, character by character. Turns out it's the wrong default.&lt;/p&gt;

&lt;p&gt;On a file built with real components, that "smart" outline-first approach cost &lt;em&gt;almost as much&lt;/em&gt; as just fetching everything in one go. On a file built from plain, un-componentized frames, it cost &lt;strong&gt;up to twice as much&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The things that actually moved the needle were less obvious:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On a single screen, it came down to &lt;strong&gt;how the Figma file itself was built&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;On a real, multi-screen project, two other things took over: &lt;strong&gt;how many times Figma lets you call its API&lt;/strong&gt;, and &lt;strong&gt;the hidden tax of an AI agent re-reading everything it has ever fetched, every single turn.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's the full breakdown — think of it as a lab report with opinions.&lt;/p&gt;




&lt;h2&gt;
  
  
  How this was actually measured
&lt;/h2&gt;

&lt;p&gt;I pointed Figma's remote MCP server (the tool that lets AI agents talk to Figma) at six frames inside one file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Five "plain" screens&lt;/strong&gt; — landing page, shop, product detail, about, and article. No component instances. No auto-layout. Frames just placed at fixed pixel positions, with raw hard-coded colors instead of design tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One "proper" screen&lt;/strong&gt; — the About page from Figma's own Simple Design System (SDS) example. This one's built the way design systems are supposed to be built: 61 component instances across 17 components, auto-layout everywhere, and &lt;strong&gt;Code Connect&lt;/strong&gt; turned on (a Figma feature that links a design component directly to its real code counterpart).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every number below is labeled honestly, because "trust me" isn't a methodology:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Label&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Measured&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;An exact character count from a real tool response&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Validated&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Built by a custom emulator that reproduces Figma's output character-for-character on test cases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Modeled&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Calculated from measured pieces, with assumptions clearly stated&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Token counts assume roughly 3–3.6 characters per token — a rough industry rule of thumb, not gospel. (The actual harness counts tokens exactly; the ratio is just for quick mental math.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building the emulator paid off immediately.&lt;/strong&gt; By reconstructing Figma's own metadata logic from scratch and comparing it line-by-line to real responses, I found out &lt;em&gt;why&lt;/em&gt; the tool decides to show what it shows.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This almost got me.&lt;/strong&gt; My first scan of the SDS page counted 177 nodes. Then I found out Figma's Plugin API silently skips hidden layers inside component instances by default — turning that on bumped the count to &lt;strong&gt;301&lt;/strong&gt;. Fifty-eight nodes had been invisible the entire time. If I'd shipped the analysis on that first pass, every downstream number would've been wrong.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What's actually inside a Figma response
&lt;/h2&gt;

&lt;p&gt;Before diving into findings, it helps to know what you're paying for. A &lt;code&gt;get_design_context&lt;/code&gt; response — the main call an AI agent makes to understand a screen — is made of three parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The generated code itself.&lt;/strong&gt; On the plain landing page, that's 28,566 characters. Half of it — 14,322 characters — is just Tailwind CSS class strings. Another 13% is metadata attributes (&lt;code&gt;data-node-id&lt;/code&gt;, &lt;code&gt;data-name&lt;/code&gt;) that exist purely for traceability, not for rendering anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fixed trailing instructions.&lt;/strong&gt; Boilerplate Figma tacks onto &lt;em&gt;every&lt;/em&gt; response — 1,454 characters on the landing page, ballooning to 4,367 on the SDS page because it now has to explain style tokens, Code Connect usage, and component props. On one tiny 5-node section, this boilerplate was &lt;strong&gt;48% of the entire response&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A tiny inline screenshot.&lt;/strong&gt; The landing page (1440×4811 pixels in reality) gets rendered down to 307×1024 — too small to even read the body text.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The sneaky part: that "fixed instructions" chunk repeats on &lt;em&gt;every single call.&lt;/em&gt; Fetch a screen in 10 pieces, and you pay for that boilerplate 10 times over. That single fact is the seed of nearly every finding below.&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding 1 — The file's construction matters more than anything else
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Landing page (plain frames)&lt;/th&gt;
&lt;th&gt;SDS About — Simple Design System (real components + Code Connect)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Visible nodes&lt;/td&gt;
&lt;td&gt;131&lt;/td&gt;
&lt;td&gt;243&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;get_design_context&lt;/code&gt; size&lt;/td&gt;
&lt;td&gt;30,020 chars (~8–10k tokens)&lt;/td&gt;
&lt;td&gt;17,948 chars (~5–6k tokens)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Characters per visible node&lt;/td&gt;
&lt;td&gt;229&lt;/td&gt;
&lt;td&gt;74&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Read that again: the component-based page has &lt;strong&gt;almost double the number of visible nodes&lt;/strong&gt; and still costs &lt;strong&gt;40% less&lt;/strong&gt;. Why? Because with Code Connect wired up, each component instance comes back as a clean reference — &lt;code&gt;&amp;lt;Header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;Card&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;Button&amp;gt;&lt;/code&gt; — with its actual props, instead of the tool reverse-engineering a wall of Tailwind classes to &lt;em&gt;approximate&lt;/em&gt; what that component looks like.&lt;/p&gt;

&lt;p&gt;The plain-frame page didn't just cost more — it produced &lt;strong&gt;worse code&lt;/strong&gt;. Because its root frame was absolutely positioned, the response was littered with 45 absolutely-positioned elements and 54 pixel-perfect offset classes like &lt;code&gt;top-[3857px]&lt;/code&gt;. A nav bar sitting 39 pixels off-canvas came back as &lt;code&gt;left-[39px] right-[-39px]&lt;/code&gt; — a snapshot of exactly where that one element happened to sit, not a layout that could ever be responsive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No clever fetching strategy fixes this.&lt;/strong&gt; If the file itself is built badly, the output is built badly. Full stop.&lt;/p&gt;

&lt;p&gt;This is bad on a single screen. It compounds fast once you're not just paying for one screen, but for the "smart" way of fetching it. →&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding 2 — "Fetch the outline first" is extra cost dressed up as savings
&lt;/h2&gt;

&lt;p&gt;The advice sounds reasonable: call &lt;code&gt;get_metadata&lt;/code&gt; first to get a sparse map of the file — layer IDs, names, types, positions — then selectively pull only the styling you need. Here's what that outline actually costs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Landing page&lt;/th&gt;
&lt;th&gt;SDS About — Simple Design System&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;get_metadata&lt;/code&gt; size&lt;/td&gt;
&lt;td&gt;11,859 chars&lt;/td&gt;
&lt;td&gt;17,260 chars&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;As a share of the full response&lt;/td&gt;
&lt;td&gt;40%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;96%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On the component-based page, the "lightweight" outline was almost the &lt;em&gt;entire size&lt;/em&gt; of the full response you were trying to avoid paying for. Digging into why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The collapse rule.&lt;/strong&gt; An instance only collapses down to a single summary line if its direct children are themselves instances or plain text. If it contains a frame or a "slot," the whole thing gets listed out in full, internals and all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long IDs.&lt;/strong&gt; Every line inside an instance carries a full instance-path ID, for example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I3:1200;2142:12360;2142:11561
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not exactly compact — and every single node in a deeply nested instance carries one.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hidden layers.&lt;/strong&gt; The metadata output &lt;em&gt;includes&lt;/em&gt; hidden layers that the real code-generation call quietly drops.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Figma's own internal guidance tells agents to call &lt;code&gt;get_design_context&lt;/code&gt; directly and &lt;em&gt;not&lt;/em&gt; to substitute the metadata call for it. The numbers back that up completely. Metadata only earns its keep in two specific situations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A screen too large to fit in one response — the outline lets you target a specific subtree.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;get_design_context&lt;/code&gt; call that already got truncated — the server automatically falls back to metadata on its own when a response is too big.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the "efficient" two-step approach is really a one-and-a-half-step approach that costs more than the one step it was trying to avoid. Naturally, the next instinct is to fetch in smaller pieces instead — which makes things worse, not better. →&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding 3 — Splitting one screen into sections multiplies your bill
&lt;/h2&gt;

&lt;p&gt;Fetching a plain-frame page section-by-section means you pay for: the metadata outline, the same code split into pieces, &lt;em&gt;plus&lt;/em&gt; the fixed instructions and a screenshot — repeated on every single call. Modeled from measured data:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Total characters&lt;/th&gt;
&lt;th&gt;Cost vs. one direct call&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;One direct call&lt;/td&gt;
&lt;td&gt;30,020&lt;/td&gt;
&lt;td&gt;1.0×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Metadata + 8 section calls&lt;/td&gt;
&lt;td&gt;~48,600&lt;/td&gt;
&lt;td&gt;1.6×, plus 8 screenshots&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Metadata + 15 section calls&lt;/td&gt;
&lt;td&gt;~57,100&lt;/td&gt;
&lt;td&gt;1.9×, plus 15 screenshots&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Fewer, bigger calls are cheaper — and as the quota section below shows, they save your API call budget even harder than they save tokens.&lt;/p&gt;

&lt;p&gt;Splitting calls is a token problem. Code Connect looked like the fix for token bloat generally — but it turns out even the "good" format is carrying dead weight. →&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding 4 — Code Connect's output is nearly half duplicate data
&lt;/h2&gt;

&lt;p&gt;Code Connect output is already leaner than raw Tailwind, but it has a built-in redundancy: &lt;strong&gt;every prop gets emitted twice&lt;/strong&gt;, alongside instance-swap IDs and slot placeholders that never get used downstream:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt; &lt;span class="na"&gt;instanceSwapIconStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"3:130"&lt;/span&gt; &lt;span class="na"&gt;iconStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"3:130"&lt;/span&gt; 
        &lt;span class="na"&gt;textLabel&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Sign in"&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Sign in"&lt;/span&gt; 
        &lt;span class="na"&gt;variantVariant&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Neutral"&lt;/span&gt; &lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Neutral"&lt;/span&gt; 
        &lt;span class="na"&gt;variantState&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Default"&lt;/span&gt; &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Default"&lt;/span&gt; &lt;span class="err"&gt;...&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the SDS page (Simple Design System), &lt;strong&gt;209 prop attributes were flat-out duplicated&lt;/strong&gt;. Add in the swap IDs and slot placeholders and that's 6,374 characters — &lt;strong&gt;46.9% of the code&lt;/strong&gt; — doing nothing but repeating itself.&lt;/p&gt;

&lt;p&gt;A small post-processing script strips it clean, and a test confirms every value and tag structure survives untouched:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;NavigationPill&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Products"&lt;/span&gt; &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Active"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's 13,581 characters of code trimmed down to 7,207 — &lt;strong&gt;with zero information lost&lt;/strong&gt;, and the output ends up looking a lot more like something a human developer would actually write.&lt;/p&gt;

&lt;p&gt;Stripping duplication is a good habit. But the more aggressive move — cutting content, not just noise — is where things get genuinely risky. →&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding 5 — Compact specs work great, but the "obvious" shortcut throws away real content
&lt;/h2&gt;

&lt;p&gt;A custom extractor can build a &lt;strong&gt;compact spec&lt;/strong&gt;: list each component's props exactly once, plus all the text content, nothing more. On the SDS page (Simple Design System) that came out to 8,690 characters — &lt;strong&gt;48% of the full response, with nothing missing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's the trap: the version most tutorials describe stops descending the moment it hits a component instance, on the theory that "the component already owns its internals, why re-read them." That produced a tiny 374-character output. Looks like a 98% savings — except it had &lt;strong&gt;silently thrown away the navigation labels, every card's title and body text, and all 24 footer links.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On a real design system, the actual &lt;em&gt;content&lt;/em&gt; of a page lives inside nested instances and their properties — not just at the top level. The rule that actually works: &lt;strong&gt;skip a component's own internal layer structure, but keep descending into its nested instances and text.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every finding so far is about a single screen. A real project is dozens of screens — and at that scale, the per-screen savings above stop being the story entirely. →&lt;/p&gt;




&lt;h2&gt;
  
  
  Zooming out: the three costs that actually dominate real projects
&lt;/h2&gt;

&lt;p&gt;A single screen is a nice benchmark. A real project is dozens of screens — and at that scale, three costs take over completely.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Re-reading — the invisible tax
&lt;/h3&gt;

&lt;p&gt;Every tool result you fetch stays in the conversation and gets &lt;strong&gt;re-sent to the model on every future turn.&lt;/strong&gt; With prompt caching active, writing something to cache costs 1.25× the normal input price, and each subsequent read costs just 0.1×. Do the math: a result that sticks around for 25 more turns costs about &lt;strong&gt;3.75× its own size&lt;/strong&gt; — and roughly &lt;strong&gt;26× its size without caching at all.&lt;/strong&gt; Large responses fetched early in a long session are the single most expensive habit you can form.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Accumulation — the pile-up
&lt;/h3&gt;

&lt;p&gt;Every screen you fetch in one session just stacks on top of the last. Modeled at ~3.3 characters per token:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fysx6ardh4jrhjvnrrgsl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fysx6ardh4jrhjvnrrgsl.png" alt=" " width="800" height="572"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Screens fetched in one session&lt;/th&gt;
&lt;th&gt;Plain frames&lt;/th&gt;
&lt;th&gt;Code Connect&lt;/th&gt;
&lt;th&gt;Compact spec&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;~45k tokens&lt;/td&gt;
&lt;td&gt;~27k&lt;/td&gt;
&lt;td&gt;~13k&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;~109k&lt;/td&gt;
&lt;td&gt;~65k&lt;/td&gt;
&lt;td&gt;~32k&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;~227k&lt;/td&gt;
&lt;td&gt;~136k&lt;/td&gt;
&lt;td&gt;~66k&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This isn't just a cost problem — it's an &lt;strong&gt;accuracy problem.&lt;/strong&gt; By the twelfth screen, the agent is writing new code while eleven &lt;em&gt;other&lt;/em&gt; screens' worth of markup is still sitting in its context, quietly competing for attention.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Quota — the hard ceiling
&lt;/h3&gt;

&lt;p&gt;Figma counts every MCP read call against a monthly or daily limit. Current published limits: &lt;strong&gt;20 calls/month&lt;/strong&gt; on Starter, &lt;strong&gt;200/day and 10/minute&lt;/strong&gt; on Professional Dev or Full seats, rising to &lt;strong&gt;600/day&lt;/strong&gt; on Enterprise. Here's the trap that catches people off guard: &lt;strong&gt;limits follow whichever plan owns the file&lt;/strong&gt; — not your own seat. A file parked in Drafts, or owned by a Starter-tier team, gets Starter-tier limits, even if you personally have a Professional seat. (I hit the Starter limit myself, partway through this very analysis.)&lt;/p&gt;

&lt;p&gt;For a modeled 50-screen project:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flow&lt;/th&gt;
&lt;th&gt;Read calls&lt;/th&gt;
&lt;th&gt;Pro Dev seat (200/day)&lt;/th&gt;
&lt;th&gt;Starter (20/month)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;One context call + one screenshot per screen&lt;/td&gt;
&lt;td&gt;~101&lt;/td&gt;
&lt;td&gt;half a day&lt;/td&gt;
&lt;td&gt;5 months&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structure-first, component-based pages&lt;/td&gt;
&lt;td&gt;~401&lt;/td&gt;
&lt;td&gt;2 days&lt;/td&gt;
&lt;td&gt;20 months&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structure-first, plain-frame pages&lt;/td&gt;
&lt;td&gt;~851&lt;/td&gt;
&lt;td&gt;4.3 days&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;42 months&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Read that last row again. &lt;strong&gt;The fetch strategy alone decides whether a project takes half a day or spills across a week — or, in the worst case, becomes mathematically impossible on a Starter plan.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The header and footer are a third of every screen — stop re-fetching them
&lt;/h2&gt;

&lt;p&gt;On the SDS page (Simple Design System), the Header and Footer alone accounted for &lt;strong&gt;34.6% of the generated code and 40% of the compact spec.&lt;/strong&gt; On a real site, those same two components appear on &lt;em&gt;every single screen.&lt;/em&gt; Build them once, then fetch only the page body on every subsequent screen — or tell your extractor to simply skip components that already exist in your codebase. Across a 20-screen project, that one change removes &lt;strong&gt;roughly a third of all remaining fetches.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Audit the file before you spend a single token
&lt;/h2&gt;

&lt;p&gt;Here's the part that's almost too good to be true: most of these outcomes are &lt;strong&gt;predictable before you fetch anything at all&lt;/strong&gt;, just by looking at how the file is structured. A readiness audit scores each frame on four signals — how many component instances it uses, how much of it uses auto-layout, whether its fills use design tokens or raw colors, and how its root layout is set up.&lt;/p&gt;

&lt;p&gt;Scores for the six frames tested here:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Frame&lt;/th&gt;
&lt;th&gt;Readiness score&lt;/th&gt;
&lt;th&gt;Verdict&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SDS About (Simple Design System)&lt;/td&gt;
&lt;td&gt;~85&lt;/td&gt;
&lt;td&gt;Ready to go&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Landing, Shop, About, Article, Product&lt;/td&gt;
&lt;td&gt;~15–21&lt;/td&gt;
&lt;td&gt;Fix the file first&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The best part: this audit runs on Figma's &lt;strong&gt;REST API&lt;/strong&gt;, which &lt;strong&gt;doesn't touch your MCP quota at all.&lt;/strong&gt; It checks every frame in one request, and it hands design a clear to-do list &lt;em&gt;before&lt;/em&gt; engineering even starts. It is always cheaper to fix a Figma file up front than to throw away and rewrite code that was generated from a broken one.&lt;/p&gt;




&lt;h2&gt;
  
  
  The playbook
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Phase 0 — Audit everything.&lt;/strong&gt; One REST call, zero MCP quota spent. Sort every screen into &lt;em&gt;ready&lt;/em&gt;, &lt;em&gt;needs cleanup&lt;/em&gt;, or &lt;em&gt;fix first&lt;/em&gt; — and hand the fix-first list straight to design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 1 — Build the foundations, once.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fetch design variables one time and map them onto your own token system.&lt;/li&gt;
&lt;li&gt;Build the shared header/footer/layout shell once.&lt;/li&gt;
&lt;li&gt;Keep a running record of which components now exist in code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Phase 2 — One subagent per screen.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each subagent fetches its own screen exactly once, skipping components already built in Phase 1.&lt;/li&gt;
&lt;li&gt;It builds the screen, then reports back a &lt;em&gt;short summary&lt;/em&gt; — never the raw design data.&lt;/li&gt;
&lt;li&gt;The main session never holds more than one screen's worth of design context at a time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Phase 3 — Verify once per screen&lt;/strong&gt; against a screenshot big enough to actually read. Only re-fetch the specific sections that fail the visual comparison.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rules that apply across every phase:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Call &lt;code&gt;get_design_context&lt;/code&gt; directly. Skip the metadata call unless the screen is genuinely too large or the response truncates.&lt;/li&gt;
&lt;li&gt;One call per screen — never one call per section.&lt;/li&gt;
&lt;li&gt;If a component is already mapped via Code Connect, use it as-is. Never reimplement it from scratch. (Note: Code Connect requires an Organization or Enterprise plan plus a Full or Dev seat.)&lt;/li&gt;
&lt;li&gt;Strip Code Connect's duplicate props, or switch to a compact spec, whenever context space is tight.&lt;/li&gt;
&lt;li&gt;Keep production files inside a paid team — not personal Drafts — so your quota follows the plan you're actually paying for.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Where this analysis has limits (being honest about it)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sample size.&lt;/strong&gt; Six frames, one file, one design system. The &lt;em&gt;direction&lt;/em&gt; of these findings is solid; the exact percentages will shift on other files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server version.&lt;/strong&gt; Only the remote MCP server was tested here — not other integration paths.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token math.&lt;/strong&gt; Token counts are conversions from exact character counts using an assumed ratio — always run an actual token counter before quoting these numbers as fact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Figma can change the rules.&lt;/strong&gt; Response formats, boilerplate instructions, and quota limits are all things Figma controls and can update at any time. The measurement method here is built specifically so it can be re-run whenever that happens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What's worth measuring next:&lt;/strong&gt; the same comparison on a production design system with deeper component nesting, and a direct measure of &lt;em&gt;output quality&lt;/em&gt; — specifically, counting how many components get reused versus recreated from scratch across a batch of agent-built screens. That number is the one that ultimately decides whether any of these savings actually matter in practice.&lt;/p&gt;




&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;Everyone optimizes for the token bill, because it's the cost you can see. On the files measured here, the real costs were hiding in three other places entirely:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A design file that turned every button into hand-carved, bespoke markup.&lt;/li&gt;
&lt;li&gt;A fetch pattern that quietly burned an entire day's API quota before lunch.&lt;/li&gt;
&lt;li&gt;An agent writing its twelfth screen with eleven other screens' worth of markup still crowding its context window.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Fix the file first. Fetch each screen exactly once. Give every screen a clean, fresh context window.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you've hit Figma's rate limit mid-project, I'd like to know your plan tier and screen count — drop it in the comments.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I write about AI-assisted UI and full-stack development — the practical, measured side of building with AI tools rather than just the hype. More of this series is coming as I move from UI-focused work into full-stack.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>figma</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
