/flutter-design-fidelity:figma-to-widgetfrom flutter-design-fidelity
Translates Figma frames or design images into Flutter widgets using Auto Layout mapping, reusing existing project components and avoiding hardcoded pixel positions.
Ships in flutter-design-fidelity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Profile first. Read
.agents/flutter-profile.yamlin the project root, falling back to legacy.claude/flutter-profile.yaml.tokensdecides how the values in a frame get resolved andstructuredecides where the new widget file goes. The mapping table below is stack-independent and holds under every profile. Field list:../design-tokens/references/flutter-profile.md, relative to this skill directory.
The failure mode this prevents: translating a design by reading pixel positions and
reproducing them with Stack and Positioned. That output matches the artboard exactly
and breaks on every other screen size. Figma's layout system maps cleanly onto Flutter's
— use the mapping, not the coordinates.
Check whether a connected Figma tool is available. If it is, pull the frame directly and read real values. If it is not, say so before starting: without direct Figma access, every value is being read off a rasterized image and is a guess. Use supplied screenshots as visual evidence, label inferred values, and implement what is unambiguous. Request missing specs only when necessary; absence of Figma is not a reason to block a screenshot-based task or claim measured values.
| Figma | Flutter |
|---|---|
| Auto Layout, vertical | Column |
| Auto Layout, horizontal | Row |
| Auto Layout gap | spacing: on Row/Column, or a Gap widget |
| Auto Layout padding | Padding with a directional token |
| Space between | MainAxisAlignment.spaceBetween |
| Hug contents | MainAxisSize.min |
| Fill container | Expanded inside a bounded Flex; otherwise constraints appropriate to the parent |
| Fixed width/height | SizedBox, only when the design truly requires it |
| Absolute position | Stack + Positioned — last resort only |
| Frame with clip | ClipRRect with a radius token |
| Component instance | An existing widget from the codebase |
| Component variant | A parameter or enum on that widget, not a new widget |
Auto Layout first. If a frame uses Auto Layout, the output uses Row or Column. Reach
for Stack only when the design genuinely overlaps elements — an avatar badge, a
floating action button over content. Overlap is the only valid reason.
Never hardcode the artboard width. A 390pt frame is a reference, not a target. Fixed widths appear only where the design is explicitly fixed regardless of screen — an avatar, an icon, a fixed-size chip.
Check for an existing component before building a new one. A Figma component
instance almost always corresponds to a widget that already exists in the codebase.
Building a second PrimaryButton because the first was not found is the most common form
of duplication in agent-generated UI — and the usual cause is searching for the name you
expected rather than the role. Search by suffix (class .*Button), not by the name in
your head. The codebase-conventions skill carries the full search protocol and the
project's component locations.
Variants are parameters. A Figma component with Default, Hover, Disabled, and Loading variants becomes one widget with a state parameter — not four widgets.
Text is never Text('...') with an inline style. Style comes from the tokens
(see the design-tokens skill), content comes from localization (see a11y-and-rtl).
Container inside Container because the design has nested frames. Collapse
them; one Container handles padding, color, and radius together.build() method for the whole screen. Split at the same
boundaries the design file uses for its components.SizedBox(height: n) between every element instead of using the parent's
spacing parameter. The design expresses it as an Auto Layout gap; express it the
same way.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub draz26648/flutter_craft_skills --plugin flutter-design-fidelity4 skills in this plugin
/design-tokensResolve Flutter visual values through the project’s existing theme, constants, or token extension. Honor projects with no token layer./golden-testsAdd or review Flutter visual regression tests for stable, significant UI states; investigate golden mismatches. Do not add goldens for every small widget edit./visual-verificationCapture and compare Flutter UI against a supplied reference after substantial visual changes or an explicit fidelity check. Report missing capture inputs honestly.Other plugins' skills for the same job