What is Layout?
Layout enforces your design system in every AI coding agent. It extracts your tokens, components, and visual patterns from Figma or a live website, serves them to your coding agent via an unmetered local MCP server, and gates every AI edit to on-token values with Layout Live. Designers stay in control of the system. AI is held to it.
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.
Browse extracted tokens on the left, edit layout.md in the editor with an AI edit bar, check code against your design system in the Quality tab, and follow the golden-path checklist from extraction to enforcement.
Curate raw tokens into canonical roles, upload brand logos and custom fonts, attach brand voice and copy guidelines, and manage snapshots with rollback. Or start from a blank kit if you don't have a Figma or URL source.
Run npx @layoutdesign/context install and your AI agent gets 23 MCP tools: fetch design tokens, check compliance, preview components, and push to Figma. Works with Claude Code, Cursor, Windsurf, Copilot, Codex, and Gemini CLI. Three free starter kits bundled.
A desktop app that turns your running React app into a direct-manipulation canvas. Click an element, scrub padding, swap a token, and a deterministic edit gated to your design system writes straight back to your source. Stop prompting for padding.
An optional exploration utility: generate component variants from a prompt when you need them, compare output with and without design context, and push results to Figma as real auto-layout frames.
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, CLAUDE.md, AGENTS.md, Cursor rules, DESIGN.md, a Codex skill, 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: Paste a snippet into the Quality tab's Check code panel to validate it against your design system, or generate variants in the Explorer and aim for a health score of 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 |
| .cursor/rules/*.mdc | Cursor project rules (design system + components) |
| DESIGN.md | Google's design.md format, an interoperable design context spec |
| .codex/skills/<kit>/SKILL.md | Agent Skill folder for OpenAI Codex |
| 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.
- Layout Live to tweak your running app visually and write changes back to source.
- 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.