SuperAPIAI Directory

designfit

github.com · AI coding

designfit is a tool for validating the consistency of AI-generated frontends with Figma designs, provided as an MCP server and a Claude Code skill. Instead of pixel-by-pixel screenshot comparison, it compares design tokens (colors, fonts, etc.) and geometry information (the box position of elements relative to the screen root node), outputting a deterministic pass/fail score and a machine-processable fix list, avoiding repeated modifications by coding agents caused by anti-aliasing and sub-pixel offsets.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

designfit is used to solve the problem of aligning AI-generated frontend interfaces with Figma designs. Instead of screenshot diff comparison, it converts the design and the rendered result into deterministic design tokens and geometric measurements, then determines consistency according to explicit tolerances, thereby avoiding repeated modification loops caused by font rendering noise.

Main capabilities:

  • designfit_extract: extracts design information from a Figma link ({ url }), { fileKey, nodeId }, or a pasted GET /v1/files/:key/nodes response body ({ nodes }), supports an optional maxDepth, and returns { design, componentMap, viewport }. Hidden nodes are skipped, and a frame composed purely of vectors is treated as a single leaf node.
  • designfit_validate: accepts { url, viewport, design, componentMap, tolerances? } and returns { pass, score, violations, unmapped }, checks tokens, geometry, and element existence, and provides an actionable fix list.

Usage:

  • After being installed as a Claude Code plugin, it registers both the designfit_extract and designfit_validate MCP tools and the designfit-fidelity-loop skill, and asks once for a Figma personal access token (optional; if not provided, pasted /nodes JSON is accepted).
  • Other MCP clients can be configured manually. On Windows, some clients cannot directly launch designfit (it resolves to designfit.cmd); you can use { "command": "npx", "args": ["-y", "designfit"] }, or point to the binary file { "command": "node", "args": ["<absolute-path>/node_modules/designfit/dist/index.js"] }.
  • When installed manually, the skill is not loaded automatically; you need to copy skill/SKILL.md to the agent's skills directory (Claude Code is .claude/skills/designfit-fidelity-loop/SKILL.md).
  • Typical workflow: have the agent implement a Figma frame and provide the link, driven by the designfit-fidelity-loop skill: designfit_extract → build → mark elements with data-designfit-id → designfit_validate → fix → repeat until passing → remove markers.
  • Extraction requires FIGMA_TOKEN to be set in the MCP server environment.

Use cases: developers who need coding agents to implement frontends based on Figma designs and want stable, reproducible consistency feedback.

Limitations: v1 supports only a single viewport and includes token, geometry, and existence checks; responsive multi-breakpoint and perceptual fallback based on vision-language models are still on the roadmap and are not yet available.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools