The lightbulb moment: AI to the rescue
This adventure started with a simple realization: I was spending too much time on repetitive design tasks. I’d been following AI news and chatting with colleagues about the latest AI tricks. I even saw some demos at a Design Innovation (internal company event) where people used AI to generate UI code. That got me thinking... why not use AI to handle some of my design documentation chores?
The idea clicked when I was neck-deep in defining those Figma design tokens. Writing descriptions for each token one by one felt like reinventing the wheel hundreds of times. I thought, “Hey, I talk to AI bots every day for fun and research. Maybe one of them can help me describe these tokens?” At the same time, I knew I could script a solution to update the tokens in Figma automatically if I had all those descriptions. That’s where the second AI came in: an AI pair programmer to help me write a Figma plugin.
So the plan was set: Claude would generate the content (token descriptions) and Cursor AI would help me code a Figma plugin to apply that content. It was time to put this plan into action.
Step 1: Let Claude write the boring stuff
First up, I enlisted Claude (Anthropic’s AI assistant) to handle the tedious writing. If you’ve never used Claude, it’s similar to ChatGPT - great at understanding context and generating text, but also capable of processing images and files if needed. My goal for Claude was straightforward: scan my design components and generate descriptive text for each token (for example, a color token might get the description “Primary brand color used for call-to-action buttons”).
How did I do this? I literally showed Claude what my UI looked like. I uploaded a few screenshots of design components and prompted Claude in plain English, something along the lines of: “Here are various UI components with color, spacing, and border tokens. Please generate a short, clear description for each token you identify.” Claude took it from there, analyzing the visuals and my request. After a bit of back-and-forth (tweaking prompts, clarifying here and there), Claude produced a list of token descriptions that felt spot-on.