Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates framework-matching code from Figma selections, reusing existing components and design tokens in the project.
43% 83%+39 ptsof test cases passed
Passed 19 of 23 test cases with the skill, and 10 of 23 without it.
This test ran on v5. v8 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
get_design_context + per-node fidelityLoaded by figma-codegen step 1. get_design_context (detail full, dedupeComponents: true)
is the layout + binding source of truth — tokens resolved to names, styles deduped into globalVars,
each instance's mainComponent / componentProperties. Trust it over the screenshot; never
hand-resolve variable ids or read raw hex. This file is the detail: how to read the tree, the
per-property fidelity catalog, and how to ground a page too big for one call.
colorProfile: "DISPLAY_P3" means every colour in the payload is a P3 colour. It is the first
key of a result from a Display P3 file, and absent otherwise. There, a hex (and any r/g/b) is P3
channels: #CC6633 is what CSS writes as color(display-p3 0.8 0.4 0.2), and emitted as the
plain hex it renders visibly duller — measured against Figma's own render, the plain hex was up to
102/255 off on a saturated green and 20/255 on an orange, color(display-p3 …) within 1/255. So
emit a raw colour as color(display-p3 r g b) with each channel the hex pair ÷ 255, rounded to 3
decimals (/ a for the alpha of an 8-digit hex, e.g. color(display-p3 0 0 0 / 0.25); Tailwind
bg-[color(display-p3_0.8_0.4_0.2)]) — fills, strokes, gradient stops and shadows alike. A token
still wins: when the colour is a bound variable, or projectTokens / token_map match it to a
project token, emit the token (the designer most likely meant the brand colour, and the file just
happens to be P3) and say in your report that the design renders more saturated than that token
does. Without colorProfile, a hex is the plain sRGB hex it reads as.dedupeComponents: true, and do not depth-limit a tree you intend to build from. Dedupe
shows the first instance of each repeated component in full and collapses the rest to a
"deduped": true stub — a 100-instance screen stays readable while every distinct component keeps
one complete copy. A deduped (or truncated) sibling means "identical to the first one, reuse
that structure"; a depth cap, by contrast, throws the structure away — the trap that makes repeated
rows/cards look empty.textOverrides. A deduped
stub carries its own textOverrides ({ name, characters } for every visible TEXT it renders) —
fill each repeated element's text from that, so cards/rows/form-fields get their distinct titles /
labels / values without re-expanding the un-deduped tree or drilling per instance.propertyOverrides for what it looks like differently. The same stub lists each layer
whose fill, stroke, effect, radius, corner smoothing, opacity, blend or visibility differs from
the main component ({ name, fills: […] }, { name, visible: false }) — apply those per instance
(a prop, a class), or every card renders like the first. An entry's variableModes ({ name, variableModes: { color: "Dark" } }) is a layer switched to another mode inside that instance: its token names are the
first instance's, its colours are that mode's ({} means it went back to inheriting).codeSyntax is the declared code name — prefer it over deriving one. An entry in
the top-level variables map may carry codeSyntax ({ WEB: '--color-primary', … }): theSkills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.