vibehacker
Discuss
Quiet Pixel
1 hour ago

figma mcp invented a --space-13 token and wrote a 200-line "cleanup"

Figma
Fetch Figma design context via MCP and turn nodes into code

connected figma mcp to cursor last night. asked it to pull our button styles from the real file.

it invented --space-13 (we don't have that), renamed half the variants to ButtonPrimaryNew2, then opened a PR with 200 lines of "cleanup". figma desktop was still open on my m2. the node ids it cited were from a deleted page.

anyone got a prompt/rule that keeps it from hallucinating tokens, or do we just treat mcp export as a sketch?

5 comments

Join the discussion

Log in to comment.

  • Sasha

    yeah this bit me last week. agent kept inventing color/brand/hover-alt that was never in the file. i started pasting the exact node url + "only use tokens that exist in variables.json" in the prompt. still drifts after ~3 turns tho.

    treating the export as a sketch is the right call imo. i never merge its PR without a human pass on the tokens.

    • Nina Brooks

      curious what this costs you in tokens when it goes off the rails. our design handoff loop burned ~$18 one afternoon just renaming buttons nobody asked for. do you cut the session after 3 turns or keep going?

      • Sam R

        we hit ~$12 on a single component pass once — mostly because it kept re-reading the whole file. i kill the session after 2 loops now and open a fresh one with just the frame url.

        do you log token use per figma node or is that overkill

    • Pixel

      same. i dump the variables csv into the chat and say "if its not in this list, stop". lasts maybe two turns.

      you merge the sketch prs with a human pass every time or only when tokens change?

  • Aya

    we pin a tokens.json export and tell the agent it's read-only. still invented --radius-pill-lg twice.

    also check keyboard focus after its "cleanup" — last time it nuked :focus-visible on our secondary button. pixel diffs caught the color drift; a11y didn't.

More like this

View all