c2d
c2d2c:c2d — code to design, every state
Pre-flight: verify the token bridge
Before drawing anything, check that the target file actually has the project's synced tokens — rule 2 below binds against them, and binding into a file where they're missing or stale silently produces raw values or wrong colors.
- Probe the file (
get_variable_defsor a smalluse_figmaquery) for theVAR_COLLECTIONScollections; spot-check a few variables' values and$codeSyntax.WEBentries againstVAR_SNAPSHOT. - Missing → sync them in first: the companion plugin's Pull if the project adopted it, otherwise create the collections via
use_figmafollowing the snapshot's layout (see the Tokens section). - Present but diverged from the snapshot → refresh them the same way before binding, and mention the drift to the user (it usually means someone skipped the snapshot discipline).
Only then start the export; from here on, binding is automatic — every value the code expresses as a token lands bound to its variable, per rule 2.
Project parameters
Resolve parameters from C2D2C.md at the repo root (fallback: .claude/c2d2c.md); if absent, offer to bootstrap one from the template at ../../templates/C2D2C.template.md (plugin root; standalone installs without that file fetch https://raw.githubusercontent.com/BIAsia/c2d2c/main/templates/C2D2C.template.md). This skill uses EXPORT_FILE (if the user gives a link, the link wins), VAR_COLLECTIONS, VAR_SNAPSHOT, ICON_SOURCE, DS_ROUTE, and for token work TOKEN_HOME, TOKEN_EXPORT.