Figma
Where every page is designed first. Colors are variables and repeated pieces are components.
The design is the source of truth
Personal Project
This site. I design every page in Figma first, then build it in Astro, with Claude Code doing the hands-on work in both places through the Figma MCP server. This page explains the tools I use, how I worked, and how I keep the design and the code matching.
Technology
Four tools, each with one job.
Where every page is designed first. Colors are variables and repeated pieces are components.
The design is the source of truth
Builds the site from small components and plain CSS. Page text lives in its own data files.
Static site, hosted on Cloudflare Pages
An AI assistant that reads and edits both the Figma file and the code, so one helper works on both sides.
Desktop app, Code tab
The bridge between Claude and Figma: it reads designs into code and writes changes back onto the canvas.
use_figma and get_design_context
Process
I am learning to code, so changes come in small steps I can follow and type in myself.
Step 1
Creative, not corporate
I picked a palette from my own SR icon and set the tone: creative, but still clearly a product leader.
Step 2
I sketch, the MCP cleans up
A mix of my own hands-on work and Claude working through the Figma MCP. I sketch a layout myself in Figma using simple shapes, then have the MCP clean it up: lining things up, swapping in the shared colors and components, and making it consistent with the rest of the site. We update the current frame in place and keep older versions when I want a comparison. I watch the edits happen live.
Step 3
Figma to Astro, kept up to date
Claude reads each Figma frame through the MCP and rebuilds it as Astro components and plain CSS, reusing images already in the project. Part of my prompting is asking Claude to keep everything up to date as it goes, so the code, the notes and the Figma file stay in step with each other.
Step 4
Manual checks and next steps
I check the pages myself, in the browser and in Figma, and update Figma with anything that needs to change. Then I plan the next steps and update the instructions Claude follows, so every page keeps the same style and the same kind of information.
Staying in sync
Everything in Figma has a matching name in the code, so I can find one from the other.
| In Figma | In code |
|---|---|
| Variable color/navy | CSS variable --color-navy in global.css |
| Component "Service Card" | ServiceCard.astro |
| Frame "Consulting — v1" | consulting.astro, named in a comment at the top of the file |
| Auto layout gap and padding | Flexbox and grid with the same pixel values |
| Text inside a frame | A data file, so words can change without touching the layout |
| A "Spacer" layer in a card | margin-top: auto |
| Variables bucket/1 to bucket/8 | CSS variables --bucket-1 to --bucket-8, the same color ramp on the board and in the stats |
| Frame “Data Drop — Peg Levels” | pegStyles.ts, read by both the game board and its peg key |
| Frame “Data Drop — Head States” | Face photos in src/assets/faces/, picked up by the page automatically |
Shared components and named color variables connect the design and code. Updates go into the current frame, and older versions stay when I want to compare them. After a change, the Figma file, Astro components and notes are checked together so the design reflects what the site actually shows.
Notes
Figma is my source of information: to understand how the site works, I look at the design. The files in the project are mostly for Claude, so each new session can pick up where the last one left off.
Where I go to understand the site. Every page, color and component is there, and I can read the design instead of the code.
For me
A log of what was built and why, so Claude knows the history. This page was built from it.
docs/figma-to-code-notes.md · for Claude
Small files Claude reads at the start of every session, such as how I like to work and learn.
For Claude
The rules every page follows, and a table of every Figma frame with its page and whether it’s built.
For Claude