A read-only pass over the
sets you already have — what they are, and which could come under
contract. Nothing is changed.
A contract is a JSON file your developers
generate from the component code (ds-contracts onboard). Paste one
below — this plugin builds it here as real component sets, bound to your variables. After
that, Changes tells you what drifted and Send proposes your
canvas edits back.
Nobody sent you one yet? Build the sample instead — Card, Badge,
Avatar, Button, token-bound, ~30 seconds, safe to re-run.
Paste the contracts file — every set is built in this file, bound to your variables, and re-running is safe.
Other ways to receive
A developer with the file open can hand it to you directly:
ds-contracts figma push <file> --code <CODE> prints a
6-character code, good for 15 minutes, and you both have to be there.
For a standing feed that needs neither of you, connect your team's
channel in Changes.
Get updates from your team automatically
When engineers merge component changes, your team's CI can deliver
them straight to this plugin — nothing to schedule, no codes to trade.
One-time setup: ask an engineer to run
ds-contracts figma claim-channel in your
design-system repo. It creates two keys — they keep the publish key in
CI, and they send you the read key (it starts with dscr_). Paste the
read key here once; it's remembered for you.
The read key can only read. It can't change this file,
and it can't write to your repo.
No contract-backed components in
this file yet. Build some first.
What drift means
Every generated component set remembers which contract
built it and what it looked like at that moment. Check drift compares
that record with the canvas now: a mismatch means the set was edited
after it was built, and the report names the variant and the change
(was → now). Re-running a sync script — or applying an update —
records the current state as the new baseline.
What’s in this file
A read-only pass over every local component set —
including the ones this tool did not make. Nothing is changed.
Usually you arrive here from Changes — “Propose this
change.” To start cold, select a set on the canvas, or pick one from the
scan above. A set this tool did not build needs no base contract.
With a base contract you get a diff (what changed).
Without one you get a proposal (what this set is) — that is the path
for components this tool did not build. Sets generated from a repo
contract pre-fill their own base after the read.
The token is used for these requests only, kept in
this window's memory, and never stored — closing the plugin forgets
it. Use a fine-grained token scoped to ONE repo with Contents and Pull
requests read/write.
On the developer's machine,
npx @ds-contracts/cli figma receive --out contracts
prints a 6-character code — enter it here. The proposal travels through
the pairing bridge (one-time delivery, 15-minute TTL, contents never
logged) and lands as a reviewed local diff; the CLI writes nothing
without --apply. Nothing is stored here
either — the code is used for this one send and forgotten.
Paste a script
Debug surface — runs raw generated scripts with full
plugin permissions, and unlike every read-only action in Build, Changes
and Send it is NOT run against the guarded read-only API. A script
pasted here can change this file. For developers of this tool.
Local runner
Full-library rebuild from a localhost script server:
fetches every generated script from http://localhost:8765
(npm run figma:serve) and runs them in
dependency order — SHA-256-verified against the server manifest,
stopping on first failure. For developers of this tool.