<?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: Jack Li</title>
    <description>The latest articles on DEV Community by Jack Li (@leethone).</description>
    <link>https://dev.to/leethone</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%2F4184620%2Fee5d5794-297b-4f70-b0ce-82759feabc8b.png</url>
      <title>DEV Community: Jack Li</title>
      <link>https://dev.to/leethone</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/leethone"/>
    <language>en</language>
    <item>
      <title>How I Cut Figma REST API Tokens by 95% for Cursor, Claude Code, and Modern AI Editors</title>
      <dc:creator>Jack Li</dc:creator>
      <pubDate>Mon, 02 Nov 2026 11:45:14 +0000</pubDate>
      <link>https://dev.to/leethone/how-i-cut-figma-rest-api-tokens-by-95-for-cursor-claude-code-and-modern-ai-editors-1dfl</link>
      <guid>https://dev.to/leethone/how-i-cut-figma-rest-api-tokens-by-95-for-cursor-claude-code-and-modern-ai-editors-1dfl</guid>
      <description>&lt;p&gt;Connecting AI coding tools like Cursor Composer, Claude Code, or Google Antigravity to Figma is the holy grail of frontend engineering. You paste a Figma URL, and your AI writes pixel-perfect Tailwind components.&lt;/p&gt;

&lt;p&gt;Except in practice, there's a huge catch: &lt;strong&gt;Figma's raw REST API is absurdly noisy.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this article, I'll break down why raw Figma payloads explode context windows, how AST pruning reduces token counts by 80%–95%, and how you can run this as a native Model Context Protocol (MCP) server.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem: The 200,000-Token Wall
&lt;/h2&gt;

&lt;p&gt;When you query Figma's &lt;code&gt;/v1/files/:key/nodes&lt;/code&gt; endpoint for an enterprise SaaS dashboard, you don't just get colors and typography. You get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Absolute bounding box coordinates down to 6 decimal places for every single node.&lt;/li&gt;
&lt;li&gt;Matrix transforms and vector paths for every decorative vector.&lt;/li&gt;
&lt;li&gt;Redundant redline metadata, default styling flags, and invisible layout envelopes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On an enterprise analytics dashboard with 646 nodes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Raw Wire Payload&lt;/strong&gt;: ~4.8 MB of JSON&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token Count&lt;/strong&gt;: &lt;strong&gt;189,485 BPE tokens&lt;/strong&gt; (cl100k_base)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Cost&lt;/strong&gt;: ~$0.38 per single prompt call on frontier models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency&lt;/strong&gt;: 15–25 seconds just for the model to parse the input&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A single design frame consumes almost the entire 200k context window of modern LLMs, causing severe layout hallucinations and broken CSS.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Solution: Semantic AST Pruning
&lt;/h2&gt;

&lt;p&gt;To fix this, I engineered &lt;strong&gt;Figma Spec Compressor&lt;/strong&gt; (Open Source on &lt;a href="https://github.com/leethoneid/figma-spec-compressor" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Instead of blindly dumping JSON into an LLM, it executes a 4-stage optimization pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raw Figma JSON (189k tokens)
   │
   ▼
[1] Node Pruner (Drops invisible nodes, masks &amp;amp; deep redlines)
   │
   ▼
[2] Auto-Layout Translator (Maps flexbox, padding &amp;amp; fills to Tailwind)
   │
   ▼
[3] Vector Collapser (Replaces 100+ SVG points with &amp;lt;icon&amp;gt; tags)
   │
   ▼
Clean YAML / Markdown Spec (9.8k tokens, 20ms ~ 165ms)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Verified Benchmark Results
&lt;/h3&gt;

&lt;p&gt;Tested with OpenAI's &lt;code&gt;gpt-tokenizer&lt;/code&gt; (&lt;code&gt;cl100k_base&lt;/code&gt;):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component Frame&lt;/th&gt;
&lt;th&gt;Raw AST Nodes&lt;/th&gt;
&lt;th&gt;Clean Nodes&lt;/th&gt;
&lt;th&gt;Raw Tokens&lt;/th&gt;
&lt;th&gt;Compressed Tokens&lt;/th&gt;
&lt;th&gt;Reduction&lt;/th&gt;
&lt;th&gt;Speed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SaaS Pricing Card&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;3,010&lt;/td&gt;
&lt;td&gt;615&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;80%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;25ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Enterprise Dashboard&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;646&lt;/td&gt;
&lt;td&gt;327&lt;/td&gt;
&lt;td&gt;189,485&lt;/td&gt;
&lt;td&gt;9,800&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;94.8%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~165ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Setting Up the MCP Server in 30 Seconds
&lt;/h2&gt;

&lt;p&gt;Figma Spec Compressor implements the standard &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; over stdio, making it universally plug-and-play.&lt;/p&gt;

&lt;h3&gt;
  
  
  In Cursor (&lt;code&gt;.cursor/mcp.json&lt;/code&gt;)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"figma-spec"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"github:leethoneid/figma-spec-compressor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"FIGMA_ACCESS_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your_figma_personal_access_token"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  In Claude Code CLI
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add figma-spec npx &lt;span class="nt"&gt;-y&lt;/span&gt; github:leethoneid/figma-spec-compressor mcp &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;FIGMA_ACCESS_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  In Google Antigravity, Zed, or Trae
&lt;/h3&gt;

&lt;p&gt;It supports any standard MCP configuration block or direct CLI terminal piping:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; github:leethoneid/figma-spec-compressor url &lt;span class="s2"&gt;"https://figma.com/design/:key/:slug?node-id=..."&lt;/span&gt; &lt;span class="nt"&gt;--markdown&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; spec.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Try It Out
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;📦 &lt;strong&gt;Open Source Repository&lt;/strong&gt;: &lt;a href="https://github.com/leethoneid/figma-spec-compressor" rel="noopener noreferrer"&gt;github.com/leethoneid/figma-spec-compressor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Pro Lifetime License (Single-file binary &amp;amp; commercial rights)&lt;/strong&gt;: &lt;a href="https://yeelix.gumroad.com/l/figma-spec-pro" rel="noopener noreferrer"&gt;yeelix.gumroad.com/l/figma-spec-pro&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Drop a comment below if you have questions about MCP integration or AST pruning techniques!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>frontend</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I checked what my forum does when Perspective returns an error — it scores everything 0</title>
      <dc:creator>Jack Li</dc:creator>
      <pubDate>Mon, 26 Oct 2026 04:44:53 +0000</pubDate>
      <link>https://dev.to/leethone/i-checked-what-my-forum-does-when-perspective-returns-an-error-it-scores-everything-0-4nfk</link>
      <guid>https://dev.to/leethone/i-checked-what-my-forum-does-when-perspective-returns-an-error-it-scores-everything-0-4nfk</guid>
      <description>&lt;p&gt;I run a small Discourse forum with the Perspective plugin, and with the Dec 31 shutdown coming, I finally went and read the plugin code instead of trusting the migration guides.&lt;/p&gt;

&lt;p&gt;What I found: when the response has no attributeScores — the shape of an error body — the code rescues to a default of 0.0. Not flagged, not queued for review. Just 0. Connection failures raise a visible error, so that's not the scary path. The error-body path is.&lt;/p&gt;

&lt;p&gt;So my question isn't really "which replacement do I switch to." The guides all give mapping tables, but the scores aren't comparable — TOXICITY has no single equivalent on the other side. My thresholds won't survive the move unless I replay my own traffic against the new scorer and see what it actually does with my comments.&lt;/p&gt;

&lt;p&gt;Has anyone here actually done that replay — run old and new side by side on real traffic before switching? What did your thresholds end up looking like, and did anything surprise you? Also curious: has anyone checked what their own error handling does today, not just what the guides say?&lt;/p&gt;

</description>
      <category>discourse</category>
      <category>moderation</category>
    </item>
    <item>
      <title>If you left Mailchimp — the automations don't migrate. How did you handle that?</title>
      <dc:creator>Jack Li</dc:creator>
      <pubDate>Wed, 14 Oct 2026 12:03:36 +0000</pubDate>
      <link>https://dev.to/leethone/if-you-left-mailchimp-the-automations-dont-migrate-how-did-you-handle-that-4mh9</link>
      <guid>https://dev.to/leethone/if-you-left-mailchimp-the-automations-dont-migrate-how-did-you-handle-that-4mh9</guid>
      <description>&lt;p&gt;A creator I follow recently shared their Mailchimp bill: &lt;strong&gt;$308/month for 7,000 subscribers&lt;/strong&gt; — on an old plan whose price quietly rises 11–13% a year. The number stuck with me, because the reason it's so high isn't usage. It's how the pricing works.&lt;/p&gt;

&lt;h3&gt;
  
  
  You pay for your peak, not for what you send
&lt;/h3&gt;

&lt;p&gt;Mailchimp bills by your peak contact count, not by your send volume. Every contact you've ever collected — including the ones who never open anything — counts toward the tier you pay for, every month. Send two campaigns or twenty, the bill is the same. That's a reasonable model when your list is growing fast and every contact is active. It's an expensive one when your list is old, quiet, and mostly dormant.&lt;/p&gt;

&lt;p&gt;So people leave. And that's where the second problem starts.&lt;/p&gt;

&lt;h3&gt;
  
  
  What actually migrates — and what doesn't
&lt;/h3&gt;

&lt;p&gt;When you move off Mailchimp, the import into a new platform is usually the easy part:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Contacts, tags, and segments import fine&lt;/li&gt;
&lt;li&gt;❌ Templates don't transfer&lt;/li&gt;
&lt;li&gt;❌ Automations don't transfer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything you built in the automation builder — welcome series, abandoned-cart flows, re-engagement sequences, all the conditional branches you tuned over months — has to be rebuilt by hand in the new tool. Two tabs open, clicking back and forth, for hours. The contacts are data, so they move. The automations are logic locked inside Mailchimp's builder, so they don't.&lt;/p&gt;

&lt;p&gt;I've heard versions of this story a few times now, and the pattern is always the same: the decision to leave takes an afternoon, the rebuild takes days, and the flows that don't get rebuilt quietly never come back.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I'm asking
&lt;/h3&gt;

&lt;p&gt;Full disclosure: I'm an indie developer researching whether this is worth building a tool for — one that would move &lt;em&gt;everything&lt;/em&gt;, including automations and templates, and show you an honest send-volume-based cost comparison before you switch. It doesn't exist yet. I'm not selling anything; I'm checking whether the pain is real enough, and specific enough, to build for.&lt;/p&gt;

&lt;p&gt;So instead of guessing, I'd rather ask the people who've actually done the migration:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three questions:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you've migrated off Mailchimp, what took the longest — or what broke?&lt;/li&gt;
&lt;li&gt;Would you have paid a one-time fee (around $99) for a done-for-you full migration, automations included?&lt;/li&gt;
&lt;li&gt;Free offer, no strings: tell me your list size and roughly how many automations you run, and I'll send back an honest audit — what you'd save elsewhere and what migration would actually involve. No pitch attached.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Even a one-line answer to question 1 helps. War stories especially welcome — the worse the rebuild, the more I need to hear it.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>saas</category>
      <category>startup</category>
      <category>business</category>
    </item>
  </channel>
</rss>
