skills/figma-design-lint/SKILL.md
Audit Figma design files for MCP/code-generation readiness via Figma URL. Uses the Figma Dev Mode MCP (get_metadata, get_design_context, get_variable_defs) to inspect layer structure, naming, Auto Layout, component usage, typography/color tokens, and file hygiene. Use this skill whenever the user asks to review a Figma design, check if a design is ready for code generation, audit design file quality, lint a design, review design-to-code readiness, or mentions Figma design specs, design handoff quality, or MCP design standards. Also triggers on: 'check my Figma', 'is this design clean enough', 'design QA', 'design lint', 'review design structure', 'design file cleanup', 'review this Figma URL', or any request to evaluate whether a Figma file follows best practices for direct code output.
npx skillsauth add tc9011/my-skills figma-design-lintInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit a Figma design file against the Figma x MCP Design-to-Code Specification — rules that ensure designs translate cleanly into code via MCP, AI codegen, or engineering handoff.
figma-design-lint/
├── SKILL.md # This file — workflow + audit rubric
├── assets/
│ ├── report-template.html # Per-page HTML report template
│ └── summary-template.html # Multi-page summary template
└── references/
├── audit-rubric.md # 9-category rubric with severity levels & checklists
├── report-format.md # Full markdown report templates (single + multi-page)
├── html-generation.md # HTML placeholder replacement + issue card format
├── subagent-template.md # Subagent prompt template + batching rules
└── pipeline-template.md # Pipeline-based multi-page workflow + loop logic
The user provides a Figma URL like:
https://www.figma.com/design/<FILE_KEY>/Title?node-id=X-Yhttps://www.figma.com/file/<FILE_KEY>/...If the URL includes node-id, focus the audit on that node. Otherwise, audit the current selection or top-level frames.
Parse the Figma URL to extract FILE_KEY and FILE_NAME (the URL path segment after the key). Store these for the entire audit — every issue location needs a Figma deep link:
https://www.figma.com/design/{FILE_KEY}/{FILE_NAME}?node-id={NODE_ID_WITH_DASHES}
Replace : with - in node IDs when constructing deep links (e.g., 2422:61196 → 2422-61196). Pass the deep link base URL to subagents in multi-page mode.
Before gathering data, determine what the user's URL points to.
Call get_metadata on the node-id. Inspect the response:
<frame> elements at screen dimensions): multi-page section.If multi-page, list all child pages and ask:
I found this URL points to a section with N pages:
| # | Page Name | Node ID | Size |
|---|-----------|---------|------|
| 1 | 完整页面 | 2422:61194 | 375×1131 |
| ... | ... | ... | ... |
How would you like to audit?
1. **All pages** — full audit of every page
2. **Representative sample** — I'll pick 2-3 key pages (recommended for large sections)
3. **Specific pages** — tell me which ones
4. **Single page** — just one
Wait for response before proceeding.
| Mode | Output |
| -------------- | ------------------------------------------------------------------- |
| Single | reports/{name}-{YYYY-MM-DD-HH-MM-SS}.md + .html |
| Multi-page | reports/{name}-{YYYY-MM-DD-HH-MM-SS}.md + .html |
| Sample | Same as multi-page but fewer pages |
Multi-page mode generates ONE summary HTML file, not per-page HTML reports. Per-page detail lives in the
.mdonly. This keeps output size manageable.
For multi-page and sample modes, follow references/pipeline-template.md for the full pipeline format, batching rules, loop logic, and aggregation method. Summary:
reports/pipeline.md. Subagents have NO MCP access — main agent must pre-fetch all metadata and tokens.references/subagent-template.md for the prompt template.report.md and summary.html.When detecting child pages in a section:
<symbol> nodes (component definitions), frames smaller than 100px in either dimension, hidden/invisible frames, and nodes whose names suggest symbols or component definitions (e.g., names starting with _, or containing "symbol", "component def")node-id, audit only once. If frames share the same name but different IDs, treat as separate pages (likely state variants)Use the Figma Dev Mode MCP tools:
| Tool | Purpose | Check |
| ---------------------- | --------------------------------------------- | ------------------------------------------------ |
| get_metadata | Layer tree — names, types, nesting, positions | Naming quality, hierarchy, nesting depth |
| get_variable_defs | Design tokens — colors, spacing, typography | Token system, semantic naming |
Optional tools (skip unless specifically needed — they often fail due to Figma restrictions):
| Tool | Purpose | When to use |
| ---------------------- | --------------------------------------------- | ------------------------------------------------ |
| get_design_context | Generated code output | Only if auditing MCP/Codegen Readiness in depth |
get_design_contextalmost always fails with "directory not whitelisted" errors. Do NOT call it unless the user explicitly requests code generation analysis. Do NOT retry on failure — note the limitation in the Methodology section and move on. The audit can be completed fully withget_metadata+get_variable_defs.
⛔
get_screenshotis NOT available and MUST NOT appear anywhere in the report. Do not mention it in the Methodology table, tool list, or any other section. The only tools to list in Methodology are:get_metadata,get_variable_defs, and optionallyget_design_context.
Data strategy for large files: Start with get_metadata on the main frame, get_variable_defs once for the file, then drill deeper per section as needed. Don't try to audit everything in one pass.
Read references/audit-rubric.md for the full 9-category checklist with fixed check items (each with ID, severity, and verification method). Execute EVERY check item and record Pass/Fail with evidence. All 9 categories MUST appear in the report — never merge or skip any. The exact category names and weights are:
| # | Category | Weight | |---|----------|--------| | 1 | File & Layer Organization | 10% | | 2 | Naming Conventions | 12% | | 3 | Layout Structure | 15% | | 4 | Component Usage | 12% | | 5 | Typography | 10% | | 6 | Color & Style Tokens | 10% | | 7 | Images, Icons & Assets | 6% | | 8 | State Completeness | 10% | | 9 | MCP/Codegen Readiness | 15% |
Use these EXACT names in the Category Breakdown table. Do NOT rename, abbreviate, or omit any.
All reports are saved to a reports/ directory (created if needed) with timestamped filenames based on the Figma section/page name:
reports/{section-name}-{YYYY-MM-DD-HH-MM-SS}.md # markdown report
reports/{section-name}-{YYYY-MM-DD-HH-MM-SS}.html # HTML report (single-page: report, multi-page: summary)
Examples:
reports/完整页面-2026-04-22-15-30-45.mdreports/定制-2026-04-22-15-30-45.md (multi-page section)reports/定制-2026-04-22-15-30-45.html (summary HTML)The section name comes from the root frame/section name in Figma metadata. Sanitize it for filesystem safety (replace /, \, : with -, trim whitespace). Use the current local time for the timestamp.
Create the reports/ directory with mkdir -p reports before writing.
Scoring: Per-category scores are computed from worst failed severity (see references/audit-rubric.md for the tier table). Overall score = weighted average of category scores. Minimum 0, maximum 100.
Score MUST be out of 100. Never use /10, /20, or any other scale. All 9 categories MUST appear in the breakdown table with their weights.
Read references/report-format.md for the full markdown report template (single-page and multi-page formats).
⛔ The audit is INCOMPLETE until the HTML file is written to disk and opened in the browser. Do NOT stop after the markdown report. Do NOT skip this step. The HTML report is the PRIMARY deliverable — the markdown is supplementary.
assets/report-template.htmlassets/summary-template.htmlRead references/html-generation.md for the full placeholder replacement table, issue card format with location blocks, and score ring SVG formula.
Issue location requirement: Every issue card MUST include a <div class="issue-location"> block with node name, node ID, and parent path. See references/html-generation.md for exact format.
Use the Write tool to save the completed HTML. Follow the Output Path Convention above:
mkdir -p reports
reports/{page-name}-{YYYY-MM-DD-HH-MM-SS}.htmlreports/{section-name}-{YYYY-MM-DD-HH-MM-SS}.htmlSave the markdown report with the same base name: reports/{name}-{YYYY-MM-DD-HH-MM-SS}.md
Run open reports/{name}-{YYYY-MM-DD-HH-MM-SS}.html (macOS) to display the report.
Confirm the file exists and was opened. If the Write tool failed or the file is empty, retry. Do NOT report completion to the user until the HTML file is confirmed written and opened.
Frame 123 (node 2422:61196) inside Header / NavBar should be renamed to NavBar" — not "some layers have bad names."› separator), node ID, dimensions, and a clickable Figma deep link. No exceptions. See references/report-format.md for the markdown format and references/html-generation.md for the HTML format.tools
Three.js interaction - raycasting, controls, mouse/touch input, object selection. Use when handling user input, implementing click detection, adding camera controls, or creating interactive 3D experiences.
development
Three.js geometry creation - built-in shapes, BufferGeometry, custom geometry, instancing. Use when creating 3D shapes, working with vertices, building custom meshes, or optimizing with instanced rendering.
tools
Three.js scene setup, cameras, renderer, Object3D hierarchy, coordinate systems. Use when setting up 3D scenes, creating cameras, configuring renderers, managing object hierarchies, or working with transforms.
tools
Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.