Connect ds-bridge to Figma

Save your Figma token so it survives restarts, point ds-bridge at your design-system library, and register the product files your team designs in — the one-time setup behind every Figma-powered feature.

What you’ll learn: connect

What you’ll learn

Everything in the first tutorial worked without Figma. This one opens the other half of ds-bridge: drift detection, handoff scoring, parity, impact, docs — all the features that read your design files over Figma’s API. They share one setup, and it’s worth doing once, carefully, so you never fight it again.

By the end you’ll have a token that survives a restart, a library file every teammate shares, and an optional list of product files you can target by name. We’ll also run a one-command check that catches the single most common mistake (the wrong Figma seat) before it wastes your afternoon.

Setup

You need ds-bridge installed (if not, start with Getting started) and a Figma account on a Dev or Full seat. A View seat is rate-limited to roughly a handful of API requests per month — it will look connected and then silently fail, so this is the first thing to get right.

Steps

  1. Create the token. In Figma, open Settings → Security → Personal access tokens and create one. Give it these scopes: file_content:read, library_content:read, file_versions:read, and — only if you want handoff QA to post comments — file_comments:read and file_comments:write. Confirm it’s from a Dev or Full seat.

  2. Connect it — durably. Claude Code does not keep a plugin’s sensitive value across restarts (#62442), so a token typed into the preferences dialog is gone the next time you launch. The durable home is a gitignored .ds-bridge.env the CLI auto-loads on every run. The reliable way to write it is the interactive command, run in your own terminal — it prompts with the input hidden and verifies the result:

    ds-bridge config connect --verify
    

    It asks for the token (hidden), then your library file key, writes .ds-bridge.env (0600, and adds it to .gitignore), and then pings Figma to confirm the token works and your seat can read library content. Inside Claude Code you can also run /ds-bridge:connect, which saves any token already in the session and otherwise points you back here.

  3. Set your library file. Your design-system library — the Figma file that publishes your components and variables — is shared by everyone, so its key belongs in the committed .ds-bridge.json, not the secret file. Paste the URL or the bare key; a full Figma URL collapses to the key automatically:

    ds-bridge config set-library https://www.figma.com/design/<KEY>/Your-Library
    

    That writes figma_file_key to .ds-bridge.json. Commit it — now every teammate who clones the repo points at the same library and only needs to run their own config connect for the token.

  4. Register product files (optional). A library is consumed by product files — your web app’s designs, the mobile app’s, an admin console’s. Register each under a short alias so you can target it by name later:

    ds-bridge config add-product web   https://www.figma.com/design/<WEB_KEY>/Web
    ds-bridge config add-product mobile https://www.figma.com/design/<MOBILE_KEY>/Mobile
    ds-bridge config list
    

    Now ds-bridge impact --file-key web or ds-bridge library-health --file-key mobile runs against that file — no pasting keys. A single frame URL (handoff QA, figma-impl) is already self-contained and needs none of this.

  5. Check everything. One command shows the effective configuration — token masked — and, crucially, which source won each value, so there’s no guessing whether a stale dialog value is shadowing your committed file:

    ds-bridge config show
    

    You should see your masked token sourced from .ds-bridge.env, your library key from .ds-bridge.json, and any product aliases listed. That’s a connected repo.

Result

You’ve created a properly-seated Figma token, saved it where it survives restarts, pointed ds-bridge at your shared library, and (optionally) named your product files. config show confirms it in one glance. Every Figma-powered tutorial below now just works — start with whichever matches your role:

Working from Figma designs in Claude Code? Implementing a Figma frame in code explains the second Figma login (the MCP server), which is separate from the token you just set.

Troubleshooting