rojim666/sztucode/design-variables
Claude Code and agent skill by rojim666/sztucode
- community
Checking that the SKILL.md file is still in the repository.
Bind/unbind design variables (tokens) on node props with `$:<Set>:<Name>` or `$<id>`; create via apply_variables; switch node variable modes via batch_edit variableModes
Install
npx vskill@latest install rojim666/sztucode/design-variablesSKILL.md
Working with Design Variables
Bind reusable design tokens to node properties. References have two independent dimensions: location (local or team library) and addressing (name or GUID), producing four canonical forms:
| Location | Name-based | GUID-based | |
|---|---|---|---|
| Local | $:<SetName>:<VariableName> | $<variableId> | |
| Team library | $lib:<libraryKey>:<SetName>:<VariableName> | $lib:<libraryKey>:<setId>:<variableId> |
Use the ids and names returned by fetch_variables. For team-library variables, call it with enabledLibraryKey. A reference must use either name-based or GUID-based addressing consistently; do not mix them. Prefer GUID-based references when names may drift.
Use apply_variables to create new ones. Variable types: FLOAT, COLOR, BOOLEAN, STRING.
Supported Variable Binding Properties
FLOAT (Node) — width, height, minWidth, maxWidth, minHeight, maxHeight, itemSpacing, counterAxisSpacing, paddingLeft, paddingRight, paddingTop, paddingBottom, padding (binds all four sides), cornerRadius, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius, strokeWeight, strokeTopWeight, strokeRightWeight, strokeBottomWeight, strokeLeftWeight, opacity, gridRowGap, gridColumnGap
FLOAT (Text) — fontSize, letterSpacing, lineHeight, paragraphSpacing, paragraphIndent
STRING — content (also accepts FLOAT, auto-stringified)
BOOLEAN — visible
COLOR — fill, stroke (shorthand for single solid paint), or color: "$:Set:var" inside fills/strokes arrays:
Variable Rules
- Team-library references import the variable set before binding.
- Variable set names and variable names must NOT contain
$or:characters. - Strings like
$99.99,$HOME,$(document)are treated as plain text, not variable references. - Type must match: FLOAT for number properties, COLOR for fill/stroke, BOOLEAN for visible, STRING for content/fontFamily.
- Variable references on unsupported properties (e.g.,
x,y,rotation) are skipped with a warning. padding: "$:Set:var"(orpadding: "$<variableId>") binds all four padding sides simultaneously.- COLOR binding uses the variable's current color as fallback; if unavailable, a warning is reported.
Unbinding Variables
To remove an existing variable binding from a property, set the property value to null:
Switch Variable Modes on Nodes
Variable sets can define multiple modes (e.g. Light / Dark). Binding a variable to a node property always points at the variable itself; which mode's value is resolved depends on the mode override on that node (or an ancestor). Switching mode is how you flip a theme / density / brand without rebinding every property.
Agent API
Use variableModes in U() / I() (via batch_edit) to set or clear mode overrides on a node:
Important: use the variableSetId / mode id (and libraryKey when present) returned in availableVariableModes from fetch_variables({ nodeId }). Mode id must belong to that set's modes list — do not invent ids.
Workflow
- Decide the target node:
- Prefer the page or a top-level frame when switching an entire screen/theme.
- Override on a subtree root only when part of the design should stay on another mode.
fetch_variables({ nodeId })— readavailableVariableModes[]for each switchable set'svariableSetId(and optionallibraryKey) plusmodes: [{id, name}].- Apply with
U(nodeId, {variableModes: [...]}). - Re-read / screenshot if needed — bound variables (
$:Set:Var) keep the same bindings; resolved values change with the active mode.
Mode Rules
variableModesis an array of{variableSetId, modeId, libraryKey?}entries.variableSetId: useavailableVariableModes[].variableSetIdfromfetch_variables({ nodeId }).modeId: use an id from that set'smodeslist; usenullto clear the explicit override.libraryKey: required for a team-library variable set (fromavailableVariableModes[].libraryKey); omit it for a local set.- Use ids exactly as returned by
fetch_variables({ nodeId }); names and invented ids are not valid mode references. - Only variable sets returned for the target node are switchable. Unknown set/mode entries are skipped with a warning.
- Mode resolves down the tree: a child's explicit mode wins over an ancestor's; Auto means inherit.
- Switching mode does not change variable bindings on properties. Bindings stay as
$:Set:Var/$<id>; only the resolved value changes. - Prefer one mode switch on a common ancestor over repeating the same
variableModeson every leaf.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/runtime-ts/prompts/Sztubuddy/skills/ardot-design-core/func-rule/design-variables/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rojim666/sztucode/design-variables)