<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Reza Tresna on Medium]]></title>
        <description><![CDATA[Stories by Reza Tresna on Medium]]></description>
        <link>https://medium.com/@tresnareza?source=rss-92fc4c46c926------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YiPfWFGAuPHV4jzrfQEtgg.png</url>
            <title>Stories by Reza Tresna on Medium</title>
            <link>https://medium.com/@tresnareza?source=rss-92fc4c46c926------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:12:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tresnareza/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building an AI-Ready Design System with Claude and Figma MCP for Snacky, an E-commerce App]]></title>
            <link>https://www.designsystemscollective.com/building-an-ai-ready-design-system-with-claude-and-figma-mcp-for-snacky-an-e-commerce-app-8c072a0f5fc8?source=rss-92fc4c46c926------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c072a0f5fc8</guid>
            <category><![CDATA[agentic-workflow]]></category>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[design-system-tips]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[ux-design]]></category>
            <dc:creator><![CDATA[Reza Tresna]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 13:20:43 GMT</pubDate>
            <atom:updated>2026-09-22T13:20:43.674Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building an AI-Ready Design System with Claude and Figma MCP for Snacky, a Cross-Platform E-Commerce App</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DvYIVKW1I8LbWj6mdoxZNw.png" /></figure><p>In this AI era, where prototypes and products can be built in a short amount of time, there are some pretty big brand and scalability problems:</p><ul><li><strong>AI slop: </strong>an AI-generated screen defaults to the same generic look every other AI output has, rounded cards, purple gradient, default font. The UI ends up generic, no distinct character, no brand identity.</li><li><strong>Hardcoded values:</strong> colors, spacing, and radius get hardcoded per component. The problem is, changing one color means editing it manually across dozens of components, instead of updating a single token.</li><li><strong>No semantic layer:</strong> colors get referenced by hex code, for example “#3B82F6” instead of “primary-action”. Designers and developers end up guessing which color applies to which case.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eBd7_jz7s6T41MMwMIRFsA.png" /><figcaption>AI-generated output often uses hardcoded and non-semantic values for components</figcaption></figure><p>To solve the problems, we need to build a design system that’s readable by humans and AI.</p><p>This case study documents that process end to end. It covers how I built a reusable, scalable, consistent, and AI-ready design system for <a href="https://rezatresnas.github.io/snacky-design-system/">Snacky</a>, an e-commerce app. The design system was built using an agentic AI workflow that integrates Figma and Claude Code. The app itself is built with React for web, and Compose Multiplatform for native on Android and iOS.</p><h3>Preparation</h3><p>To set up an agentic workflow for building the design system documentation, the first thing I did was prepare the Figma design file that would serve as the source of truth for the AI agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGgGC5zTVWbThADi9lvtzA.png" /><figcaption>Figma design file as the source of truth</figcaption></figure><p>Next, I connected Figma and Claude Code through an MCP connection. This lets the Claude agent access, extract data from, and even modify the design in Figma directly through prompts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQqQmlValYeDTwFzCUyqhQ.png" /><figcaption><em>Setting up connection between Claude and Figma using MCP</em></figcaption></figure><h3>Build Foundations: Design Tokens</h3><p>To build design tokens, I broke design down into small, reusable elements that connect to one another. Following that approach, the first step was to define the smallest foundational design elements that are most critical to consistency and scalability: <strong>typography</strong>, <strong>colors</strong>, <strong>spacing</strong>, <strong>radius</strong>, and <strong>shadow</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p6Y8fr5nNX-rlkikYBhbxQ.png" /><figcaption>Atomic design approach for building components</figcaption></figure><h4>Typography</h4><p>The first step in building the typography foundation was choosing the font that matched the app’s branding. Next was naming the tokens to match the common text structure used across the app, such as heading, body, small, and caption. These tokens follow the naming format token name/weight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yARRWshGDHv4BzrknPTmhg.png" /><figcaption><em>Typography token naming format</em></figcaption></figure><p>This format keeps the design system scalable and easy to maintain for future needs. For example, if a specific font weight variation is needed for a token down the line, all that’s required is adding a new weight variant to the existing token, without renaming any token that’s already implemented.</p><p>The next step was writing usage documentation explaining when each typography token should be used, along with the size, weight, line-height, and spacing specification for each one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jwgk8DM0wE_fN7mXqj_1Ag.png" /><figcaption><em>Typography design token table</em></figcaption></figure><h4>Colors</h4><p>Building the color tokens for the design system required two steps: defining the<strong> primitive colors</strong> and the <strong>semantic colors</strong>.</p><p><strong>Primitive colors</strong> form a global base color library (a hex code dictionary) holding every shade allowed within the brand’s colors. This matters for keeping shade usage consistent across the app, so colors never drift far from the core brand shades. This layer purely defines what the color is, without regard to where it will be used.</p><p>Primitive color tokens are named following a shades scale. The most common industry standard, used by Tailwind CSS or Material Design, runs from 50 up to 900 or 950.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KRe8TnEXb-aQ6rA1SlrBMg.png" /><figcaption>Color shades and primitive token naming</figcaption></figure><p><strong>Semantic color</strong> tokens define the functional purpose of a color on a UI element. This layer connects the base color to its design context, answering the question of when that color should be used.</p><p>Semantic color tokens are named with the format Category/Context/Variant/Intent/State. This naming format keeps semantic color tokens scalable and easy for both designers and developers to read according to their usage context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kcwkAyLB3gu0mC-bOZsULQ.png" /><figcaption>Color shades and semantic design token naming</figcaption></figure><p>Once the semantic color naming was set, the next step was writing a code syntax into the Figma variables. This code syntax serves as the reference the AI reads to translate Figma’s variable naming into the standard variable naming used in web and mobile code. The industry-standard naming convention is kebab-case for web and camelCase for mobile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R1Sh_gurVI-jNNf3j5Ph1Q.png" /><figcaption>Web and mobile code syntax</figcaption></figure><p>After the semantic colors were set, the next step was checking color contrast. This matters for making the app accessible to all users. Good contrast lets users read every piece of information and clearly identify each element in the app. Every text and background color combination was measured against the WCAG contrast standard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rC7hmTGF3OaKcVT0f9P9pA.png" /><figcaption>WCAG contrast check</figcaption></figure><h4>Spacing, Radius, and Shadow</h4><p>Keeping the UI consistent across every page requires defining the sizing values for spacing (gap, padding, margin), border radius, and shadow used across elements. Spacing and border radius tokens follow the same approach: defined at both a primitive and semantic layer, then written into the code syntax variables so the AI can read and implement them in code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Opz0vuMUXcYnM1YH-ogruQ.png" /><figcaption>Web and mobile variables and code syntax for spacing, radius, and shadow</figcaption></figure><p>Once every design token variable was defined in Figma, it was time to turn them into a <a href="https://rezatresnas.github.io/snacky-design-system/">documentation site</a> carrying design specifications and code, ready for designers and developers to use.</p><p>This started by prompting the AI agent to read every variable in the semantic design tokens already set up in Figma’s variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VajmMmt9oOnC61-Gsm546A.png" /><figcaption>Prompt for reading every token variable</figcaption></figure><p>The next step was instructing the AI agent to build color palette cards complete with their values: hex values for primitive colors, semantic naming information for semantic colors, the mapping between semantic and primitive values, and usage notes for each semantic color.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKb1HLpQdek1BYhlIxEAFA.png" /><figcaption>Primitive color page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vCim-bVGhm2SoVQunpc-2Q.png" /><figcaption>Semantic color page</figcaption></figure><p>Beyond color tokens, I also had the AI agent write out the value specifications as tables for the typography, spacing, radius, and shadow tokens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rZjLOgj92VTxy8Z82u_Ixg.png" /><figcaption>Typography tokens page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rHVTlnT6sN9vqSJmpl8Urw.png" /><figcaption>Spacing tokens page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6SKiprB0D39BbYICnxbokQ.png" /><figcaption>Border radius tokens page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ofcNN7gkw0MwifSTwFGPIQ.png" /><figcaption>Sizing tokens page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I8GnpheSdHBrOCGlQUWoRg.png" /><figcaption>Shadow tokens page</figcaption></figure><h4>Code Generation for Design Tokens</h4><p>I had the AI agent build a separate code tab, so developers could access the code apart from the specification docs. Within that tab, the agent generated two versions of the code (Compose and React), following the code syntax set in Figma, kebab-case for React and camelCase for Compose, so the generated code stayed clean and matched each platform’s best practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_IzSVhb4opUuXAne_WZ0ew.png" /><figcaption>Code tab page for semantic color tokens</figcaption></figure><h3>Build Components</h3><p>The first step in building components was making sure every component built in Figma already used <strong>auto layout.</strong> Components built with auto layout in Figma convert cleanly into code. It was also important to make sure every padding, color, and spacing value in a component already used the design token variables set up earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wAAgiyyPMMRRMVs2sz7C1Q.png" /><figcaption>Component design in Figma using auto layout and design token variables</figcaption></figure><p>For the component documentation, I had the AI read and extract each component design from the Figma file, turn it into code, and build documentation split into three tabs on the site: <strong>Overview</strong>, <strong>Spec</strong>, and <strong>Code and Playground</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xPBbci3YG-AOzXLJTO45Og.png" /><figcaption>Prompt for reading components and building documentation</figcaption></figure><h4>Overview</h4><p>This is the first page a designer or developer lands on. It explains usage and lays out the general variants and properties before diving into a component’s more detailed information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1mKOMtwCBzGaCsNK4eklXw.png" /><figcaption>Overview page</figcaption></figure><h4>Spec</h4><p>The Spec tab holds more detailed visual design specifications through diagrams and a properties panel, showing the exact sizing specs and the semantic design tokens used in that component, along with their raw values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SHA_QCaI0-uckHVfnv9dzw.png" /><figcaption>Spec page</figcaption></figure><h4>Code and Playground</h4><p>This page focuses on code documentation and a playground, letting designers and developers copy code and try out a live preview of the component by changing text values and variants in real time. It also embeds the Figma design file, so developers and designers can compare the component in Figma against the live preview output from the code. This matters for catching any Figma design changes that need to stay aligned with the live code. The page carries code for both React and Compose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CfCIY8swwLoqv4mwXIuDfg.png" /><figcaption>Code and playground page</figcaption></figure><h3>Ship the Design System for AI Agents</h3><p>With tokens, components, and documentation all in place, the next step was making the design system installable and consumable by an AI agent working in a separate project, so the AI does not hallucinate a design that drifts from the standard the design system has already set. Here is the process that followed.</p><h4>Creating the GitHub Repository, NPM, and JitPack Package</h4><p>I created a <a href="https://github.com/rezatresnas/snacky-design-system">public GitHub repository</a> for this design system. It needs to be public because several mechanisms depend on that access: JitPack builds the Kotlin package straight from the repo’s tags, GitHub Actions publishes to npm on every release, and GitHub Pages hosts the live documentation site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SfTQ3mUGj_mOaHP9nTpnBw.png" /><figcaption>Claude Code integration with the GitHub repository</figcaption></figure><p>An AI agent building a new app only needs to be told to install the real package,<strong> </strong><a href="https://www.npmjs.com/package/@snacky/ui"><strong>@snacky/ui on npm</strong></a> or the <a href="https://jitpack.io/#rezatresnas/snacky-design-system"><strong>JitPack coordinate for Compose UI</strong></a>. That package carries components and tokens already verified against Figma, complete with type-level documentation like TypeScript types and KDoc, so the agent uses the correct values directly without having to interpret a separate specification file.</p><h3>Test Building an App Page With the Design System</h3><p>With the package and repository ready, it was time to test the design system by building a page through a few tools and IDEs, such as Android Studio and Claude Design, using a single detailed prompt that described the page instead of typing instructions ad hoc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YC54c-c53RZvgEq43JwxRg.png" /><figcaption>Comparing the Compose screen built by the AI agent in Android Studio vs the Figma prototype</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g-9U7qX3iZfn8oTMpcxuKw.png" /><figcaption>Building the home page in Claude Design using the design system and a single prompt</figcaption></figure><p>The test results showed that an AI agent built an app page that perfectly matched the Figma design. The AI agent successfully generated the page from the exact same components and tokens the design system defines.</p><p>The generated code also used the semantic variables that were already defined in Figma. This means the AI agent successfully generated code that is scalable and maintainable for both designers and developers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4w3wRpZSMKEx3ot0aF-k6w.png" /><figcaption>Generated code using the design tokens set in Figma</figcaption></figure><p>In both tools, as long as the AI agent installed the real package for every need, the result stayed consistent with the existing standard, and the risk of the AI hallucinating a design that drifts away from it dropped significantly.</p><h3>Conclusion</h3><p>Building the <strong>Snacky App design system</strong> shows that every design value, from color, spacing, and typography down to components, can start from a single source of truth in Figma and end as code that developers and AI agents can use directly. The three-tab documentation explains how each piece is used, and tokens stay consistent from primitive through semantic, which keeps the system reusable and scalable. Tested directly in Claude Design and Android Studio, the real packages let an AI agent build apps accurately and consistently with the standard set from the very start.</p><p>You can explore the finished design system on the <a href="https://rezatresnas.github.io/snacky-design-system/">live documentation site</a>, and the source code is on <a href="https://github.com/rezatresnas/snacky-design-system">GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c072a0f5fc8" width="1" height="1" alt=""><hr><p><a href="https://www.designsystemscollective.com/building-an-ai-ready-design-system-with-claude-and-figma-mcp-for-snacky-an-e-commerce-app-8c072a0f5fc8">Building an AI-Ready Design System with Claude and Figma MCP for Snacky, an E-commerce App</a> was originally published in <a href="https://www.designsystemscollective.com/">Design Systems Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>