Skip to content
Back to search

claude2figma

An enforcement layer for Claude Code + Figma — 4 skills that keep AI on your Design System rails. Components stay linked, tokens stay bound, nothing goes off-spec.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/senlindesign--claude2figma/badge.svg)](/listings/senlindesign--claude2figma)

HTML

<a href="/listings/senlindesign--claude2figma"><img src="/api/listings/senlindesign--claude2figma/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prerequisites

- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (CLI / Desktop / VS Code) - [Figma MCP Server](https://www.npmjs.com/package/@anthropic-ai/figma-mcp) installed and authenticated - A Figma file with a Design System (locally defined or linked via Library)

Install

# 1. Clone the repo
git clone https://github.com/senlindesign/cc2figma.git

# 2. Copy skills to your project
cp -r cc2figma/.claude/skills/* your-project/.claude/skills/

# 3. Copy config
cp cc2figma/.claude/settings.json your-project/.claude/settings.json

# 4. Copy CLAUDE.md template
cp cc2figma/CLAUDE.md.template your-project/CLAUDE.md

Configure CLAUDE.md

Open `CLAUDE.md` and paste your Figma file URL:

# Figma Design Project

- **Figma file:** <https://www.figma.com/design/YOUR_FILE_KEY/...>
- **Fonts:** [leave blank — Preflight auto-detects from your DS]
- **Session goal:** [what are we designing today?]

## Rules

1. Every visual value must bind to a Style or Variable.
2. Always search connected libraries before building any component from scratch.
3. Never start designing before the Design Brief is confirmed.

Then say "let's start" in Claude Code. Preflight handles the rest.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 20 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "claude2figma",
  3. "description": "Skills for enforcing Design System compliance in Claude + Figma workflows. Includes preflight checks, style binding, component rules, and reference interpretation.",
  4. "owner": {
  5. "name": "senlindesign",
  6. "email": ""
  7. },
  8. "plugins": [
  9. {
  10. "name": "claude2figma",
  11. "source": "./",
  12. "description": "Design System compliance harness for Claude + Figma. Enforces library-first components, token binding, and automated QA.",
  13. "homepage": "https://github.com/senlindesign/claude2figma",
  14. "repository": "https://github.com/senlindesign/claude2figma",
  15. "license": "MIT",
  16. "category": "design",
  17. "tags": ["figma", "design-system", "tokens", "ui", "compliance"]
  18. }
  19. ]
  20. }
README.md · README · 195 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Claude Code to Figma
  2. [![Made for Claude Code](https://img.shields.io/badge/Made%20for-Claude%20Code-blueviolet?style=flat-square&logo=anthropic)](https://docs.anthropic.com/en/docs/claude-code)
  3. [![Figma MCP](https://img.shields.io/badge/Figma-MCP%20Server-ff7262?style=flat-square&logo=figma)](https://www.npmjs.com/package/@anthropic-ai/figma-mcp)
  4. [![License: MIT](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE)
  5. Design System compliance for AI-generated Figma designs. 4 skills, 3-step preflight, zero raw values.
  6. > **Quick start:** Clone, copy skills to `.claude/skills/`, paste your Figma URL into `CLAUDE.md`, say "let's start". [Full install guide below.](#installation)
  7. [Chinese / 中文版](README.zh-CN.md)
  8. ---
  9. ## Why?
  10. AI can write to Figma now. But without guidance, it builds everything from scratch — hardcoded hex colors, arbitrary font sizes, raw spacing values. The result looks right but is completely disconnected from your Design System. Every color is a magic number. Every component is a one-off. Your design tokens might as well not exist.
  11. cc2figma fixes this with 4 Claude Code Skills that enforce Design System compliance at every step:
  12. - Components are Instances of your Master Components, not rebuilt from scratch
  13. - Colors, fonts, spacing, and radii bind to Variables and Styles, not raw values
  14. - Every write to Figma is automatically verified for token compliance
  15. ---
  16. ## Before & After
  17. ![With Skills vs Without Skills](assets/before-after.png)
  18. > **With Skills:** Master Component Instances, all visual values bound to Design System Variables and Styles.
  19. > **Without Skills:** Hardcoded colors, arbitrary spacing, components built from scratch — looks right, but zero Design System connection.
  20. ---
  21. ## Preflight System
  22. Before every design session, a 3-step parallel check ensures everything is connected:
  23. ![Preflight Status](assets/preflight-status.png)
  24. MCP connection, file permissions, libraries, styles, variables, and components — all verified in parallel before a single node is created.
  25. ---
  26. ## Usage Examples
  27. Say "let's start" to run preflight, then describe what you want:
  28. You: Build a login page with email and password fields
  29. Claude: [searches DS for Form, Input, Button components]
  30. [creates Instances, binds all tokens]
  31. [takes screenshot for verification]
  32. You: Add a registration form next to it with a confirm password field
  33. Claude: [reuses same DS components, adds new section]
  34. [QA verifies all bindings automatically]
  35. You: Here's a screenshot of the dashboard we need
  36. Claude: [analyzes reference, outputs structured Design Brief]
  37. [builds section by section, verifying after each step]
  38. Every interaction follows the same loop: **search DS** → **create Instances** → **bind tokens** → **verify**.
  39. ---
  40. ## What's Included
  41. ### 4 Skills
  42. | Skill | Trigger | What it does |
  43. | ----- | ------- | ------------ |
  44. | `figma-preflight` | "let's start", first Figma URL | 3-step parallel check + Token Map + Component Registry |
  45. | `component-rules` | Any UI construction task | Library-first lookup, Auto Layout, semantic naming |
  46. | `figma-style-binding` | Any color, font, or spacing operation | Enforce Variable / Style binding + post-write QA verification |
  47. | `reference-interpreter` | Share screenshot, URL, or description | Output structured Design Brief before building |
  48. ### How They Work Together
  49. "let's start"
  50. |
  51. v
  52. ① preflight ─── one-time setup, load Token Map + Component Registry
  53. |
  54. v
  55. ② reference-interpreter ─── optional: screenshot / reference → Design Brief → user confirms
  56. |
  57. v
  58. ┌→ ③ component-rules ─── search Library, use Instances
  59. │ |
  60. │ ④ figma-style-binding ─── bind every value to a token, then auto-verify
  61. │ |
  62. └── next section (loop until done)
  63. ---
  64. ## Good For / Not For
  65. | Good For | Not For |
  66. | -------- | ------- |
  67. | Building pages from an existing Design System | Creating a Design System from scratch |
  68. | Describing UI in natural language, Claude builds it in Figma | Pixel-perfect illustration or icon drawing |
  69. | Working in a DS file or a file with a linked DS library | Free-form design without a Design System |
  70. | Ensuring 100% token compliance in design output | FigJam / whiteboard workflows |
  71. ---
  72. ## Installation
  73. ### Prerequisites
  74. - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (CLI / Desktop / VS Code)
  75. - [Figma MCP Server](https://www.npmjs.com/package/@anthropic-ai/figma-mcp) installed and authenticated
  76. - A Figma file with a Design System (locally defined or linked via Library)
  77. ### Install
  78. ```bash
  79. # 1. Clone the repo
  80. git clone https://github.com/senlindesign/cc2figma.git
  81. # 2. Copy skills to your project
  82. cp -r cc2figma/.claude/skills/* your-project/.claude/skills/
  83. # 3. Copy config
  84. cp cc2figma/.claude/settings.json your-project/.claude/settings.json
  85. # 4. Copy CLAUDE.md template
  86. cp cc2figma/CLAUDE.md.template your-project/CLAUDE.md
  87. ```
  88. ### Configure CLAUDE.md
  89. Open `CLAUDE.md` and paste your Figma file URL:
  90. ```markdown
  91. # Figma Design Project
  92. - **Figma file:** <https://www.figma.com/design/YOUR_FILE_KEY/...>
  93. - **Fonts:** [leave blank — Preflight auto-detects from your DS]
  94. - **Session goal:** [what are we designing today?]
  95. ## Rules
  96. 1. Every visual value must bind to a Style or Variable.
  97. 2. Always search connected libraries before building any component from scratch.
  98. 3. Never start designing before the Design Brief is confirmed.
  99. ```
  100. Then say "let's start" in Claude Code. Preflight handles the rest.
  101. ---
  102. ## Supported Scenarios
  103. | Scenario | How It Works |
  104. | -------- | ------------ |
  105. | **Working in a DS file directly** | Preflight reads all local Styles, Variables, and Components. Full token binding. |
  106. | **New file with a linked DS library** | Component Instances inherit all token bindings from masters automatically. Library variables can be imported for new frames. |
  107. ---
  108. ## Directory Structure
  109. ```
  110. your-project/
  111. ├── CLAUDE.md # Project config (Figma URL, fonts, rules)
  112. └── .claude/
  113. ├── settings.json # Permissions + QA Hook
  114. └── skills/
  115. ├── figma-preflight/ # 3-step parallel check + Token Map + Component Registry
  116. ├── component-rules/ # Library-first, Auto Layout, naming
  117. ├── figma-style-binding/ # Color / Text / Spacing binding + QA verification
  118. └── reference-interpreter/ # Reference → Design Brief
  119. ```
  120. ---
  121. ## Known Limitations
  122. | Limitation | Workaround |
  123. | ---------- | ---------- |
  124. | Doubly-nested Instances can't be directly modified | `detachInstance()` on the outer instance first |
  125. | `getLocalVariablesAsync()` can't see library variables | Instances inherit tokens automatically; use `importVariableByKeyAsync` for new frames |
  126. | Invalid variant values in `setProperties` roll back the entire script | Read `componentPropertyDefinitions` to confirm valid values first |
  127. ---
  128. ## Contributing
  129. Issues and PRs are welcome. If you have a Figma design workflow that could benefit from a new Skill, describe it in an Issue.
  130. ---
  131. MIT © 2025 Sen Lin

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.