generate-code-with-design-system
Skill3.5k starsChanged 11 months agoMITView on GitHub
Write UI code (React, Vue, Svelte, HTML/CSS, Tailwind) using only the project's design system — its component package, exported components and tokens — and report missing pieces to the person instead of re-implementing them. Use when the user asks to build a page, screen, form or feature in code "with our components/design system", implements a Figma design in a codebase that has a component library, or asks to check generated code for design-system adherence.
Trending
More talk lately.about the whole repository
Who's talking about southleft/figma-console-mcp
- @glencampbell.design“This MCP will work better at performing actions in Figma. Connecting to Figma with Claude Code, which …”Bluesky · Mar 25, 2026 · 3 likes
- @azu.bsky.social“AIアシスタントとFigmaを接続するMCPサーバ。 Figma MCPと違って、Figma Pluginを経由することでWriteの操作ができる。 デザイン変数、コンポーネント、スタイルの取得や、デザイントー… ""…”Bluesky · Mar 16, 2026 · 2 likes
- @github-trending-js.bsky.social“🚀 Skyrocketing! 🚀 (200+ new stars) 📦 southleft / figma-console-mcp ⭐ 3,116 (+242) 🗒 TypeScript Your …”Bluesky · Nov 5, 2026 · 1 likes
- @ryonakae.com“Figma Console …”Bluesky · Oct 22, 2026 · 1 likes
- A Hacker News story“Figma Console MCP”Hacker News · Jul 21, 2026 · 1 points
The biggest 5 of 32 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 32
Talked about on GitHub, Bluesky and Hacker News (32 times).
On GitHub · 23
- Nov 30, 2026⬆️ Figma Console MCP updated: v1.46.0 → v2.5.1 — adamforrester/xd-toolkit0 reactions
- Nov 6, 2026feat(data): add Kandev, Stroq, Figma Console MCP and unslop to catalog — QAInsights/awesome-ai-tools0 reactions · 6 comments
- Nov 2, 2026⬆️ Figma Console MCP updated: v1.41.2 → v1.46.0 — adamforrester/xd-toolkit0 reactions
- Nov 1, 2026chore(deps): bump zod and figma-console-mcp in /apps/s2a-toolkit-bridge — adobecom/consonant0 reactions · 1 comment
- Oct 26, 2026⬆️ Figma Console MCP updated: v1.40.9 → v1.41.2 — adamforrester/xd-toolkit0 reactions
18 more on GitHub
- Oct 19, 2026chore(deps): bump @modelcontextprotocol/sdk and figma-console-mcp in /apps/s2a-toolkit-bridge — adobecom/consonant0 reactions · 1 comment
- Oct 14, 2026chore(deps): bump @modelcontextprotocol/sdk and figma-console-mcp — adobecom/consonant0 reactions · 1 comment
- Oct 5, 2026⬆️ Figma Console MCP updated: v1.40.7 → v1.40.9 — adamforrester/xd-toolkit0 reactions
- Sep 28, 2026⬆️ Figma Console MCP updated: v1.40.4 → v1.40.7 — adamforrester/xd-toolkit0 reactions
- Sep 21, 2026⬆️ Figma Console MCP updated: v1.40.0 → v1.40.4 — adamforrester/xd-toolkit0 reactions
- Aug 17, 2026⬆️ Figma Console MCP updated: v1.39.1 → v1.40.0 — adamforrester/xd-toolkit0 reactions
- Aug 3, 2026⬆️ Figma Console MCP updated: v1.38.0 → v1.39.1 — adamforrester/xd-toolkit0 reactions
- Jul 27, 2026⬆️ Figma Console MCP updated: v1.36.0 → v1.38.0 — adamforrester/xd-toolkit0 reactions
- Jul 20, 2026⬆️ Figma Console MCP updated: v1.35.0 → v1.36.0 — adamforrester/xd-toolkit0 reactions
- Jul 13, 2026⬆️ Figma Console MCP updated: v1.34.0 → v1.35.0 — adamforrester/xd-toolkit0 reactions
- Jul 6, 2026⬆️ Figma Console MCP updated: v1.32.0 → v1.34.0 — adamforrester/xd-toolkit0 reactions
- Jun 25, 2026Set up figma-console-mcp (Southleft) for local design↔code workflow — digital2analogue/parsimony0 reactions · 1 comment
- Jun 22, 2026⬆️ Figma Console MCP updated: v1.31.0 → v1.32.0 — adamforrester/xd-toolkit0 reactions
- Jun 15, 2026⬆️ Figma Console MCP updated: v1.29.0 → v1.31.0 — adamforrester/xd-toolkit0 reactions
- May 25, 2026⬆️ Figma Console MCP updated: v1.27.1 → v1.29.0 — adamforrester/xd-toolkit0 reactions
- May 18, 2026⬆️ Figma Console MCP updated: v1.23.0 → v1.27.1 — adamforrester/xd-toolkit0 reactions
- May 11, 2026⬆️ Figma Console MCP updated: v1.22.1 → v1.23.0 — adamforrester/xd-toolkit0 reactions
- Apr 13, 2026⬆️ Figma Console MCP: initial tracking at v1.22.1 — adamforrester/xd-toolkit0 reactions
On Bluesky · 8
- Mar 25, 2026This MCP will work better at performing actions in Figma. Connecting to Figma with Claude Code, which should point at your code project.… — @glencampbell.design3 likes and reposts · 1 reply
- Mar 16, 2026AIアシスタントとFigmaを接続するMCPサーバ。 Figma MCPと違って、Figma Pluginを経由することでWriteの操作ができる。 デザイン変数、コンポーネント、スタイルの取得や、デザイントー… ""… — @azu.bsky.social2 likes and reposts
- Nov 5, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 southleft / figma-console-mcp ⭐ 3,116 (+242) 🗒 TypeScript Your design system as an API. Connect AI… — @github-trending-js.bsky.social1 likes and repost · 1 reply
- Oct 22, 2026Figma Console MCPとかの、Figmaプラグイン使ってMCPサーバーをローカルで立てるタイプじゃないと独自フォントは扱えないな。なんかでもこういうのってWebSocketで通信するから接続不安定で微妙なんよなあ github.com/southleft/fi... — @ryonakae.com1 likes and repost
- Mar 21, 2026📦 southleft / figma-console-mcp ⭐ 1,146 (+37) 🗒 TypeScript Your design system as an API. Connect AI to Figma for extraction, creation,… — @github-trending-js.bsky.social1 likes and repost
3 more on Bluesky
- Mar 20, 2026github.com/southleft/figma... GitHub - southleft/figma-console-mcp: Your design system as an API. Connect AI to Figma for extr... — @technews4869.bsky.social1 likes and repost
- Mar 19, 2026Figmaの変数やコンポーネント記述をMCPプロトコル経由でAIに連携させるツールらしい AIにデザイン操作やデータ抽出させたい場合に便利そうかな yug1224 starred southleft/figma-console-mcp… — @yug1224.com1 likes and repost
- Feb 17, 2026AIがFigmaでデザインできるMCPありそうで無さそうなので作ってみよかなと思っていたけど、やりたいことの完全上位互換みたいなやつ既にあってやる気なくなっちゃった / southleft/figma-console-mcp: Your design system as an… — @ryonakae.com1 likes and repost · 1 reply
On Hacker News · 1
- Jul 21, 2026Figma Console MCP1 point
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-reviewSkill
- code-connectSkill
- design-code-paritySkill
- design-tokens-syncSkill
- generate-with-design-systemSkill
- grade-generationSkill
- import-web-pageSkill
- troubleshoot-connectionSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Check package.json dependencies, workspace packages, path aliases in tsconfig.json, and existing imports in nearby files.
- Distinctive: line 24
If the repo has no identifiable design system, say so and ask before writing anything.
- Distinctive: line 26
When the code library mirrors a Figma library, the Figma side can help:
- Distinctive: line 49
Wait for the answer. A placeholder is a comment or a plain, unstyled marker element.
- Very specific: line 53
Import components only from the design-system source.
- Very specific: line 54
Don't render raw <button>, <input>, <select>, <textarea>, <dialog> or <table> when the system has that component.
- Very specific: line 59
No hex, rgb or hsl literals.
- Distinctive: line 60
Only reference tokens that exist.
- Very specific: line 78
Use sources: [{ path, content }] instead of files for code that isn't on disk yet.
- Very specific: line 95
Use the grade-generation skill.
- Distinctive: line 101
Write a local component that duplicates one the system has, or a styled element standing in for a missing one.
- Distinctive: line 105
Add features or elements the request didn't ask for.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Generate code with the design system
Tools (Local Mode): this skill uses tools outside the core set. If they aren't in your tool list, call
figma_enable_toolsets({ toolsets: ["inspect", "parity", "codeconnect"] })once at the start; if they still don't appear, call them throughfigma_call({ tool, arguments }). Cloud Mode lists every tool, so skip this there.
This works like generating in Figma, just in code. Use the system's components and tokens, and report what's missing. Don't write a local <Button>, a styled <div> card, or a new CSS variable because the system lacks one. Tell the person and let them decide.
1. Discover the code design system (read only)
Implementing a Figma design in a repo that uses Code Connect (it has a figma.config.json or *.figma.ts files): call figma_get_code_connect_map({ repoRoot: "<repo>", nodeId: "<frame>" }) first, or pass figmaUrl when the file isn't open in Figma (Cloud Mode: pass the Code Connect files as files instead of repoRoot). Use its snippets and imports for the mapped instances: they are the repo's real components with this design's property values. Treat everything under unmapped as needs for step 2, never as an invented component. Snippets marked approximate (slots, nested overrides) still need checking against the design.
Find all three of these, and note where each came from:
- Component source. The import specifier(s) that count as the design system, e.g.
@acme/uior@/components/ui.- Check
package.jsondependencies, workspace packages, path aliases intsconfig.json, and existing imports in nearby files. - List the components it exports from the package entry (
index.ts,exportsin itspackage.json,dist/index.d.ts) or from the component directory.
- Check
- Props and variants of each component you might use: the TypeScript props,
cva/variant maps, and stories (*.stories.*) if present. - Tokens. These might be CSS custom properties (
:root { --color-… }), a Tailwind theme (@themeblock in v4,theme.extendin v3), atokens.jsonor*.tokens.json, or a TS tokens module. Note the token file path.
If the repo has no identifiable design system, say so and ask before writing anything. Don't make one up.
When the code library mirrors a Figma library, the Figma side can help:
figma_get_component_for_development({ nodeId, codebasePath: "<components dir>" })returns specs plus a registry of existing code components, so you don't recreate one.figma_get_component_for_development_deep({ nodeId, depth: 0 })is for deeply nested components (tables, menus, date pickers).figma_analyze_component_set({ nodeId })maps variant axes and states to props and pseudo-classes.
2. List needs and map them to real components
Break the request into plain UI needs, e.g. "primary button", "email input", "data table", "empty state". Include only what was asked for.
- Figma library mirrors the code (same component names): run
figma_resolve_components({ needs, libraryFileKeys }). Treatmatchedas "use the same-named code export", and confirm that export actually exists in code. - Code only: match each need against the exported component names and their variants yourself. Record each one as
matched(one exact component),possible(several plausible components, or a partial fit) orgap(none).
If anything is possible or gap, stop before writing code and tell the person:
The design system doesn't cover everything in this request:
Missing: <need> — no component in <package>
Unclear: <need> — could be <ComponentA> or <ComponentB>
For each: use a specific component, leave a clearly marked placeholder (e.g. {/* GAP: date picker */}), or skip it?Wait for the answer. A placeholder is a comment or a plain, unstyled marker element. It never mimics the missing component.
3. Write the code
- Import components only from the design-system source. Use the props and variants they expose (
variant="primary",size="sm"). Don't wrap a component just to restyle it. - Don't render raw
<button>,<input>,<select>,<textarea>,<dialog>or<table>when the system has that component. - Styling must reference tokens:
- CSS variables, e.g.
var(--space-4),var(--color-text-muted). - Tailwind theme utilities (
p-4,text-muted-foreground), never arbitrary values (p-[13px],bg-[#3b82f6]). - The token module (
tokens.color.primary).
- CSS variables, e.g.
- No hex, rgb or hsl literals. No px or rem literals for spacing, radius or type. No inline
style={{…}}for visual properties. - Only reference tokens that exist. If a value has no token, that's a gap. Report it.
- Layout glue (grid or flex containers) is fine. Use the system's layout primitives (Stack, Grid, Box) if it has them.
- For Figma-backed components, take sizing, spacing and states from the Figma specs (step 1 tools), expressed through tokens.
4. Audit (max 3 rounds)
figma_audit_code_adherence({
files: ["src/pages/Settings.tsx", "src/pages/settings.css"],
designSystem: {
packages: ["@acme/ui"],
components: ["Button", "Input", "Select", "Card"], // when exports can't be inspected
tokensPath: "src/styles/tokens.css"
},
minScore: 90
})Use sources: [{ path, content }] instead of files for code that isn't on disk yet. Fix by finding:
- Errors:
reimplements-component: use the system's component.unknown-token: use an existing token or report the gap.
- Warnings:
raw-element: swap for the DS component.hardcoded-color/hardcoded-length: use a token.tailwind-arbitrary-value: use a theme value.
- Info:
inline-stylemeans move it to classes or tokens.
Re-run the audit after fixing. If a fix would need an invented component or token, stop and add it to the gap list. After 3 failing rounds, report the remaining findings to the person. Don't lower minScore.
Optional: if you can render the result to HTML, run figma_scan_code_accessibility({ html, tags: ["wcag22aa"] }).
5. Hand off for grading
Use the grade-generation skill. The grader gets the request, the file paths and the design-system source (packages, components, token path), not your reasoning.
Then report: the files written, the DS components used, the placeholders and gaps, and anything left out at the person's request.
Never
- Write a local component that duplicates one the system has, or a styled element standing in for a missing one.
- Invent a token, a CSS variable or a Tailwind theme key.
- Hardcode colors, spacing, radius or type sizes.
- Edit the design-system package itself to make your code fit. That's a parity decision for the person (see
design-code-parity). - Add features or elements the request didn't ask for.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

