metabase-ui-component-from-figma

Implements or restyles Metabase Mantine UI components from Figma specs via Linear tickets.

49.0k|6.8k|Updated Feb 2, 2015
One-click install
npx skills add https://github.com/metabase/metabase --skill metabase-ui-component-from-figma
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: metabase-ui-component-from-figma
Source: https://github.com/metabase/metabase/tree/main/.claude/skills/metabase-ui-component-from-figma
Command: npx skills add https://github.com/metabase/metabase --skill metabase-ui-component-from-figma

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bringing a Metabase design-system component in line with a Figma spec involves many error-prone steps: reading the Linear ticket, mapping existing call sites, building a Storybook showcase, extracting exact design tokens, and migrating call sites. This Skill orchestrates that entire workflow so nothing is missed and regressions are caught early.

Core Features & Use Cases

  • Two-mode workflow: Handles both updating an existing metabase/ui component (with usage mapping and blast-radius analysis) and creating a brand-new component with proper scaffolding and barrel exports.
  • Storybook showcase matrix: Builds a single visual-regression-ready story covering every variant, size, and state, with forced hover/pressed pseudo-states and global light/dark theme toggling.
  • Exact Figma token extraction: Uses the Figma Dev Mode MCP server to pull semantic color tokens and dimensional values, mapping them to --mb-color-* and Mantine scale variables while flagging any spec gaps instead of hardcoding values.
  • Use Case: A Linear ticket asks to restyle the Chip component per a new Figma spec. The Skill fetches the issue, documents all 40+ call sites, builds a before/after showcase matrix, applies exact tokens from Figma, iterates with you in Storybook, then commits and migrates call sites.

Quick Start

Ask the AI to update the Chip component in metabase/ui to match the Figma design linked in Linear issue ENG-1234.

Frequently Asked Questions about metabase-ui-component-from-figma

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a Metabase UI component to match a Figma design?

Fetch the Linear issue to get the Figma link and branch, map all existing call sites, build a Storybook showcase matrix before changing styles, then apply exact tokens from the Figma Dev Mode MCP server. Commit and migrate call sites only after the user approves the result.

How do I build a Storybook showcase matrix for a Mantine component?

Enumerate every variant, size, and state from the component's API, then render a CSS-grid matrix with state labels down the left and one column per variant-size combination. Use storybook-addon-pseudo-states to force hover and pressed states, and drive light/dark via the global Storybook theme toggle.

Why does the Figma MCP return 'nothing selected' when extracting tokens?

The get_variable_defs and get_design_context tools read the current selection in the Figma desktop app via the Dev Mode MCP server. Enable the server in Figma's Dev Mode MCP section and select the relevant layer before retrying.

Can I use color-mix or hardcoded hex values in Metabase component CSS?

No. Every color must be a semantic --mb-color-* token mapped from the Figma variable names. If the spec binds a primitive ramp value directly to a property, stop and flag it to the user as a design-side gap rather than hardcoding a value.

When should I write unit tests before restyling a component?

Add behavior-locking unit tests only when the component has custom interactive logic such as event handlers, state, or keyboard wiring. Skip tests for thin Mantine wrappers and pure visual restyles, which are covered by the showcase and Loki visual regression.

What is the difference between update mode and create mode?

Update mode restyles an existing component with call sites, so it maps usage and builds the showcase before styling to catch regressions. Create mode scaffolds a new component, so it implements and styles first, then builds the showcase afterward since nothing exists to render yet.