What is Layout?
Layout is the compiler between design systems and AI coding agents. It extracts your tokens, components, and visual patterns from Figma or a live website, lets you refine them in a studio editor with AI assistance, then serves the result directly to your coding agent via MCP so every component it builds is on-brand, every time. Designers stay in control of the system. AI stays on-brand.
Quick Start
Get your AI agent reading your design system in 60 seconds:
npx @layoutdesign/context installAuto-detects Claude Code, Cursor, Windsurf, Copilot, Codex, and Gemini CLI. Three free starter kits included. Full CLI guide →
Core Capabilities
Pull design tokens, components, fonts, and screenshots from Figma files or live websites. Layout resolves actual style values automatically with no manual mapping.
Two-mode workspace: browse extracted tokens on the left, edit layout.md in the centre with an AI edit bar, then switch to the Explorer to generate and test component variants.
Generate 2–6 component variants from a single prompt. Compare with and without design context, upload reference images, and push results to Figma as real auto-layout frames.
Run npx @layoutdesign/context install and your AI agent gets 14 MCP tools — fetch design tokens, check compliance, preview components, and push to Figma. Works with Claude Code, Cursor, Copilot, Antigravity, and Windsurf. Three free starter kits bundled.
Extract design tokens from any webpage, inspect elements against your design system, check compliance scores, capture screenshots, and push pages to Figma. All from a browser sidebar.
Download a ZIP bundle with layout.md, tokens.css, tokens.json, tailwind.config.js, AGENTS.md, Cursor rules, and custom font files. Or skip the export entirely and use MCP.
How It Works
- 1Extract: Paste a Figma URL or website URL into Layout and run extraction.
- 2Review: Check the extracted tokens in the Source panel. Re-extract if something looks off.
- 3Generate: Click "Generate layout.md" to synthesise the context file from extracted data.
- 4Test: Switch to the Explorer and generate a few component variants. Check the health score and aim for 80+.
- 5Iterate: Edit layout.md manually or use the AI chat bar to make changes in plain English (e.g. "make buttons square"). Re-test.
- 6Export: Download the ZIP bundle and add the relevant files to your project.
- 7Build: Your AI coding tool now has the design system as context on every prompt.
Figma Integration
Figma is a first-class citizen in Layout. Extract directly from your design files, use the native plugin for in-Figma workflows, and push AI-generated components back as real auto-layout frames.
Paste any Figma file URL and Layout pulls tokens, components, fonts, and screenshots via the REST API. It resolves actual style values (colours, typography, spacing, effects) in two passes. You just need a Personal Access Token.
The native Figma plugin extracts tokens, inspects elements against your design system, and pushes to Layout Cloud without leaving Figma. Key advantage: it reads local (unpublished) styles on all plans, no access token needed.
Generate component variants in the Explorer, then push your favourite back to Figma as a real auto-layout frame. Designers review AI output in their native tool, closing the loop between code and design.
Health Score
The health score (0–100) in the Test panel measures how closely the generated code follows your design system:
Export Bundle
When you export from Layout, you download a ZIP containing:
| File | Purpose |
|---|---|
| layout.md | Full design system reference: tokens, components, anti-patterns |
| CLAUDE.md-section.md | Drop-in section for your project's CLAUDE.md |
| AGENTS.md | Context for OpenAI Codex, Jules, Factory, Amp (agents.md standard) |
| tokens.css | CSS custom properties for all design tokens |
| .cursorrules | Cursor rules file with Quick Reference context |
| cursor/rules/design-system.mdc | Cursor v0.43+ MDC rules format |
| tailwind.config.js | Tailwind config pre-loaded with extracted token values |
| tokens.json | W3C DTCG-compatible token file for Theo, Style Dictionary, etc. |
layout.md (Section 0) is designed to be copy-pasted standalone. It fits within tight context budgets and summarises the most critical tokens and rules in 50–75 lines.Tips
Next Steps
- Studio Guide for the full workspace reference, extraction options, and Explorer.
- CLI Guide to set up the MCP server so your AI agent fetches design context automatically.
- Figma Plugin to extract tokens and inspect elements without leaving Figma.
- Chrome Extension to extract tokens, inspect elements, and check compliance from any browser tab.